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.
This commit is contained in:
Florent C 2021-11-25 10:56:11 +01:00
parent 3024611e45
commit b5d3526bab

View File

@ -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 ];
};
}