depot/third_party/nixpkgs/pkgs/applications/science/logic/tlaplus/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

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