Skip to content

Commit

Permalink
Added nix expression for TLAToolBox 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jaym committed Mar 22, 2017
0 parents commit 5039b9d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
result
33 changes: 33 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{pkgs ? import <nixpkgs> {} }:
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 ]}
'';

}

0 comments on commit 5039b9d

Please sign in to comment.