2021-11-25 09:56:11 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, adoptopenjdk-bin, jre }:
|
2018-03-02 20:40:47 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "tlaplus";
|
2022-02-13 10:33:51 +00:00
|
|
|
version = "1.7.2";
|
2018-03-02 20:40:47 +00:00
|
|
|
|
2021-11-25 09:56:11 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/tlaplus/tlaplus/releases/download/v${version}/tla2tools.jar";
|
2022-02-13 10:33:51 +00:00
|
|
|
sha256 = "sha256-+hhUPkTtWXSoW9LGDA3BZiCuEXaA6o5pPSaRmZ7ZCyI=";
|
2018-03-02 20:40:47 +00:00
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2021-11-25 09:56:11 +00:00
|
|
|
buildInputs = [ adoptopenjdk-bin ];
|
2018-03-02 20:40:47 +00:00
|
|
|
|
2021-11-25 09:56:11 +00:00
|
|
|
dontUnpack = true;
|
2018-03-02 20:40:47 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/java $out/bin
|
2021-11-25 09:56:11 +00:00
|
|
|
cp $src $out/share/java/tla2tools.jar
|
2018-03-02 20:40:47 +00:00
|
|
|
|
2021-11-25 09:56:11 +00:00
|
|
|
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"
|
2018-03-02 20:40:47 +00:00
|
|
|
makeWrapper ${jre}/bin/java $out/bin/pcal \
|
2021-11-25 09:56:11 +00:00
|
|
|
--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"
|
2018-03-02 20:40:47 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "An algorithm specification language with model checking tools";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://lamport.azurewebsites.net/tla/tla.html";
|
2022-06-02 14:38:41 +01:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.unix;
|
2021-11-25 09:56:11 +00:00
|
|
|
maintainers = with lib.maintainers; [ florentc thoughtpolice ];
|
2018-03-02 20:40:47 +00:00
|
|
|
};
|
|
|
|
}
|