Last active
March 17, 2018 05:21
-
-
Save mbbx6spp/82ecfd8245bb9b8b8babe3a4afe11551 to your computer and use it in GitHub Desktop.
nixpkgs ships with a tlaplus package which contains some standalone tools like tla2tex and tla2any etc but for the entire IDE I had to come up with my own package. I haven't submitted it upstream yet as the layout of the package dir is entirely wrong so I need to work on that first but it works for far.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchurl, gtk2, xorg, patchelf, unzip, makeWrapper, jre }: | |
let version = "1.5.6"; in | |
stdenv.mkDerivation rec { | |
inherit version; | |
name = "TLAToolBox-${version}"; | |
src = fetchurl { | |
url = "https://tla.msr-inria.inria.fr/tlatoolbox/products/TLAToolbox-${version}-linux.gtk.x86_64.zip"; | |
sha256 = "1b5sf4d7sv0x1hg4f1if3q7wzsi09dr8fv71qfagj8m25zrh3lvj"; | |
}; | |
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/bin | |
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 ]} | |
ln -s $out/toolbox $out/bin/tlatoolkit | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment