about summary refs log tree commit diff
path: root/pkgs/applications/science/logic/tlaplus
diff options
context:
space:
mode:
authormucaho <mucaho@gmail.com>2021-03-11 11:35:25 +0100
committertomberek <tomberek@users.noreply.github.com>2021-03-14 12:27:35 -0400
commitddf18211121f8e03d3f626a7c8452f1edd92bdc6 (patch)
tree079b2070208e614e07602f5bbd07ef3fbef59890 /pkgs/applications/science/logic/tlaplus
parent769859fa95fd81af69747a39f78ae0848d707883 (diff)
tla-toolbox: 1.7.0 -> 1.7.1
* updates package version
* fixes #114741
* fixes TLC model check call
Diffstat (limited to 'pkgs/applications/science/logic/tlaplus')
-rw-r--r--pkgs/applications/science/logic/tlaplus/toolbox.nix26
1 files changed, 16 insertions, 10 deletions
diff --git a/pkgs/applications/science/logic/tlaplus/toolbox.nix b/pkgs/applications/science/logic/tlaplus/toolbox.nix
index da8985818e7b7..defe218b119eb 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 = [ ];
   };
 }