@@ -2,11 +2,22 @@
22# - The csdp program used for the Micromega tactic is statically referenced.
33# However, coq can build without csdp by setting it to null.
44# In this case some Micromega tactics will search the user's path for the csdp program and will fail if it is not found.
5+# - The patch-level version can be specified through the `pl` argument to
6+# the derivation; it defaults to the greatest.
57
6−{stdenv, fetchurl, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}:
8+{ stdenv, fetchurl, writeText, pkgconfig
9+, ocaml, findlib, camlp5, ncurses
10+, lablgtk ? null, csdp ? null
11+, pl ? "3"
12+}:
713
814let
9− version = "8.5pl2";
15+ version = "8.5pl${pl}";
16+ sha256 = {
17+ "1" = "1w2xvm6w16khfn63bp95s25hnkn2ny3w0yqg3lq63gp11aqpbyjb";
18+ "2" = "0wyywia0darak2zmc5v0ra9rn0b9whwdfiahralm8v5za499s8w3";
19+ "3" = "0fyk2a4fpifibq8y8jhx1891k55qnsnlygglch64sva0bph94nrh";
20+ }."${pl}";
1021 coq-version = "8.5";
1122 buildIde = lablgtk != null;
1223 ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
@@ -24,7 +35,7 @@ stdenv.mkDerivation {
2435
2536 src = fetchurl {
2637 url = "http://coq.inria.fr/distrib/V${version}/files/coq-${version}.tar.gz";
27− sha256 = "0wyywia0darak2zmc5v0ra9rn0b9whwdfiahralm8v5za499s8w3";
38+ inherit sha256;
2839 };
2940
3041 buildInputs = [ pkgconfig ocaml findlib camlp5 ncurses lablgtk ];
@@ -34,7 +45,7 @@ stdenv.mkDerivation {
3445 RM=$(type -tp rm)
3546 substituteInPlace configure --replace "/bin/uname" "$UNAME"
3647 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
37− substituteInPlace configure.ml --replace "if arch = \"Darwin\" || arch = \"FreeBSD\" then \"md5" "if arch = \"Darwinx\" then \"md5"
48+ substituteInPlace configure.ml --replace '"md5 -q"' '"md5sum"'
3849 ${csdpPatch}
3950 '';
4051
@@ -57,7 +68,11 @@ stdenv.mkDerivation {
5768
5869 prefixKey = "-prefix ";
5970
60− buildFlags = "revision coq coqide";
71+ buildFlags = "revision coq coqide bin/votour";
72+
73+ postInstall = ''
74+ cp bin/votour $out/bin/
75+ '';
6176
6277 meta = with stdenv.lib; {
6378 description = "Coq proof assistant";