about summary refs log tree commit diff
path: root/pkgs/applications/science/logic/tlaplus
diff options
context:
space:
mode:
authorFlorent C <florentc@users.noreply.github.com>2021-11-25 10:56:11 +0100
committerFlorent C <florentc@users.noreply.github.com>2021-11-25 10:56:11 +0100
commitb5d3526bab47eb008b2183438e22165da8cfb84e (patch)
treea5abe65a0bd5fe642f5d597fa981f11a850e185b /pkgs/applications/science/logic/tlaplus
parent3024611e45c99bb500dc2b7756cc47aeb213cbae (diff)
tlaplus: 1.7.0 -> 1.7.1
This updates tlaplus to the most recent stable version and directly
fetches the tlatools jar file from the official Github release page
instead of building from the sources. In the previous tlaplus nix
package, there was an issue with the tools when passing some command
line arguments such as `-workers 4` for TLC. A java string method was
not found and the program would not proceed correctly. This solves this
issue.
Diffstat (limited to 'pkgs/applications/science/logic/tlaplus')
-rw-r--r--pkgs/applications/science/logic/tlaplus/default.nix36
1 files changed, 16 insertions, 20 deletions
diff --git a/pkgs/applications/science/logic/tlaplus/default.nix b/pkgs/applications/science/logic/tlaplus/default.nix
index f002b808e0af1..7d447745a23d2 100644
--- a/pkgs/applications/science/logic/tlaplus/default.nix
+++ b/pkgs/applications/science/logic/tlaplus/default.nix
@@ -1,34 +1,30 @@
-{ lib, stdenv, fetchFromGitHub, makeWrapper
-, adoptopenjdk-bin, jre, ant
-}:
+{ lib, stdenv, fetchurl, makeWrapper, adoptopenjdk-bin, jre }:
 
 stdenv.mkDerivation rec {
   pname = "tlaplus";
-  version = "1.7.0";
+  version = "1.7.1";
 
-  src = fetchFromGitHub {
-    owner  = "tlaplus";
-    repo   = "tlaplus";
-    rev    = "refs/tags/v${version}";
-    sha256 = "1mm6r9bq79zks50yk0agcpdkw9yy994m38ibmgpb3bi3wkpq9891";
+  src = fetchurl {
+    url = "https://github.com/tlaplus/tlaplus/releases/download/v${version}/tla2tools.jar";
+    sha256 = "d532ba31aafe17afba1130f92410d9257454ff7393d1eb2fe032f0c07f352da5";
   };
 
   nativeBuildInputs = [ makeWrapper ];
-  buildInputs = [ adoptopenjdk-bin ant ];
+  buildInputs = [ adoptopenjdk-bin ];
 
-  buildPhase = "ant -f tlatools/org.lamport.tlatools/customBuild.xml compile dist";
+  dontUnpack = true;
   installPhase = ''
     mkdir -p $out/share/java $out/bin
-    cp tlatools/org.lamport.tlatools/dist/*.jar $out/share/java
+    cp $src $out/share/java/tla2tools.jar
 
-    makeWrapper ${jre}/bin/java $out/bin/tlc2 \
-      --add-flags "-cp $out/share/java/tla2tools.jar tlc2.TLC"
-    makeWrapper ${jre}/bin/java $out/bin/tla2sany \
-      --add-flags "-cp $out/share/java/tla2tools.jar tla2sany.SANY"
+    makeWrapper ${jre}/bin/java $out/bin/tlc \
+      --add-flags "-XX:+UseParallelGC -cp $out/share/java/tla2tools.jar tlc2.TLC"
+    makeWrapper ${jre}/bin/java $out/bin/tlasany \
+      --add-flags "-XX:+UseParallelGC -cp $out/share/java/tla2tools.jar tla2sany.SANY"
     makeWrapper ${jre}/bin/java $out/bin/pcal \
-      --add-flags "-cp $out/share/java/tla2tools.jar pcal.trans"
-    makeWrapper ${jre}/bin/java $out/bin/tla2tex \
-      --add-flags "-cp $out/share/java/tla2tools.jar tla2tex.TLA"
+      --add-flags "-XX:+UseParallelGC -cp $out/share/java/tla2tools.jar pcal.trans"
+    makeWrapper ${jre}/bin/java $out/bin/tlatex \
+      --add-flags "-XX:+UseParallelGC -cp $out/share/java/tla2tools.jar tla2tex.TLA"
   '';
 
   meta = {
@@ -36,6 +32,6 @@ stdenv.mkDerivation rec {
     homepage    = "http://lamport.azurewebsites.net/tla/tla.html";
     license     = lib.licenses.mit;
     platforms   = lib.platforms.unix;
-    maintainers = [ lib.maintainers.thoughtpolice ];
+    maintainers = with lib.maintainers; [ florentc thoughtpolice ];
   };
 }