1 {lib, stdenv, pkgs, fetchurl, graphviz, fontconfig, liberation_ttf,
2 experimentalKernel ? true}:
9 longVersion = "kananaskis-${vnum}";
10 holsubdir = "hol-${longVersion}";
11 kernelFlag = if experimentalKernel then "--expk" else "--stdknl";
13 polymlEnableShared = with pkgs; lib.overrideDerivation polyml (attrs: {
14 configureFlags = [ "--enable-shared" ];
19 name = "${pname}-${version}";
22 url = "mirror://sourceforge/hol/hol/${longVersion}/${holsubdir}.tar.gz";
23 sha256 = "6Mc/qsEjzxGqzt6yP6x/1Tmqpwc1UDGlwV1Gl+4pMsY=";
26 buildInputs = [polymlEnableShared graphviz fontconfig liberation_ttf];
30 mkdir chroot-fontconfig
31 cat ${fontconfig.out}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf
32 sed -e 's@</fontconfig>@@' -i chroot-fontconfig/fonts.conf
33 echo "<dir>${liberation_ttf}</dir>" >> chroot-fontconfig/fonts.conf
34 echo "</fontconfig>" >> chroot-fontconfig/fonts.conf
36 export FONTCONFIG_FILE=$(pwd)/chroot-fontconfig/fonts.conf
44 substituteInPlace tools/Holmake/Holmake_types.sml \
45 --replace "\"/bin/" "\"" \
48 for f in tools/buildutils.sml help/src-sml/DOT;
50 substituteInPlace $f --replace "\"/usr/bin/dot\"" "\"${graphviz}/bin/dot\""
53 #sed -ie "/compute/,999 d" tools/build-sequence # for testing
55 poly < tools/smart-configure.sml
57 bin/build ${kernelFlag}
60 ln -st $out/bin $out/src/${holsubdir}/bin/*
61 # ln -s $out/src/hol4.${version}/bin $out/bin
65 broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
66 description = "Interactive theorem prover based on Higher-Order Logic";
68 HOL4 is the latest version of the HOL interactive proof
69 assistant for higher order logic: a programming environment in
70 which theorems can be proved and proof tools
71 implemented. Built-in decision procedures and theorem provers
72 can automatically establish many simple theorems (users may have
73 to prove the hard theorems themselves!) An oracle mechanism
74 gives access to external programs such as SMT and BDD
75 engines. HOL4 is particularly suitable as a platform for
76 implementing combinations of deduction, execution and property
79 homepage = "http://hol.sourceforge.net/";
80 license = licenses.bsd3;
81 platforms = platforms.unix;
82 maintainers = with maintainers; [ mudri ];