From 5039b9d51174ea1dc6dbbaa3dc8572e1f4c68efb Mon Sep 17 00:00:00 2001 From: Jay Mundrawala Date: Wed, 22 Mar 2017 07:17:29 -0700 Subject: [PATCH] Added nix expression for TLAToolBox 1.5.2 --- .gitignore | 1 + default.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .gitignore create mode 100644 default.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2be92b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..d66d2c8 --- /dev/null +++ b/default.nix @@ -0,0 +1,33 @@ +{pkgs ? import {} }: +with pkgs; + +stdenv.mkDerivation rec { + name = "TLAToolBox-${version}"; + version = "1.5.2"; + + src = fetchurl { + url = "https://tla.msr-inria.inria.fr/tlatoolbox/products/TLAToolbox-1.5.2-linux.gtk.x86_64.zip"; + sha256 = "1xsqw34qy341mgfg57fcp0skm8rv4sqzi7qb442vn21nhhwmmxdk"; + }; + + buildInputs = [ patchelf unzip makeWrapper jre ]; + + unpackPhase = '' + unzip $src + ''; + + buildPhase = '' + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./toolbox/toolbox + ''; + + installPhase = '' + mkdir -p $out + cp -r toolbox/* $out + + wrapProgram $out/toolbox \ + --set JAVA_HOME "${jre}" \ + --prefix PATH : "${jre}/bin" \ + --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ gtk2 xorg.libXtst ]} + ''; + +}