git.iko.soy/typeable/nixpkgs
on master help sign in
coq_8_6: new package, based on Coq 8.6rc1
commit360234dab6b22d9f05821369a43c10b5faea3b79 authorJohn Wiegley <johnw@newartisans.com> dateTue 13 Dec 2016, 07:14 (10 years ago) parent6c226b1
2 files changed+115
pkgs/applications/science/logic/coq/8.6.nix+89 pkgs/top-level/all-packages.nix+26
pkgs/applications/science/logic/coq/8.6.nixnew file+89
@@ -0,0 +1,89 @@
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.
5+# - The patch-level version can be specified through the `pl` argument to
6+# the derivation; it defaults to the greatest.
7+
8+{ stdenv, fetchurl, writeText, pkgconfig
9+, ocaml, findlib, camlp5, ncurses
10+, lablgtk ? null, csdp ? null
11+, pl ? "1"
12+}:
13+
14+let
15+ version = "8.6rc${pl}";
16+ sha256 = {
17+ "1" = "0wral36h39q7g2sa2z8jvjc8ggqmqsjrbs0k299n0nykmmrq1pr8";
18+ }."${pl}";
19+ coq-version = "8.6";
20+ buildIde = lablgtk != null;
21+ ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
22+ csdpPatch = if csdp != null then ''
23+ substituteInPlace plugins/micromega/sos.ml --replace "; csdp" "; ${csdp}/bin/csdp"
24+ substituteInPlace plugins/micromega/coq_micromega.ml --replace "System.is_in_system_path \"csdp\"" "true"
25+ '' else "";
26+in
27+
28+stdenv.mkDerivation {
29+ name = "coq-${version}";
30+
31+ inherit coq-version;
32+ inherit ocaml camlp5;
33+
34+ src = fetchurl {
35+ url = "http://coq.inria.fr/distrib/V${version}/files/coq-${version}.tar.gz";
36+ inherit sha256;
37+ };
38+
39+ buildInputs = [ pkgconfig ocaml findlib camlp5 ncurses lablgtk ];
40+
41+ postPatch = ''
42+ UNAME=$(type -tp uname)
43+ RM=$(type -tp rm)
44+ substituteInPlace configure --replace "/bin/uname" "$UNAME"
45+ substituteInPlace tools/beautify-archive --replace "/bin/rm" "$RM"
46+ substituteInPlace configure.ml --replace '"md5 -q"' '"md5sum"'
47+ ${csdpPatch}
48+ '';
49+
50+ setupHook = writeText "setupHook.sh" ''
51+ addCoqPath () {
52+ if test -d "''$1/lib/coq/${coq-version}/user-contrib"; then
53+ export COQPATH="''${COQPATH}''${COQPATH:+:}''$1/lib/coq/${coq-version}/user-contrib/"
54+ fi
55+ }
56+
57+ envHooks=(''${envHooks[@]} addCoqPath)
58+ '';
59+
60+ preConfigure = ''
61+ configureFlagsArray=(
62+ -opt
63+ ${ideFlags}
64+ )
65+ '';
66+
67+ prefixKey = "-prefix ";
68+
69+ buildFlags = "revision coq coqide bin/votour";
70+
71+ postInstall = ''
72+ cp bin/votour $out/bin/
73+ '';
74+
75+ meta = with stdenv.lib; {
76+ description = "Coq proof assistant";
77+ longDescription = ''
78+ Coq is a formal proof management system. It provides a formal language
79+ to write mathematical definitions, executable algorithms and theorems
80+ together with an environment for semi-interactive development of
81+ machine-checked proofs.
82+ '';
83+ homepage = "http://coq.inria.fr";
84+ license = licenses.lgpl21;
85+ branch = coq-version;
86+ maintainers = with maintainers; [ roconnor thoughtpolice vbgl ];
87+ platforms = platforms.unix;
88+ };
89+}
pkgs/top-level/all-packages.nix+26
@@ -16682,6 +16682,11 @@ in
1668216682 camlp5 = ocamlPackages.camlp5_transitional;
1668316683 };
1668416684
16685+ coq_8_6 = callPackage ../applications/science/logic/coq/8.6.nix {
16686+ inherit (ocamlPackages) ocaml findlib lablgtk;
16687+ camlp5 = ocamlPackages.camlp5_transitional;
16688+ };
16689+
1668516690 coq_8_5 = callPackage ../applications/science/logic/coq/8.5.nix {
1668616691 inherit (ocamlPackages) ocaml findlib lablgtk;
1668716692 camlp5 = ocamlPackages.camlp5_transitional;
@@ -16765,8 +16770,29 @@ in
1676516770
1676616771 };
1676716772
16773+ mkCoqPackages_8_6 = self: let callPackage = newScope self; in rec {
16774+
16775+ inherit callPackage;
16776+
16777+ coq = coq_8_6;
16778+
16779+ coq-ext-lib = callPackage ../development/coq-modules/coq-ext-lib {};
16780+
16781+ coquelicot = callPackage ../development/coq-modules/coquelicot {};
16782+
16783+ dpdgraph = callPackage ../development/coq-modules/dpdgraph {};
16784+
16785+ flocq = callPackage ../development/coq-modules/flocq {};
16786+
16787+ interval = callPackage ../development/coq-modules/interval {};
16788+
16789+ fiat_HEAD = callPackage ../development/coq-modules/fiat/HEAD.nix {};
16790+
16791+ };
16792+
1676816793 coqPackages = mkCoqPackages_8_4 coqPackages;
1676916794 coqPackages_8_5 = mkCoqPackages_8_5 coqPackages_8_5;
16795+ coqPackages_8_6 = mkCoqPackages_8_6 coqPackages_8_6;
1677016796
1677116797 cryptoverif = callPackage ../applications/science/logic/cryptoverif { };
1677216798