nixpkgs/pkgs/applications/science/logic/hol_light/default.nix

51 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, runtimeShell, fetchFromGitHub, ocaml, num, camlp5 }:
let
load_num =
if num == null then "" else
''
-I ${num}/lib/ocaml/${ocaml.version}/site-lib/num \
-I ${num}/lib/ocaml/${ocaml.version}/site-lib/top-num \
-I ${num}/lib/ocaml/${ocaml.version}/site-lib/stublibs \
'';
start_script =
''
#!${runtimeShell}
cd $out/lib/hol_light
exec ${ocaml}/bin/ocaml \
-I \`${camlp5}/bin/camlp5 -where\` \
${load_num} \
-init make.ml
'';
in
2015-11-03 14:24:32 +00:00
stdenv.mkDerivation {
2019-03-30 15:29:33 +00:00
name = "hol_light-2019-03-27";
2015-11-03 14:24:32 +00:00
src = fetchFromGitHub {
owner = "jrh13";
repo = "hol-light";
2019-03-30 15:29:33 +00:00
rev = "a2b487b38d9da47350f1b4316e34a8fa4cf7a40a";
sha256 = "1qlidl15qi8w4si8wxcmj8yg2srsb0q4k1ad9yd91sgx9h9aq8fk";
};
buildInputs = [ ocaml camlp5 ];
propagatedBuildInputs = [ num ];
2016-11-29 18:30:15 +00:00
installPhase = ''
mkdir -p "$out/lib/hol_light" "$out/bin"
cp -a . $out/lib/hol_light
echo "${start_script}" > "$out/bin/hol_light"
chmod a+x "$out/bin/hol_light"
'';
meta = with stdenv.lib; {
description = "Interactive theorem prover based on Higher-Order Logic";
homepage = http://www.cl.cam.ac.uk/~jrh13/hol-light/;
license = licenses.bsd2;
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice z77z vbgl ];
};
}