diff options
Diffstat (limited to 'pkgs/applications/science/logic/isabelle/default.nix')
-rw-r--r-- | pkgs/applications/science/logic/isabelle/default.nix | 47 |
1 files changed, 32 insertions, 15 deletions
diff --git a/pkgs/applications/science/logic/isabelle/default.nix b/pkgs/applications/science/logic/isabelle/default.nix index 32d89d7e22aee..0f0410024251f 100644 --- a/pkgs/applications/science/logic/isabelle/default.nix +++ b/pkgs/applications/science/logic/isabelle/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, nettools, java, polyml, z3, veriT, vampire, eprover-ho, rlwrap, makeDesktopItem }: +{ lib, stdenv, fetchurl, coreutils, nettools, java, polyml, z3, veriT, vampire, eprover-ho, rlwrap, makeDesktopItem }: # nettools needed for hostname stdenv.mkDerivation rec { @@ -7,18 +7,22 @@ stdenv.mkDerivation rec { dirname = "Isabelle${version}"; - src = if stdenv.isDarwin - then fetchurl { - url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_macos.tar.gz"; - sha256 = "0n1ls9vwf0ps1x8zpb7c1xz1wkasgvc34h5bz280hy2z6iqwmwbc"; - } - else fetchurl { - url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_linux.tar.gz"; - sha256 = "0jfaqckhg388jh9b4msrpkv6wrd6xzlw18m0bngbby8k8ywalp9i"; - }; + src = + if stdenv.isDarwin + then + fetchurl + { + url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_macos.tar.gz"; + sha256 = "0n1ls9vwf0ps1x8zpb7c1xz1wkasgvc34h5bz280hy2z6iqwmwbc"; + } + else + fetchurl { + url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_linux.tar.gz"; + sha256 = "0jfaqckhg388jh9b4msrpkv6wrd6xzlw18m0bngbby8k8ywalp9i"; + }; buildInputs = [ polyml z3 veriT vampire eprover-ho ] - ++ lib.optionals (!stdenv.isDarwin) [ nettools java ]; + ++ lib.optionals (!stdenv.isDarwin) [ nettools java ]; sourceRoot = dirname; @@ -69,12 +73,25 @@ stdenv.mkDerivation rec { for comp in contrib/jdk* contrib/polyml-* contrib/z3-* contrib/verit-* contrib/vampire-* contrib/e-*; do rm -rf $comp/x86* done - '' + (if ! stdenv.isLinux then "" else '' + + substituteInPlace lib/Tools/env \ + --replace /usr/bin/env ${coreutils}/bin/env + + rm -r heaps + '' + (if ! stdenv.isLinux then "" else '' arch=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"} - for f in contrib/*/$arch/{bash_process,epclextract,nunchaku,SPASS}; do + for f in contrib/*/$arch/{bash_process,epclextract,nunchaku,SPASS,zipperposition}; do patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" done - ''); + for d in contrib/kodkodi-*/jni/$arch; do + patchelf --set-rpath "${lib.concatStringsSep ":" [ "${java}/lib/openjdk/lib/server" "${stdenv.cc.cc.lib}/lib" ]}" $d/*.so + done + ''); + + buildPhase = '' + export HOME=$TMP # The build fails if home is not set + bin/isabelle build -v -o system_heaps -b HOL + ''; installPhase = '' mkdir -p $out/bin @@ -110,7 +127,7 @@ stdenv.mkDerivation rec { ''; homepage = "https://isabelle.in.tum.de/"; license = licenses.bsd3; - maintainers = [ maintainers.jwiegley ]; + maintainers = [ maintainers.jwiegley maintainers.jvanbruegge ]; platforms = platforms.linux; }; } |