3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/logic/tlaplus/default.nix
Florent C b5d3526bab 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.
2021-11-25 10:56:11 +01:00

38 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl, makeWrapper, adoptopenjdk-bin, jre }:
stdenv.mkDerivation rec {
pname = "tlaplus";
version = "1.7.1";
src = fetchurl {
url = "https://github.com/tlaplus/tlaplus/releases/download/v${version}/tla2tools.jar";
sha256 = "d532ba31aafe17afba1130f92410d9257454ff7393d1eb2fe032f0c07f352da5";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ adoptopenjdk-bin ];
dontUnpack = true;
installPhase = ''
mkdir -p $out/share/java $out/bin
cp $src $out/share/java/tla2tools.jar
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 "-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 = {
description = "An algorithm specification language with model checking tools";
homepage = "http://lamport.azurewebsites.net/tla/tla.html";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ florentc thoughtpolice ];
};
}