diff options
Diffstat (limited to 'pkgs/applications/science/logic/coq/8.5.nix')
-rw-r--r-- | pkgs/applications/science/logic/coq/8.5.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/applications/science/logic/coq/8.5.nix b/pkgs/applications/science/logic/coq/8.5.nix index 87b476249f44..2afa18d40a4b 100644 --- a/pkgs/applications/science/logic/coq/8.5.nix +++ b/pkgs/applications/science/logic/coq/8.5.nix @@ -1,12 +1,19 @@ # - coqide compilation can be disabled by setting lablgtk to null; +# - The csdp program used for the Micromega tactic is statically referenced. +# However, coq can build without csdp by setting it to null. +# In this case some Micromega tactics will search the user's path for the csdp program and will fail if it is not found. -{stdenv, fetchurl, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null}: +{stdenv, fetchurl, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}: let version = "8.5b2"; coq-version = "8.5"; buildIde = lablgtk != null; ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else ""; + csdpPatch = if csdp != null then '' + substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp" + substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true" + '' else ""; in stdenv.mkDerivation { @@ -28,6 +35,7 @@ stdenv.mkDerivation { substituteInPlace configure --replace "/bin/uname" "$UNAME" substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM" substituteInPlace Makefile.build --replace "ifeq (\$(ARCH),Darwin)" "ifeq (\$(ARCH),Darwinx)" + ${csdpPatch} ''; setupHook = writeText "setupHook.sh" '' |