3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #129042 from svalaskevicius/fix-tlatoolbox-crash

tlaToolbox: fix crash on file open dialog
This commit is contained in:
Jörg Thalheim 2021-07-03 06:47:30 +01:00 committed by GitHub
commit 48d46bd05a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"