summary refs log tree commit diff
diff options
context:
space:
mode:
authorSarunas Valaskevicius <rakatan@gmail.com>2021-07-02 23:04:39 +0100
committerSarunas Valaskevicius <rakatan@gmail.com>2021-07-02 23:04:39 +0100
commit5b69b1f3fe471c2336aa37a7d14ec389ba3f135d (patch)
tree5f7f46b086a49201e252cb7585e3061c78aed695
parentc40d0126f85b4b38bbcee0812366de9e0948c4ec (diff)
downloadnixpkgs-5b69b1f3fe471c2336aa37a7d14ec389ba3f135d.tar
nixpkgs-5b69b1f3fe471c2336aa37a7d14ec389ba3f135d.tar.gz
nixpkgs-5b69b1f3fe471c2336aa37a7d14ec389ba3f135d.tar.bz2
nixpkgs-5b69b1f3fe471c2336aa37a7d14ec389ba3f135d.tar.lz
nixpkgs-5b69b1f3fe471c2336aa37a7d14ec389ba3f135d.tar.xz
nixpkgs-5b69b1f3fe471c2336aa37a7d14ec389ba3f135d.tar.zst
nixpkgs-5b69b1f3fe471c2336aa37a7d14ec389ba3f135d.zip
tlaToolbox: fix crash on file open dialog
-rw-r--r--pkgs/applications/science/logic/tlaplus/toolbox.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/applications/science/logic/tlaplus/toolbox.nix b/pkgs/applications/science/logic/tlaplus/toolbox.nix
index defe218b119..ef2d97ef6bf 100644
--- a/pkgs/applications/science/logic/tlaplus/toolbox.nix
+++ b/pkgs/applications/science/logic/tlaplus/toolbox.nix
@@ -1,5 +1,5 @@
 { lib, fetchzip, makeWrapper, makeDesktopItem, stdenv
-, gtk3, libXtst, glib, zlib
+, gtk3, libXtst, glib, zlib, wrapGAppsHook
 }:
 
 let
@@ -25,7 +25,11 @@ in stdenv.mkDerivation rec {
     sha256 = "02a2y2mkfab5cczw8g604m61h4xr0apir49zbd1aq6mmgcgngw80";
   };
 
-  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ gtk3 ];
+
+  nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
+
+  dontWrapGApps = true;
 
   phases = [ "installPhase" ];
 
@@ -36,6 +40,9 @@ in stdenv.mkDerivation rec {
     cp -r "$src" "$out/toolbox"
     chmod -R +w "$out/toolbox"
 
+    fixupPhase
+    gappsWrapperArgsHook
+
     patchelf \
       --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
       "$out/toolbox/toolbox"
@@ -52,7 +59,8 @@ in stdenv.mkDerivation rec {
     makeWrapper $out/toolbox/toolbox $out/bin/tla-toolbox \
       --run "set -x; cd $out/toolbox" \
       --add-flags "-data ~/.tla-toolbox" \
-      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gtk3 libXtst glib zlib ]}"
+      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gtk3 libXtst glib zlib ]}"  \
+      "''${gappsWrapperArgs[@]}"
 
     echo -e "\nCreating TLA Toolbox icons..."
     pushd "$src"