Change:
Not all the executables of the /contrib directory are patched, so some functionalities of the theorem prover fail. For instance, running the Sledgehammer tool (subwindow in the bottom bar of Isabelle starting window) always fail with: The directory: The sub directories marked with a star contain the x64 executables I tried to execute manually and I got: "Not such file or directory" Run Isabelle and try to use Sledgehammer. Then try to execute the executables in the marked directories, and you will obtain "Not such file or directory". System: 16.03.1171. (Emu) Nix version: nix-env (Nix) 1.11.2 Nixpkgs version: "16.03.1171." I am definitely new to NixOS, but with my nonexistent experience I think at least two solutions are available: 1) I can substitute the broken software with the packaged one, as it is done with Java and Polyml in the Isabelle2016 derivation; 2) I can patch the executables with patchelf (hopefully). I did not have time to try these so far, but I was wondering how difficult would be the 2nd: I think that using (1) can potentially break Isabelle since we would use different versions of the software in /contrib. You guys are amazing! Thanks a lot for NixOS!!! It is the most elegant OS I ever tried!
Hello, after some experimenting, I found a hack to make Isabelle work in Nixos Emu x64: this derivation substitutes the broken provers and rebuilds the exec-process executable. What I do not like of this solution: the provers are not the same (versions) of the Isabelle distribution, and this works only for x64 -- if you use a 32 bit you have just to change (take away the_64 bit from the target directory name) the derivation after the comment in the postPatch phase. However it works. Hopefully someone more expert than me can propose a better solution! Thanks again!!

Discussion:
<del> { stdenv, fetchurl, perl, nettools, java, polyml }: </del> <ins> { stdenv, fetchurl, perl, nettools, java, polyml, z3 }: </ins> # nettools needed for hostname let <del> dirname = "Isabelle2016"; theories = ["HOL" "FOL" "ZF"]; </del> <ins> dirname = "Isabelle2016-1"; </ins> in stdenv.mkDerivation { <del> name = "isabelle-2016"; inherit dirname theories; </del> <ins> name = "isabelle-2016-1"; inherit dirname; </ins> src = if stdenv.isDarwin then fetchurl { url = "http://isabelle.in.tum.de/website-${dirname}/dist/${dirname}.dmg"; <del> sha256 = "0wawf0cjc52h8hif1867p33qhlh6qz0fy5i2kr1gbf7psickd6iw"; </del> <ins> sha256 = "0553l7m2z32ajmiv6sgg11rh16n490w8i4q9hr7vx4zzggr9nrlr"; </ins> } else fetchurl { url = "http://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_linux.tar.gz"; <del> sha256 = "0jh1qrsyib13fycymwvw7dq7xfy4iyplwq0s65ash842cdzkbxb4"; </del> <ins> sha256 = "1w1cgfmmi1sr43z6hczyc29lxlnlz7dd8fa88ai44wkc13y05b5r"; </ins> }; <del> buildInputs = [ perl polyml ] </del> <ins> buildInputs = [ perl polyml z3 ] </ins> ++ stdenv.lib.optionals (!stdenv.isDarwin) [ nettools java ]; sourceRoot = dirname;

--replace '$POLYML_HOME/$PLATFORM/polyml' ${polyml}/bin/poly substituteInPlace lib/scripts/run-polyml* lib/scripts/polyml-version  --replace '$ML_HOME/poly' ${polyml}/bin/poly <del> ''; </del> <ins> substituteInPlace contrib/z3*/etc/settings  --replace '$Z3_HOME/z3' '${z3}/bin/z3' '' + (if ! stdenv.isLinux then "" else '' arch=${if stdenv.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"} for f in contrib/*/$arch/{bash_process,epclextract,eprover,nunchaku,SPASS}; do patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" done ''); </ins> installPhase = '' mkdir -p $out/bin