3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/logic/isabelle/default.nix

83 lines
2.3 KiB
Nix
Raw Normal View History

2019-03-14 10:43:06 +00:00
{ stdenv, fetchurl, perl, nettools, java, polyml, z3, rlwrap }:
# nettools needed for hostname
2019-03-12 13:30:52 +00:00
stdenv.mkDerivation rec {
pname = "isabelle";
version = "2018";
2019-03-12 13:30:52 +00:00
dirname = "Isabelle${version}";
src = if stdenv.isDarwin
then fetchurl {
2016-02-23 13:19:13 +00:00
url = "http://isabelle.in.tum.de/website-${dirname}/dist/${dirname}.dmg";
2019-03-12 13:30:52 +00:00
sha256 = "0jwnvsf5whklq14ihaxs7b9nbic94mm56nvxljrdbvl6y628j9r5";
}
else fetchurl {
url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_linux.tar.gz";
2019-03-12 13:30:52 +00:00
sha256 = "1928lwrw1v1p9s23kix30ncpqm8djmrnjixj82f3ni2a8sc3hrsp";
};
2017-01-11 22:24:23 +00:00
buildInputs = [ perl polyml z3 ]
++ stdenv.lib.optionals (!stdenv.isDarwin) [ nettools java ];
sourceRoot = dirname;
postPatch = ''
2019-03-14 10:43:06 +00:00
patchShebangs .
cat >contrib/z3*/etc/settings <<EOF
Z3_HOME=${z3}
Z3_VERSION=${z3.version}
Z3_SOLVER=${z3}/bin/z3
Z3_INSTALLED=yes
EOF
2017-10-10 10:18:22 +01:00
2019-03-12 13:30:52 +00:00
cat >contrib/polyml-*/etc/settings <<EOF
ML_SYSTEM_64=true
ML_SYSTEM=${polyml.name}
ML_PLATFORM=${stdenv.system}
ML_HOME=${polyml}/bin
ML_OPTIONS="--minheap 1000"
POLYML_HOME="\$COMPONENT"
ML_SOURCES="\$POLYML_HOME/src"
EOF
2019-03-14 10:43:06 +00:00
cat >contrib/jdk/etc/settings <<EOF
ISABELLE_JAVA_PLATFORM=${stdenv.system}
ISABELLE_JDK_HOME=${java}
EOF
echo ISABELLE_LINE_EDITOR=${rlwrap}/bin/rlwrap >>etc/settings
for comp in contrib/jdk contrib/polyml-* contrib/z3-*; do
2017-10-10 10:18:22 +01:00
rm -rf $comp/x86*
done
2017-01-11 22:24:23 +00:00
'' + (if ! stdenv.isLinux then "" else ''
arch=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"}
2017-01-11 22:24:23 +00:00
for f in contrib/*/$arch/{bash_process,epclextract,eprover,nunchaku,SPASS}; do
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f"
done
'');
installPhase = ''
mkdir -p $out/bin
mv $TMP/$dirname $out
cd $out/$dirname
bin/isabelle install $out/bin
'';
meta = {
description = "A generic proof assistant";
longDescription = ''
Isabelle is a generic proof assistant. It allows mathematical formulas
to be expressed in a formal language and provides tools for proving those
formulas in a logical calculus.
'';
homepage = http://isabelle.in.tum.de/;
license = "LGPL";
maintainers = [ stdenv.lib.maintainers.jwiegley ];
platforms = stdenv.lib.platforms.linux;
};
}