···1# - coqide compilation can be disabled by setting lablgtk to null;
00023-{ stdenv, make, fetchurl, ocaml, findlib, camlp5, ncurses, lablgtk ? null }:
45let
6 version = "8.3pl4";
···10 substituteInPlace scripts/coqmktop.ml --replace \
11 "\"-I\"; \"+lablgtk2\"" \
12 "\"-I\"; \"$(echo "${lablgtk}"/lib/ocaml/*/site-lib/lablgtk2)\"; \"-I\"; \"$(echo "${lablgtk}"/lib/ocaml/*/site-lib/stublibs)\""
000013 '' else "";
14in
15···44 substituteInPlace configure --replace "/bin/uname" "$UNAME"
45 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
46 ${idePatch}
047 '';
4849 # This post install step is needed to build ssrcoqide from the ssreflect package
···1# - coqide compilation can be disabled by setting lablgtk to null;
2+# - The csdp program used for the Micromega tactic is statically referenced.
3+# However, coq can build without csdp by setting it to null.
4+# In this case some Micromega tactics will search the user's path for the csdp program and will fail if it is not found.
56+{ stdenv, make, fetchurl, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null }:
78let
9 version = "8.3pl4";
···13 substituteInPlace scripts/coqmktop.ml --replace \
14 "\"-I\"; \"+lablgtk2\"" \
15 "\"-I\"; \"$(echo "${lablgtk}"/lib/ocaml/*/site-lib/lablgtk2)\"; \"-I\"; \"$(echo "${lablgtk}"/lib/ocaml/*/site-lib/stublibs)\""
16+ '' else "";
17+ csdpPatch = if csdp != null then ''
18+ substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
19+ substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.search_exe_in_path \"csdp\"" "Some \"${csdp}/bin/csdp\""
20 '' else "";
21in
22···51 substituteInPlace configure --replace "/bin/uname" "$UNAME"
52 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
53 ${idePatch}
54+ ${csdpPatch}
55 '';
5657 # This post install step is needed to build ssrcoqide from the ssreflect package
···1# - coqide compilation can be disabled by setting lablgtk to null;
2+# - The csdp program used for the Micromega tactic is statically referenced.
3+# However, coq can build without csdp by setting it to null.
4+# In this case some Micromega tactics will search the user's path for the csdp program and will fail if it is not found.
56+{stdenv, fetchurl, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}:
78let
9 version = "8.5b2";
10 coq-version = "8.5";
11 buildIde = lablgtk != null;
12 ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
13+ csdpPatch = if csdp != null then ''
14+ substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
15+ substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
16+ '' else "";
17in
1819stdenv.mkDerivation {
···35 substituteInPlace configure --replace "/bin/uname" "$UNAME"
36 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
37 substituteInPlace Makefile.build --replace "ifeq (\$(ARCH),Darwin)" "ifeq (\$(ARCH),Darwinx)"
38+ ${csdpPatch}
39 '';
4041 setupHook = writeText "setupHook.sh" ''
···1# - coqide compilation can be disabled by setting lablgtk to null;
2+# - The csdp program used for the Micromega tactic is statically referenced.
3+# However, coq can build without csdp by setting it to null.
4+# In this case some Micromega tactics will search the user's path for the csdp program and will fail if it is not found.
56+{stdenv, fetchgit, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}:
78let
9 version = "8.5pre-0c999f02";
10 coq-version = "8.5";
11 buildIde = lablgtk != null;
12 ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
13+ csdpPatch = if csdp != null then ''
14+ substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
15+ substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
16+ '' else "";
17in
1819stdenv.mkDerivation {
···38 substituteInPlace configure --replace "/bin/uname" "$UNAME"
39 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
40 substituteInPlace Makefile.build --replace "ifeq (\$(ARCH),Darwin)" "ifeq (\$(ARCH),Darwinx)"
41+ ${csdpPatch}
42 '';
4344 setupHook = writeText "setupHook.sh" ''
···1# - coqide compilation can be disabled by setting lablgtk to null;
2+# - The csdp program used for the Micromega tactic is statically referenced.
3+# However, coq can build without csdp by setting it to null.
4+# In this case some Micromega tactics will search the user's path for the csdp program and will fail if it is not found.
56+{stdenv, fetchurl, pkgconfig, writeText, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}:
78let
9 version = "8.4pl6";
10 coq-version = "8.4";
11 buildIde = lablgtk != null;
12 ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
13+ csdpPatch = if csdp != null then ''
14+ substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
15+ substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
16+ '' else "";
17in
1819stdenv.mkDerivation {
···36 RM=$(type -tp rm)
37 substituteInPlace configure --replace "/bin/uname" "$UNAME"
38 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
39+ ${csdpPatch}
40 '';
4142 preConfigure = ''