From 9269d5823d1b8ef09d2fe042d34716b294f6bcd2 Mon Sep 17 00:00:00 2001 From: Michael Gregson Date: Sat, 6 Aug 2022 20:01:35 -0600 Subject: [PATCH] tlaplus18: init at 1.8.0 This is a pre-release of version 1.8 of TLA+. It adds, among other things, a TLA+ REPL. Release Notes: https://github.com/tlaplus/tlaplus/releases/tag/v1.8.0 --- .../science/logic/tlaplus/tlaplus18.nix | 39 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/applications/science/logic/tlaplus/tlaplus18.nix diff --git a/pkgs/applications/science/logic/tlaplus/tlaplus18.nix b/pkgs/applications/science/logic/tlaplus/tlaplus18.nix new file mode 100644 index 000000000000..4f34846a8927 --- /dev/null +++ b/pkgs/applications/science/logic/tlaplus/tlaplus18.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchurl, makeWrapper, jre }: + +stdenv.mkDerivation rec { + pname = "tlaplus"; + version = "1.8.0"; + + src = fetchurl { + url = "https://github.com/tlaplus/tlaplus/releases/download/v${version}/tla2tools.jar"; + sha256 = "sha256-OXgpd1xuyvhveunlybBi/N6jnxtp/J8Kmp8PYX3eSZ4="; + }; + + nativeBuildInputs = [ makeWrapper ]; + + 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" + makeWrapper ${jre}/bin/java $out/bin/tlarepl \ + --add-flags "-XX:+UseParallelGC -cp $out/share/java/tla2tools.jar tlc2.REPL" + ''; + + meta = { + description = "An algorithm specification language with model checking tools"; + homepage = "http://lamport.azurewebsites.net/tla/tla.html"; + sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; + license = lib.licenses.mit; + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ florentc thoughtpolice mgregson ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fdeaa125e6f7..410e06ab5e67 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -38741,6 +38741,7 @@ with pkgs; tlaplus = callPackage ../applications/science/logic/tlaplus { jre = jre8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731 }; + tlaplus18 = callPackage ../applications/science/logic/tlaplus/tlaplus18.nix {}; tlaps = callPackage ../applications/science/logic/tlaplus/tlaps.nix { inherit (ocaml-ng.ocamlPackages_4_14_unsafe_string) ocaml; };