2012-03-20 20:11:22 +01:00
|
|
|
{stdenv, fetchurl, polyml, experimentalKernel ? false}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "hol4";
|
|
|
|
version = "k.7";
|
|
|
|
kernelFlag = if experimentalKernel then "-expk" else "-stdknl";
|
|
|
|
in
|
2010-08-25 21:50:24 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2012-03-20 20:11:22 +01:00
|
|
|
name = "${pname}-${version}";
|
2010-08-25 21:50:24 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-03-20 20:11:22 +01:00
|
|
|
url = mirror://sourceforge/hol/hol/kananaskis-7/kananaskis-7.tar.gz;
|
|
|
|
sha256 = "0gs1nmjvsjhnndama9v7gids2g86iip53v7d7dm3sfq6jxmqkwkl";
|
2010-08-25 21:50:24 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [polyml];
|
|
|
|
|
|
|
|
buildCommand = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/src"
|
2010-08-25 21:50:24 +02:00
|
|
|
cd "$out/src"
|
|
|
|
|
|
|
|
tar -xzf "$src"
|
2012-03-20 20:11:22 +01:00
|
|
|
cd hol4.${version}
|
2010-08-25 21:50:24 +02:00
|
|
|
|
2012-03-20 20:11:22 +01:00
|
|
|
substituteInPlace tools/Holmake/Holmake_types.sml \
|
|
|
|
--replace "\"/bin/mv\"" "\"mv\"" \
|
|
|
|
--replace "\"/bin/cp\"" "\"cp\""
|
2010-08-25 21:50:24 +02:00
|
|
|
|
|
|
|
#sed -ie "/compute/,999 d" tools/build-sequence # for testing
|
|
|
|
|
|
|
|
poly < tools/smart-configure.sml
|
|
|
|
|
2012-03-20 20:11:22 +01:00
|
|
|
bin/build ${kernelFlag} -symlink
|
2010-08-25 21:50:24 +02:00
|
|
|
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/bin"
|
2012-03-20 20:11:22 +01:00
|
|
|
ln -st $out/bin $out/src/hol4.${version}/bin/*
|
|
|
|
# ln -s $out/src/hol4.${version}/bin $out/bin
|
2010-08-25 21:50:24 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Interactive theorem prover based on Higher-Order Logic";
|
2010-08-25 21:50:24 +02:00
|
|
|
longDescription = ''
|
|
|
|
HOL4 is the latest version of the HOL interactive proof
|
|
|
|
assistant for higher order logic: a programming environment in
|
|
|
|
which theorems can be proved and proof tools
|
|
|
|
implemented. Built-in decision procedures and theorem provers
|
|
|
|
can automatically establish many simple theorems (users may have
|
|
|
|
to prove the hard theorems themselves!) An oracle mechanism
|
|
|
|
gives access to external programs such as SMT and BDD
|
|
|
|
engines. HOL4 is particularly suitable as a platform for
|
|
|
|
implementing combinations of deduction, execution and property
|
|
|
|
checking.
|
|
|
|
'';
|
|
|
|
homepage = "http://hol.sourceforge.net/";
|
|
|
|
license = "BSD";
|
|
|
|
};
|
|
|
|
}
|