···11# - coqide compilation can be disabled by setting lablgtk to null;
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.
2533-{ stdenv, make, fetchurl, ocaml, findlib, camlp5, ncurses, lablgtk ? null }:
66+{ stdenv, make, fetchurl, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null }:
4758let
69 version = "8.3pl4";
···1013 substituteInPlace scripts/coqmktop.ml --replace \
1114 "\"-I\"; \"+lablgtk2\"" \
1215 "\"-I\"; \"$(echo "${lablgtk}"/lib/ocaml/*/site-lib/lablgtk2)\"; \"-I\"; \"$(echo "${lablgtk}"/lib/ocaml/*/site-lib/stublibs)\""
1616+ '' else "";
1717+ csdpPatch = if csdp != null then ''
1818+ substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
1919+ substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.search_exe_in_path \"csdp\"" "Some \"${csdp}/bin/csdp\""
1320 '' else "";
1421in
1522···4451 substituteInPlace configure --replace "/bin/uname" "$UNAME"
4552 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
4653 ${idePatch}
5454+ ${csdpPatch}
4755 '';
48564957 # This post install step is needed to build ssrcoqide from the ssreflect package
+9-1
pkgs/applications/science/logic/coq/8.5.nix
···11# - coqide compilation can be disabled by setting lablgtk to null;
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.
2533-{stdenv, fetchurl, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null}:
66+{stdenv, fetchurl, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}:
4758let
69 version = "8.5b2";
710 coq-version = "8.5";
811 buildIde = lablgtk != null;
912 ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
1313+ csdpPatch = if csdp != null then ''
1414+ substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
1515+ substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
1616+ '' else "";
1017in
11181219stdenv.mkDerivation {
···2835 substituteInPlace configure --replace "/bin/uname" "$UNAME"
2936 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
3037 substituteInPlace Makefile.build --replace "ifeq (\$(ARCH),Darwin)" "ifeq (\$(ARCH),Darwinx)"
3838+ ${csdpPatch}
3139 '';
32403341 setupHook = writeText "setupHook.sh" ''
+9-1
pkgs/applications/science/logic/coq/HEAD.nix
···11# - coqide compilation can be disabled by setting lablgtk to null;
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.
2533-{stdenv, fetchgit, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null}:
66+{stdenv, fetchgit, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}:
4758let
69 version = "8.5pre-0c999f02";
710 coq-version = "8.5";
811 buildIde = lablgtk != null;
912 ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
1313+ csdpPatch = if csdp != null then ''
1414+ substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
1515+ substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
1616+ '' else "";
1017in
11181219stdenv.mkDerivation {
···3138 substituteInPlace configure --replace "/bin/uname" "$UNAME"
3239 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
3340 substituteInPlace Makefile.build --replace "ifeq (\$(ARCH),Darwin)" "ifeq (\$(ARCH),Darwinx)"
4141+ ${csdpPatch}
3442 '';
35433644 setupHook = writeText "setupHook.sh" ''
+9-1
pkgs/applications/science/logic/coq/default.nix
···11# - coqide compilation can be disabled by setting lablgtk to null;
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.
2533-{stdenv, fetchurl, pkgconfig, writeText, ocaml, findlib, camlp5, ncurses, lablgtk ? null}:
66+{stdenv, fetchurl, pkgconfig, writeText, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}:
4758let
69 version = "8.4pl6";
710 coq-version = "8.4";
811 buildIde = lablgtk != null;
912 ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
1313+ csdpPatch = if csdp != null then ''
1414+ substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
1515+ substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
1616+ '' else "";
1017in
11181219stdenv.mkDerivation {
···2936 RM=$(type -tp rm)
3037 substituteInPlace configure --replace "/bin/uname" "$UNAME"
3138 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
3939+ ${csdpPatch}
3240 '';
33413442 preConfigure = ''