2018-03-02 20:40:47 +00:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper
|
2020-05-06 20:26:10 +01:00
|
|
|
, adoptopenjdk-bin, jre, ant
|
2018-03-02 20:40:47 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "tlaplus";
|
2020-05-06 20:26:10 +01:00
|
|
|
version = "1.7.0";
|
2018-03-02 20:40:47 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tlaplus";
|
|
|
|
repo = "tlaplus";
|
|
|
|
rev = "refs/tags/v${version}";
|
2020-05-06 20:26:10 +01:00
|
|
|
sha256 = "1mm6r9bq79zks50yk0agcpdkw9yy994m38ibmgpb3bi3wkpq9891";
|
2018-03-02 20:40:47 +00:00
|
|
|
};
|
|
|
|
|
2020-05-06 20:26:10 +01:00
|
|
|
buildInputs = [ makeWrapper adoptopenjdk-bin ant ];
|
2018-03-02 20:40:47 +00:00
|
|
|
|
2020-05-06 20:26:10 +01:00
|
|
|
buildPhase = "ant -f tlatools/org.lamport.tlatools/customBuild.xml compile dist";
|
2018-03-02 20:40:47 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/java $out/bin
|
2020-05-06 20:26:10 +01:00
|
|
|
cp tlatools/org.lamport.tlatools/dist/*.jar $out/share/java
|
2018-03-02 20:40:47 +00:00
|
|
|
|
|
|
|
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/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"
|
|
|
|
'';
|
|
|
|
|
|
|
|
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";
|
2018-03-02 20:40:47 +00:00
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|