diff --git a/pkgs/applications/science/logic/tlaplus/toolbox.nix b/pkgs/applications/science/logic/tlaplus/toolbox.nix index da8985818e7b..defe218b119e 100644 --- a/pkgs/applications/science/logic/tlaplus/toolbox.nix +++ b/pkgs/applications/science/logic/tlaplus/toolbox.nix @@ -1,11 +1,8 @@ { lib, fetchzip, makeWrapper, makeDesktopItem, stdenv -, gtk, libXtst, glib, zlib +, gtk3, libXtst, glib, zlib }: let - version = "1.7.0"; - arch = "x86_64"; - desktopItem = makeDesktopItem rec { name = "TLA+Toolbox"; exec = "tla-toolbox"; @@ -20,12 +17,12 @@ let }; -in stdenv.mkDerivation { +in stdenv.mkDerivation rec { pname = "tla-toolbox"; - inherit version; + version = "1.7.1"; src = fetchzip { - url = "https://tla.msr-inria.inria.fr/tlatoolbox/products/TLAToolbox-${version}-linux.gtk.${arch}.zip"; - sha256 = "0v15wscawair5bghr5ixb4i062kmh9by1m0hnz2r1sawlqyafz02"; + url = "https://tla.msr-inria.inria.fr/tlatoolbox/products/TLAToolbox-${version}-linux.gtk.x86_64.zip"; + sha256 = "02a2y2mkfab5cczw8g604m61h4xr0apir49zbd1aq6mmgcgngw80"; }; nativeBuildInputs = [ makeWrapper ]; @@ -33,6 +30,8 @@ in stdenv.mkDerivation { phases = [ "installPhase" ]; installPhase = '' + runHook preInstall + mkdir -p "$out/bin" cp -r "$src" "$out/toolbox" chmod -R +w "$out/toolbox" @@ -43,12 +42,17 @@ in stdenv.mkDerivation { patchelf \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ + --set-rpath "${lib.makeLibraryPath [ zlib ]}:$(patchelf --print-rpath $(find "$out/toolbox" -name java))" \ "$(find "$out/toolbox" -name java)" + patchelf \ + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ + "$(find "$out/toolbox" -name jspawnhelper)" + 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 [ gtk libXtst glib zlib ]}" + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gtk3 libXtst glib zlib ]}" echo -e "\nCreating TLA Toolbox icons..." pushd "$src" @@ -63,6 +67,8 @@ in stdenv.mkDerivation { echo -e "\nCreating TLA Toolbox desktop entry..." cp -r "${desktopItem}/share/applications"* "$out/share/applications" + + runHook postInstall ''; meta = { @@ -75,7 +81,7 @@ in stdenv.mkDerivation { ''; # http://lamport.azurewebsites.net/tla/license.html license = with lib.licenses; [ mit ]; - platforms = lib.platforms.linux; + platforms = [ "x86_64-linux" ]; maintainers = [ ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4f1fa0ef77e3..0c0d5f195769 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28493,7 +28493,7 @@ in tlaps = callPackage ../applications/science/logic/tlaplus/tlaps.nix { inherit (ocaml-ng.ocamlPackages_4_05) ocaml; }; - tlaplusToolbox = callPackage ../applications/science/logic/tlaplus/toolbox.nix {gtk = gtk2;}; + tlaplusToolbox = callPackage ../applications/science/logic/tlaplus/toolbox.nix {}; aiger = callPackage ../applications/science/logic/aiger {};