2016-02-23 13:19:13 +00:00
|
|
|
{ stdenv, fetchurl, perl, nettools, java, polyml }:
|
2009-12-11 17:00:52 +00:00
|
|
|
# nettools needed for hostname
|
|
|
|
|
|
|
|
let
|
2016-02-23 13:19:13 +00:00
|
|
|
dirname = "Isabelle2016";
|
2009-12-11 17:00:52 +00:00
|
|
|
theories = ["HOL" "FOL" "ZF"];
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2016-02-23 13:19:13 +00:00
|
|
|
name = "isabelle-2016";
|
2013-06-07 01:13:54 +01:00
|
|
|
inherit dirname theories;
|
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";
|
|
|
|
sha256 = "0wawf0cjc52h8hif1867p33qhlh6qz0fy5i2kr1gbf7psickd6iw";
|
2014-09-30 18:56:48 +01:00
|
|
|
}
|
|
|
|
else fetchurl {
|
2016-02-23 13:19:13 +00:00
|
|
|
url = "http://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_linux.tar.gz";
|
|
|
|
sha256 = "0jh1qrsyib13fycymwvw7dq7xfy4iyplwq0s65ash842cdzkbxb4";
|
2014-09-30 18:56:48 +01:00
|
|
|
};
|
2009-12-11 17:00:52 +00:00
|
|
|
|
2014-09-30 18:56:48 +01:00
|
|
|
buildInputs = [ perl polyml ]
|
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 = ''
|
|
|
|
ENV=$(type -p env)
|
2015-01-08 09:26:49 +00:00
|
|
|
patchShebangs "."
|
2009-12-11 17:00:52 +00:00
|
|
|
substituteInPlace lib/Tools/env \
|
|
|
|
--replace /usr/bin/env $ENV
|
|
|
|
substituteInPlace lib/Tools/install \
|
|
|
|
--replace /usr/bin/env $ENV
|
2015-06-25 22:37:00 +01:00
|
|
|
sed -i 's|isabelle_java java|${java}/bin/java|g' lib/Tools/java
|
2009-12-11 17:00:52 +00:00
|
|
|
substituteInPlace etc/settings \
|
2016-02-23 13:19:13 +00:00
|
|
|
--subst-var-by ML_HOME "${polyml}/bin"
|
2014-10-01 05:11:26 +01:00
|
|
|
substituteInPlace contrib/jdk/etc/settings \
|
|
|
|
--replace ISABELLE_JDK_HOME= '#ISABELLE_JDK_HOME='
|
2015-06-25 22:37:00 +01:00
|
|
|
substituteInPlace contrib/polyml-*/etc/settings \
|
2016-02-23 13:19:13 +00:00
|
|
|
--replace '$POLYML_HOME/$ML_PLATFORM' ${polyml}/bin \
|
|
|
|
--replace '$POLYML_HOME/$PLATFORM/polyml' ${polyml}/bin/poly
|
|
|
|
substituteInPlace lib/scripts/run-polyml* lib/scripts/polyml-version \
|
|
|
|
--replace '$ML_HOME/poly' ${polyml}/bin/poly
|
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 ];
|
2009-12-11 17:00:52 +00:00
|
|
|
};
|
|
|
|
}
|