vesta-viewer: fix crash on File > Save/Export (#511270)

This commit is contained in:
Peder Bergebakken Sundt
2026-07-23 08:34:22 +00:00
committed by GitHub
2 changed files with 31 additions and 5 deletions
+6
View File
@@ -15629,6 +15629,12 @@
githubId = 632767;
name = "Guillaume Maudoux";
};
layzyoldman = {
email = "ricardopaivacampos@gmail.com";
github = "layzyoldman";
githubId = 193278607;
name = "Ricardo Campos";
};
LazilyStableProton = {
email = "LazilyStable@proton.me";
github = "LazyStability";
+25 -5
View File
@@ -6,9 +6,11 @@
makeDesktopItem,
copyDesktopItems,
autoPatchelfHook,
wrapGAppsHook3,
makeWrapper,
_7zz,
glib,
gsettings-desktop-schemas,
libGL,
libGLU,
libgcc,
@@ -31,7 +33,10 @@ let
platforms = [
"x86_64-linux"
];
maintainers = with lib.maintainers; [ ulysseszhan ];
maintainers = with lib.maintainers; [
ulysseszhan
layzyoldman
];
mainProgram = "VESTA";
};
@@ -39,9 +44,12 @@ let
nativeBuildInputs = [
copyDesktopItems
autoPatchelfHook
wrapGAppsHook3
makeWrapper
];
buildInputs = [
glib
gsettings-desktop-schemas
libGL
libGLU
libgcc
@@ -52,6 +60,9 @@ let
libxtst
];
# Prevent wrapGAppsHook3 from auto-wrapping binaries.
dontWrapGApps = true;
src = fetchzip {
url = "https://jp-minerals.org/vesta/archives/${version}/VESTA-gtk3.tar.bz2";
hash = "sha256-Dm4exMUgNZ6Sh8dVhsvLZGS38UXxe9t+9s3ttBQajGg=";
@@ -64,7 +75,7 @@ let
cp -r * $out/lib/VESTA
mkdir -p $out/bin
ln -s $out/lib/VESTA/VESTA{,-core,-gui} -t $out/bin
ln -s $out/lib/VESTA/VESTA{-core,-gui} -t $out/bin
mkdir -p $out/share/icons/hicolor/{128x128,256x256}/apps
ln -s $out/lib/VESTA/img/logo.png $out/share/icons/hicolor/128x128/apps/VESTA.png
@@ -73,6 +84,11 @@ let
runHook postInstall
'';
# Wrap GSettings/XDG_DATA_DIRS into a single wrapper.
postFixup = ''
makeWrapper $out/lib/VESTA/VESTA $out/bin/VESTA "''${gappsWrapperArgs[@]}"
'';
desktopItems = [
(makeDesktopItem {
name = "vesta";
@@ -82,14 +98,18 @@ let
exec = "VESTA %u";
icon = "VESTA";
categories = [ "Science" ];
mimeTypes = [ "application/x-vesta" ];
mimeTypes = [
"chemical/x-cif"
"chemical/x-pdb"
"chemical/x-xyz"
];
})
];
};
darwinArgs = {
nativeBuildInputs = [
_7zz # instead of undmg because of APFS
_7zz
];
src = fetchurl {
url = "https://jp-minerals.org/vesta/archives/${version}/VESTA.dmg";