coq: Add csdp dependency The csdp program is invoked for some uses of Micromega tactics.

authored by

Russell O'Connor and committed by
Russell O'Connor
4cc5f5db 772ec9ca

+36 -4
+9 -1
pkgs/applications/science/logic/coq/8.3.nix
··· 1 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. 2 5 3 - { stdenv, make, fetchurl, ocaml, findlib, camlp5, ncurses, lablgtk ? null }: 6 + { stdenv, make, fetchurl, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null }: 4 7 5 8 let 6 9 version = "8.3pl4"; ··· 10 13 substituteInPlace scripts/coqmktop.ml --replace \ 11 14 "\"-I\"; \"+lablgtk2\"" \ 12 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\"" 13 20 '' else ""; 14 21 in 15 22 ··· 44 51 substituteInPlace configure --replace "/bin/uname" "$UNAME" 45 52 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM" 46 53 ${idePatch} 54 + ${csdpPatch} 47 55 ''; 48 56 49 57 # This post install step is needed to build ssrcoqide from the ssreflect package
+9 -1
pkgs/applications/science/logic/coq/8.5.nix
··· 1 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. 2 5 3 - {stdenv, fetchurl, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null}: 6 + {stdenv, fetchurl, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}: 4 7 5 8 let 6 9 version = "8.5b2"; 7 10 coq-version = "8.5"; 8 11 buildIde = lablgtk != null; 9 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 ""; 10 17 in 11 18 12 19 stdenv.mkDerivation { ··· 28 35 substituteInPlace configure --replace "/bin/uname" "$UNAME" 29 36 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM" 30 37 substituteInPlace Makefile.build --replace "ifeq (\$(ARCH),Darwin)" "ifeq (\$(ARCH),Darwinx)" 38 + ${csdpPatch} 31 39 ''; 32 40 33 41 setupHook = writeText "setupHook.sh" ''
+9 -1
pkgs/applications/science/logic/coq/HEAD.nix
··· 1 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. 2 5 3 - {stdenv, fetchgit, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null}: 6 + {stdenv, fetchgit, writeText, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}: 4 7 5 8 let 6 9 version = "8.5pre-0c999f02"; 7 10 coq-version = "8.5"; 8 11 buildIde = lablgtk != null; 9 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 ""; 10 17 in 11 18 12 19 stdenv.mkDerivation { ··· 31 38 substituteInPlace configure --replace "/bin/uname" "$UNAME" 32 39 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM" 33 40 substituteInPlace Makefile.build --replace "ifeq (\$(ARCH),Darwin)" "ifeq (\$(ARCH),Darwinx)" 41 + ${csdpPatch} 34 42 ''; 35 43 36 44 setupHook = writeText "setupHook.sh" ''
+9 -1
pkgs/applications/science/logic/coq/default.nix
··· 1 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. 2 5 3 - {stdenv, fetchurl, pkgconfig, writeText, ocaml, findlib, camlp5, ncurses, lablgtk ? null}: 6 + {stdenv, fetchurl, pkgconfig, writeText, ocaml, findlib, camlp5, ncurses, lablgtk ? null, csdp ? null}: 4 7 5 8 let 6 9 version = "8.4pl6"; 7 10 coq-version = "8.4"; 8 11 buildIde = lablgtk != null; 9 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 ""; 10 17 in 11 18 12 19 stdenv.mkDerivation { ··· 29 36 RM=$(type -tp rm) 30 37 substituteInPlace configure --replace "/bin/uname" "$UNAME" 31 38 substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM" 39 + ${csdpPatch} 32 40 ''; 33 41 34 42 preConfigure = ''