2019-03-14 10:43:06 +00:00
|
|
|
{ stdenv, fetchurl, perl, nettools, java, polyml, z3, rlwrap }:
|
2009-12-11 17:00:52 +00:00
|
|
|
# nettools needed for hostname
|
|
|
|
|
2019-03-12 13:30:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "isabelle";
|
|
|
|
version = "2018";
|
2009-12-11 17:00:52 +00:00
|
|
|
|
2019-03-12 13:30:52 +00:00
|
|
|
dirname = "Isabelle${version}";
|
2009-12-11 17:00:52 +00:00
|
|
|
|
2014-09-30 18:56:48 +01:00
|
|
|
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";
|
2014-09-30 18:56:48 +01:00
|
|
|
}
|
|
|
|
else fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_linux.tar.gz";
|
2019-03-12 13:30:52 +00:00
|
|
|
sha256 = "1928lwrw1v1p9s23kix30ncpqm8djmrnjixj82f3ni2a8sc3hrsp";
|
2014-09-30 18:56:48 +01:00
|
|
|
};
|
2009-12-11 17:00:52 +00:00
|
|
|
|
2017-01-11 22:24:23 +00:00
|
|
|
buildInputs = [ perl polyml z3 ]
|
2014-10-01 05:11:26 +01:00
|
|
|
++ stdenv.lib.optionals (!stdenv.isDarwin) [ nettools java ];
|
2009-12-11 17:00:52 +00:00
|
|
|
|
2013-06-07 01:13:54 +01:00
|
|
|
sourceRoot = dirname;
|
2009-12-11 17:00:52 +00:00
|
|
|
|
|
|
|
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 ''
|
2018-08-20 20:11:29 +01:00
|
|
|
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
|
|
|
|
'');
|
2009-12-11 17:00:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2013-06-07 01:13:54 +01:00
|
|
|
mv $TMP/$dirname $out
|
|
|
|
cd $out/$dirname
|
2014-09-30 18:56:48 +01:00
|
|
|
bin/isabelle install $out/bin
|
2009-12-11 17:00:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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";
|
2014-09-30 18:56:48 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.jwiegley ];
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2009-12-11 17:00:52 +00:00
|
|
|
};
|
|
|
|
}
|