coqPackages: etc

- put `findlib` in `buildInputs` of `mkCoqDerivation` to make sure `coq` packages find their ocaml plugin dependencies,
- use `propagatedBuildInputs` to make sure ocaml plugin dependencies are in path,
- updated `coqPackage.heq` (broken url),
- fixed use of `DESTDIR` and `COQMF_COQLIB` in mkCoqDerivation,
- adding `COQCORELIB` environement variable to put ocaml plugin files in the right place,
- make `metaFetch` available from `coqPackages`

authored by Cyril Cohen and committed by Vincent Laporte d1136611 41a7a6ca

+131 -118
+10 -5
doc/languages-frameworks/coq.section.md
··· 29 29 * `releaseRev` (optional, defaults to `(v: v)`), provides a default mapping from release names to revision hashes/branch names/tags, 30 30 * `displayVersion` (optional), provides a way to alter the computation of `name` from `pname`, by explaining how to display version numbers, 31 31 * `namePrefix` (optional, defaults to `[ "coq" ]`), provides a way to alter the computation of `name` from `pname`, by explaining which dependencies must occur in `name`, 32 - * `extraNativeBuildInputs` (optional), by default `nativeBuildInputs` just contains `coq`, this allows to add more native build inputs, `nativeBuildInputs` are executables and `buildInputs` are libraries and dependencies, 33 - * `extraBuildInputs` (optional), this allows to add more build inputs, 34 - * `mlPlugin` (optional, defaults to `false`). Some extensions (plugins) might require OCaml and sometimes other OCaml packages. Standard dependencies can be added by setting the current option to `true`. For a finer grain control, the `coq.ocamlPackages` attribute can be used in `extraBuildInputs` to depend on the same package set Coq was built against. 35 - * `useDune2ifVersion` (optional, default to `(x: false)` uses Dune2 to build the package if the provided predicate evaluates to true on the version, e.g. `useDune2if = versions.isGe "1.1"` will use dune if the version of the package is greater or equal to `"1.1"`, 32 + * `nativeBuildInputs` (optional), is a list of executables that are required to build the current derivation, in addition to the default ones (namely `which`, `dune` and `ocaml` depending on whether `useDune2`, `useDune2ifVersion` and `mlPlugin` are set). 33 + * `extraNativeBuildInputs` (optional, deprecated), an additional list of derivation to add to `nativeBuildInputs`, 34 + * `overrideNativeBuildInputs` (optional) replaces the default list of derivation to which `nativeBuildInputs` and `extraNativeBuildInputs` adds extra elements, 35 + * `buildInputs` (optional), is a list of libraries and dependencies that are required to build and run the current derivation, in addition to the default one `[ coq ]`, 36 + * `extraBuildInputs` (optional, deprecated), an additional list of derivation to add to `buildInputs`, 37 + * `overrideBuildInputs` (optional) replaces the default list of derivation to which `buildInputs` and `extraBuildInputs` adds extras elements, 38 + * `propagatedBuildInputs` (optional) is passed as is to `mkDerivation`, we recommend to use this for Coq libraries and Coq plugin dependencies, as this makes sure the paths of the compiled libraries and plugins will always be added to the build environements of subsequent derivation, which is necessary for Coq packages to work correctly, 39 + * `mlPlugin` (optional, defaults to `false`). Some extensions (plugins) might require OCaml and sometimes other OCaml packages. Standard dependencies can be added by setting the current option to `true`. For a finer grain control, the `coq.ocamlPackages` attribute can be used in `nativeBuildInputs`, `buildInputs`, and `propagatedBuildInputs` to depend on the same package set Coq was built against. 40 + * `useDune2ifVersion` (optional, default to `(x: false)` uses Dune2 to build the package if the provided predicate evaluates to true on the version, e.g. `useDune2ifVersion = versions.isGe "1.1"` will use dune if the version of the package is greater or equal to `"1.1"`, 36 41 * `useDune2` (optional, defaults to `false`) uses Dune2 to build the package if set to true, the presence of this attribute overrides the behavior of the previous one. 37 42 * `opam-name` (optional, defaults to concatenating with a dash separator the components of `namePrefix` and `pname`), name of the Dune package to build. 38 43 * `enableParallelBuilding` (optional, defaults to `true`), since it is activated by default, we provide a way to disable it. 39 - * `extraInstallFlags` (optional), allows to extend `installFlags` which initializes the variable `COQMF_COQLIB` so as to install in the proper subdirectory. Indeed Coq libraries should be installed in `$(out)/lib/coq/${coq.coq-version}/user-contrib/`. Such directories are automatically added to the `$COQPATH` environment variable by the hook defined in the Coq derivation. 44 + * `extraInstallFlags` (optional), allows to extend `installFlags` which initializes the variables `DESTDIR` and `COQMF_COQLIB` so as to install in the proper subdirectory. Indeed Coq libraries should be installed in `$(out)/lib/coq/${coq.coq-version}/user-contrib/`. Such directories are automatically added to the `$COQPATH` environment variable by the hook defined in the Coq derivation. 40 45 * `setCOQBIN` (optional, defaults to `true`), by default, the environment variable `$COQBIN` is set to the current Coq's binary, but one can disable this behavior by setting it to `false`, 41 46 * `useMelquiondRemake` (optional, default to `null`) is an attribute set, which, if given, overloads the `preConfigurePhases`, `configureFlags`, `buildPhase`, and `installPhase` attributes of the derivation for a specific use in libraries using `remake` as set up by Guillaume Melquiond for `flocq`, `gappalib`, `interval`, and `coquelicot` (see the corresponding derivation for concrete examples of use of this option). For backward compatibility, the attribute `useMelquiondRemake.logpath` must be set to the logical root of the library (otherwise, one can pass `useMelquiondRemake = {}` to activate this without backward compatibility). 42 47 * `dropAttrs`, `keepAttrs`, `dropDerivationAttrs` are all optional and allow to tune which attribute is added or removed from the final call to `mkDerivation`.
+8 -5
pkgs/applications/science/logic/coq/default.nix
··· 70 70 { case = range "8.7" "8.10"; out = ocamlPackages_4_09; } 71 71 { case = range "8.5" "8.6"; out = ocamlPackages_4_05; } 72 72 ] ocamlPackages_4_12; 73 - ocamlNativeBuildInputs = [ ocamlPackages.ocaml ocamlPackages.findlib ] 74 - ++ optional (coqAtLeast "8.14") ocamlPackages.dune_2; 75 - ocamlBuildInputs = [] 73 + ocamlNativeBuildInputs = with ocamlPackages; [ ocaml findlib ] 74 + ++ optional (coqAtLeast "8.14") dune_2; 75 + ocamlPropagatedBuildInputs = [ ] 76 76 ++ optional (!coqAtLeast "8.10") ocamlPackages.camlp5 77 77 ++ optional (!coqAtLeast "8.13") ocamlPackages.num 78 78 ++ optional (coqAtLeast "8.13") ocamlPackages.zarith; ··· 82 82 83 83 passthru = { 84 84 inherit coq-version; 85 - inherit ocamlPackages ocamlBuildInputs ocamlNativeBuildInputs; 85 + inherit ocamlPackages ocamlNativeNuildInputs; 86 + inherit ocamlPropagatedBuildInputs ocamlPropagatedNativeBuildInputs; 86 87 # For compatibility 87 88 inherit (ocamlPackages) ocaml camlp5 findlib num ; 88 89 emacsBufferSetup = pkgs: '' ··· 136 137 ++ optional buildIde copyDesktopItems 137 138 ++ optional (buildIde && coqAtLeast "8.10") wrapGAppsHook 138 139 ++ optional (!coqAtLeast "8.6") gnumake42; 139 - buildInputs = [ ncurses ] ++ ocamlBuildInputs 140 + buildInputs = [ ncurses ] 140 141 ++ optionals buildIde 141 142 (if coqAtLeast "8.10" 142 143 then [ ocamlPackages.lablgtk3-sourceview3 glib gnome.adwaita-icon-theme ] 143 144 else [ ocamlPackages.lablgtk ]) 144 145 ; 146 + 147 + propagatedBuildInputs = ocamlPropagatedBuildInputs; 145 148 146 149 postPatch = '' 147 150 UNAME=$(type -tp uname)
+4 -3
pkgs/applications/science/logic/why3/default.nix
··· 21 21 # WebIDE 22 22 js_of_ocaml js_of_ocaml-ppx 23 23 # S-expression output for why3pp 24 - ppx_deriving ppx_sexp_conv 24 + ppx_deriving ppx_sexp_conv ] 25 + ++ 25 26 # Coq Support 26 - coqPackages.coq coqPackages.flocq 27 - ]; 27 + (with coqPackages; [ coq flocq ]) 28 + ; 28 29 29 30 propagatedBuildInputs = with ocamlPackages; [ camlzip menhirLib num re sexplib ]; 30 31
+27 -13
pkgs/build-support/coq/default.nix
··· 1 - { lib, stdenv, coqPackages, coq, fetchzip }@args: 1 + { lib, stdenv, coqPackages, coq, which, fetchzip }@args: 2 2 let lib = import ./extra-lib.nix {inherit (args) lib;}; in 3 3 with builtins; with lib; 4 4 let ··· 15 15 releaseRev ? (v: v), 16 16 displayVersion ? {}, 17 17 release ? {}, 18 + buildInputs ? [], 19 + nativeBuildInputs ? [], 18 20 extraBuildInputs ? [], 19 21 extraNativeBuildInputs ? [], 22 + overrideBuildInputs ? [], 23 + overrideNativeBuildInputs ? [], 20 24 namePrefix ? [ "coq" ], 21 25 enableParallelBuilding ? true, 22 26 extraInstallFlags ? [], ··· 35 39 args-to-remove = foldl (flip remove) ([ 36 40 "version" "fetcher" "repo" "owner" "domain" "releaseRev" 37 41 "displayVersion" "defaultVersion" "useMelquiondRemake" 38 - "release" "extraBuildInputs" "extraNativeBuildInputs" "extraPropagatedBuildInputs" "namePrefix" 42 + "release" 43 + "buildInputs" "nativeBuildInputs" 44 + "extraBuildInputs" "extraNativeBuildInputs" 45 + "overrideBuildInputs" "overrideNativeBuildInputs" 46 + "namePrefix" 39 47 "meta" "useDune2ifVersion" "useDune2" "opam-name" 40 48 "extraInstallFlags" "setCOQBIN" "mlPlugin" 41 49 "dropAttrs" "dropDerivationAttrs" "keepAttrs" ] ++ dropAttrs) keepAttrs; ··· 57 65 ] "") + optionalString (v == null) "-broken"; 58 66 append-version = p: n: p + display-pkg n "" coqPackages.${n}.version + "-"; 59 67 prefix-name = foldl append-version "" namePrefix; 60 - var-coqlib-install = 61 - (optionalString (versions.isGe "8.7" coq.coq-version || coq.coq-version == "dev") "COQMF_") + "COQLIB"; 62 68 useDune2 = args.useDune2 or (useDune2ifVersion fetched.version); 69 + coqlib-flags = switch coq.coq-version [ 70 + { case = v: versions.isLe "8.6" v && v != "dev" ; 71 + out = [ "COQLIB=$(out)/lib/coq/${coq.coq-version}/" ]; } 72 + ] [ "COQLIBINSTALL=$(out)/lib/coq/${coq.coq-version}/user-contrib" 73 + "COQPLUGININSTALL=$(OCAMLFIND_DESTDIR)" ]; 74 + docdir-flags = switch coq.coq-version [ 75 + { case = v: versions.isLe "8.6" v && v != "dev"; 76 + out = [ "DOCDIR=$(out)/share/coq/${coq.coq-version}/" ]; } 77 + ] [ "COQDOCINSTALL=$(out)/share/coq/${coq.coq-version}/user-contrib" ]; 63 78 in 64 79 65 80 stdenv.mkDerivation (removeAttrs ({ ··· 68 83 69 84 inherit (fetched) version src; 70 85 71 - nativeBuildInputs = [ coq ] 72 - ++ optionals useDune2 [coq.ocaml coq.ocamlPackages.dune_2] 73 - ++ optionals mlPlugin coq.ocamlNativeBuildInputs 74 - ++ extraNativeBuildInputs; 75 - buildInputs = optionals mlPlugin coq.ocamlBuildInputs 76 - ++ extraBuildInputs; 86 + nativeBuildInputs = args.overrideNativeBuildInputs 87 + or ([ which coq.ocamlPackages.findlib ] 88 + ++ optional useDune2 coq.ocamlPackages.dune_2 89 + ++ optional (useDune2 || mlPlugin) coq.ocaml 90 + ++ (args.nativeBuildInputs or []) ++ extraNativeBuildInputs); 91 + buildInputs = args.overrideBuildInputs 92 + or ([ coq ] ++ (args.buildInputs or []) ++ extraBuildInputs); 77 93 inherit enableParallelBuilding; 78 94 79 95 meta = ({ platforms = coq.meta.platforms; } // ··· 88 104 // (optionalAttrs setCOQBIN { COQBIN = "${coq}/bin/"; }) 89 105 // (optionalAttrs (!args?installPhase && !args?useMelquiondRemake) { 90 106 installFlags = 91 - [ "${var-coqlib-install}=$(out)/lib/coq/${coq.coq-version}/" ] ++ 92 - optional (match ".*doc$" (args.installTargets or "") != null) 93 - "DOCDIR=$(out)/share/coq/${coq.coq-version}/" ++ 107 + [ "DESTDIR=$(out)" ] ++ coqlib-flags ++ docdir-flags ++ 94 108 extraInstallFlags; 95 109 }) 96 110 // (optionalAttrs useDune2 {
+1 -1
pkgs/development/coq-modules/CoLoR/default.nix
··· 20 20 release."1.4.0".rev = "168c6b86c7d3f87ee51791f795a8828b1521589a"; 21 21 release."1.4.0".sha256 = "1d2whsgs3kcg5wgampd6yaqagcpmzhgb6a0hp6qn4lbimck5dfmm"; 22 22 23 - extraBuildInputs = [ bignums ]; 23 + propagatedBuildInputs = [ bignums ]; 24 24 enableParallelBuilding = false; 25 25 26 26 meta = {
+1 -1
pkgs/development/coq-modules/HoTT/default.nix
··· 8 8 release."20170921".rev = "e3557740a699167e6adb1a65855509d55a392fa1"; 9 9 release."20170921".sha256 = "0zwfp8g62b50vmmbb2kmskj3v6w7qx1pbf43yw0hr7asdz2zbx5v"; 10 10 11 - extraBuildInputs = [ autoconf automake ]; 11 + nativeBuildInputs = [ autoconf automake ]; 12 12 13 13 preConfigure = '' 14 14 patchShebangs ./autogen.sh
+1 -2
pkgs/development/coq-modules/QuickChick/default.nix
··· 36 36 "substituteInPlace Makefile --replace quickChickTool.byte quickChickTool.native"; 37 37 38 38 mlPlugin = true; 39 - extraNativeBuildInputs = lib.optional recent coq.ocamlPackages.ocamlbuild; 40 - extraBuildInputs = lib.optional recent coq.ocamlPackages.num; 39 + nativeBuildInputs = lib.optional recent coq.ocamlPackages.ocamlbuild; 41 40 propagatedBuildInputs = [ ssreflect ] 42 41 ++ lib.optionals recent [ coq-ext-lib simple-io ]; 43 42 extraInstallFlags = [ "-f Makefile.coq" ];
+1 -1
pkgs/development/coq-modules/VST/default.nix
··· 31 31 release."2.9".sha256 = "sha256:1adwzbl1pprrrwrm7cm493098fizxanxpv7nyfbvwdhgbhcnv6qf"; 32 32 release."2.8".sha256 = "sha256-cyK88uzorRfjapNQ6XgQEmlbWnDsiyLve5po1VG52q0="; 33 33 releaseRev = v: "v${v}"; 34 - extraBuildInputs = [ ITree ]; 34 + buildInputs = [ ITree ]; 35 35 propagatedBuildInputs = [ compcert ]; 36 36 37 37 preConfigure = ''
+1 -1
pkgs/development/coq-modules/bignums/default.nix
··· 5 5 owner = "coq"; 6 6 displayVersion = { bignums = ""; }; 7 7 inherit version; 8 - defaultVersion = if versions.isGe "8.5" coq.coq-version 8 + defaultVersion = if versions.isGe "8.6" coq.coq-version 9 9 then "${coq.coq-version}.0" else null; 10 10 11 11 release."8.15.0".sha256 = "093klwlhclgyrba1iv18dyz1qp5f0lwiaa7y0qwvgmai8rll5fns";
+9 -4
pkgs/development/coq-modules/compcert/default.nix
··· 1 - { lib, fetchzip, mkCoqDerivation, coq, flocq, compcert 1 + { lib, fetchzip, mkCoqDerivation 2 + , coq, flocq, compcert 2 3 , ocamlPackages, fetchpatch, makeWrapper, coq2html 3 4 , stdenv, tools ? stdenv.cc 4 5 , version ? null ··· 15 16 releaseRev = v: "v${v}"; 16 17 17 18 defaultVersion = with versions; switch coq.version [ 18 - { case = range "8.8" "8.11"; out = "3.8"; } 19 + { case = range "8.13" "8.15"; out = "3.10"; } 19 20 { case = isEq "8.12" ; out = "3.9"; } 20 - { case = range "8.12" "8.15"; out = "3.10"; } 21 + { case = range "8.8" "8.11"; out = "3.8"; } 21 22 ] null; 22 23 23 24 release = { ··· 48 49 ''; 49 50 50 51 installTargets = "documentation install"; 52 + installFlags = []; # trust ./configure 53 + preInstall = '' 54 + mkdir -p $out/share/man 55 + mkdir -p $man/share 56 + ''; 51 57 postInstall = '' 52 58 # move man into place 53 - mkdir -p $man/share 54 59 mv $out/share/man/ $man/share/ 55 60 56 61 # move docs into place
+8 -24
pkgs/development/coq-modules/coq-bits/default.nix
··· 1 - { lib, mkCoqDerivation, coq, mathcomp, version ? null }: 1 + { lib, mkCoqDerivation, coq, mathcomp-algebra, version ? null }: 2 2 3 3 with lib; mkCoqDerivation { 4 4 pname = "coq-bits"; 5 5 repo = "bits"; 6 6 inherit version; 7 - defaultVersion = 8 - if versions.isGe "8.10" coq.version 9 - then "1.1.0" 10 - else if versions.isGe "8.7" coq.version 11 - then "1.0.0" 12 - else null; 13 - 14 - release = { 15 - "1.0.0" = { 16 - rev = "1.0.0"; 17 - sha256 = "0nv5mdgrd075dpd8bc7h0xc5i95v0pkm0bfyq5rj6ii1s54dwcjl"; 18 - }; 19 - "1.1.0" = { 20 - rev = "1.1.0"; 21 - sha256 = "sha256-TCw1kSXeW0ysIdLeNr+EGmpGumEE9i8tinEMp57UXaE="; 22 - }; 23 - }; 7 + defaultVersion = with versions; switch coq.coq-version [ 8 + { case = isGe "8.10"; out = "1.1.0"; } 9 + { case = isGe "8.7"; out = "1.0.0"; } 10 + ] null; 24 11 25 - extraBuildInputs = [ mathcomp.ssreflect mathcomp.fingroup ]; 26 - propagatedBuildInputs = [ mathcomp.algebra ]; 12 + release."1.1.0".sha256 = "sha256-TCw1kSXeW0ysIdLeNr+EGmpGumEE9i8tinEMp57UXaE="; 13 + release."1.0.0".sha256 = "0nv5mdgrd075dpd8bc7h0xc5i95v0pkm0bfyq5rj6ii1s54dwcjl"; 27 14 28 - installPhase = '' 29 - make -f Makefile CoqMakefile 30 - make -f CoqMakefile COQLIB=$out/lib/coq/${coq.coq-version}/ install 31 - ''; 15 + propagatedBuildInputs = [ mathcomp-algebra ]; 32 16 33 17 meta = { 34 18 description = "A formalization of bitset operations in Coq";
+2 -2
pkgs/development/coq-modules/coq-elpi/default.nix
··· 7 7 { case = "8.13"; out = { version = "1.13.7"; };} 8 8 { case = "8.14"; out = { version = "1.13.7"; };} 9 9 { case = "8.15"; out = { version = "1.14.1"; };} 10 - ] {}); 10 + ] { version = "1.14.1"; } ); 11 11 in mkCoqDerivation { 12 12 pname = "elpi"; 13 13 repo = "coq-elpi"; ··· 48 48 release."1.6.0".sha256 = "0kf99i43mlf750fr7fric764mm495a53mg5kahnbp6zcjcxxrm0b"; 49 49 releaseRev = v: "v${v}"; 50 50 51 - extraNativeBuildInputs = [ which elpi ]; 52 51 mlPlugin = true; 52 + propagatedBuildInputs = [ elpi ]; 53 53 54 54 meta = { 55 55 description = "Coq plugin embedding ELPI.";
+1 -2
pkgs/development/coq-modules/coqeal/default.nix
··· 1 1 { coq, mkCoqDerivation, mathcomp, bignums, paramcoq, multinomials, 2 2 mathcomp-real-closed, 3 - lib, which, version ? null }: 3 + lib, version ? null }: 4 4 5 5 with lib; 6 6 ··· 22 22 release."1.0.4".sha256 = "1g5m26lr2lwxh6ld2gykailhay4d0ayql4bfh0aiwqpmmczmxipk"; 23 23 release."1.0.3".sha256 = "0hc63ny7phzbihy8l7wxjvn3haxx8jfnhi91iw8hkq8n29i23v24"; 24 24 25 - extraBuildInputs = [ which ]; 26 25 propagatedBuildInputs = [ mathcomp.algebra bignums paramcoq multinomials ]; 27 26 28 27 meta = {
+4 -2
pkgs/development/coq-modules/coqhammer/default.nix
··· 28 28 release."1.3-coq8.12".sha256 = "1q1y3cwhd98pkm98g71fsdjz85bfwgcz2xn7s7wwmiraifv5l6z8"; 29 29 release."1.3-coq8.11".sha256 = "08zf8qfna7b9p2myfaz4g7bas3a1q1156x78n5isqivlnqfrjc1b"; 30 30 release."1.3-coq8.10".sha256 = "1fj8497ir4m79hyrmmmmrag01001wrby0h24wv6525vz0w5py3cd"; 31 - release."1.1.1-coq8.9".sha256 = "1knjmz4hr8vlp103j8n4fyb2lfxysnm512gh3m2kp85n6as6fvb9"; 32 - release."1.1-coq8.8".sha256 = "0ms086wp4jmrzyglb8wymchzyflflk01nsfsk4r6qv8rrx81nx9h"; 31 + release."1.1.1-coq8.9" = { sha256 = "1knjmz4hr8vlp103j8n4fyb2lfxysnm512gh3m2kp85n6as6fvb9"; 32 + rev = "f8b4d81a213aa1f25afbe53c7c9ca1b15e3d42bc"; }; 33 + release."1.1-coq8.8" = { sha256 = "0ms086wp4jmrzyglb8wymchzyflflk01nsfsk4r6qv8rrx81nx9h"; 34 + rev = "c3cb54b4d5f33fab372d33c7189861368a08fa22"; }; 33 35 34 36 release."1.3.1-coq8.13".version = "1.3.1"; 35 37 release."1.3.1-coq8.12".version = "1.3.1";
-1
pkgs/development/coq-modules/coqprime/default.nix
··· 20 20 release."8.7.2".sha256 = "15zlcrx06qqxjy3nhh22wzy0rb4npc8l4nx2bbsfsvrisbq1qb7k"; 21 21 releaseRev = v: "v${v}"; 22 22 23 - extraBuildInputs = [ which ]; 24 23 propagatedBuildInputs = [ bignums ]; 25 24 26 25 meta = with lib; {
+1 -3
pkgs/development/coq-modules/coqtail-math/default.nix
··· 14 14 release."8.14".sha256 = "sha256:1k8f8idjnx0mf4z479vcx55iz42rjxrbplbznv80m2famxakq03c"; 15 15 release."20201124".rev = "5c22c3d7dcd8cf4c47cf84a281780f5915488e9e"; 16 16 release."20201124".sha256 = "sha256-wd+Lh7dpAD4zfpyKuztDmSFEZo5ZiFrR8ti2jUCVvoQ="; 17 - 18 - extraNativeBuildInputs = with coq.ocamlPackages; [ ocaml findlib ]; 19 - 17 + mlPlugin = true; 20 18 meta = { 21 19 license = licenses.lgpl3Only; 22 20 maintainers = [ maintainers.siraben ];
+2 -2
pkgs/development/coq-modules/coquelicot/default.nix
··· 1 - { lib, mkCoqDerivation, which, autoconf, 1 + { lib, mkCoqDerivation, autoconf, 2 2 coq, ssreflect, version ? null }: 3 3 4 4 with lib; mkCoqDerivation { ··· 16 16 release."3.0.2".sha256 = "1rqfbbskgz7b1bcpva8wh3v3456sq2364y804f94sc8y5sij23nl"; 17 17 releaseRev = v: "coquelicot-${v}"; 18 18 19 - extraNativeBuildInputs = [ which autoconf ]; 19 + nativeBuildInputs = [ autoconf ]; 20 20 propagatedBuildInputs = [ ssreflect ]; 21 21 useMelquiondRemake.logpath = "Coquelicot"; 22 22
+2 -2
pkgs/development/coq-modules/dpdgraph/default.nix
··· 39 39 release."0.6".sha256 = "0qvar8gfbrcs9fmvkph5asqz4l5fi63caykx3bsn8zf0xllkwv0n"; 40 40 releaseRev = v: "v${v}"; 41 41 42 - extraNativeBuildInputs = [ autoreconfHook ]; 42 + nativeBuildInputs = [ autoreconfHook ]; 43 43 mlPlugin = true; 44 - extraBuildInputs = [ coq.ocamlPackages.ocamlgraph ]; 44 + buildInputs = [ coq.ocamlPackages.ocamlgraph ]; 45 45 46 46 # dpd_compute.ml uses deprecated Pervasives.compare 47 47 # Versions prior to 0.6.5 do not have the WARN_ERR build flag
+2 -2
pkgs/development/coq-modules/fiat/HEAD.nix
··· 8 8 inherit version; 9 9 defaultVersion = if coq.coq-version == "8.5" then "2016-10-24" else null; 10 10 release."2016-10-24".rev = "7feb6c64be9ebcc05924ec58fe1463e73ec8206a"; 11 - release."2016-10-24".sha256 = "0griqc675yylf9rvadlfsabz41qy5f5idya30p5rv6ysiakxya64"; 11 + release."2016-10-24".sha256 = "16y57vibq3f5i5avgj80f4i3aw46wdwzx36k5d3pf3qk17qrlrdi"; 12 12 13 13 mlPlugin = true; 14 - extraBuildInputs = [ python27 ]; 14 + buildInputs = [ python27 ]; 15 15 16 16 prePatch = "patchShebangs etc/coq-scripts"; 17 17
+2 -2
pkgs/development/coq-modules/flocq/default.nix
··· 1 - { lib, which, autoconf, automake, 1 + { lib, bash, autoconf, automake, 2 2 mkCoqDerivation, coq, version ? null }: 3 3 4 4 with lib; mkCoqDerivation { ··· 16 16 release."2.6.1".sha256 = "0q5a038ww5dn72yvwn5298d3ridkcngb1dik8hdyr3xh7gr5qibj"; 17 17 releaseRev = v: "flocq-${v}"; 18 18 19 - nativeBuildInputs = [ which autoconf ]; 19 + nativeBuildInputs = [ bash autoconf ]; 20 20 mlPlugin = true; 21 21 useMelquiondRemake.logpath = "Flocq"; 22 22
+1 -1
pkgs/development/coq-modules/gappalib/default.nix
··· 13 13 release."1.4.4".sha256 = "114q2hgw64j6kqa9mg3qcp1nlf0ia46z2xadq81fnkxqm856ml7l"; 14 14 releaseRev = v: "gappalib-coq-${v}"; 15 15 16 - extraNativeBuildInputs = [ which autoconf ]; 16 + nativeBuildInputs = [ autoconf ]; 17 17 mlPlugin = true; 18 18 propagatedBuildInputs = [ flocq ]; 19 19 useMelquiondRemake.logpath = "Gappa";
+10 -6
pkgs/development/coq-modules/heq/default.nix
··· 1 1 {lib, fetchzip, mkCoqDerivation, coq, version ? null }: 2 2 3 + let fetcher = {rev, repo, owner, sha256, domain, ...}: 4 + fetchzip { 5 + url = "https://${domain}/${owner}/${repo}/download/${repo}-${rev}.zip"; 6 + inherit sha256; 7 + }; in 3 8 with lib; mkCoqDerivation { 4 9 pname = "heq"; 5 10 repo = "Heq"; 6 - owner = "gil"; 7 - domain = "mpi-sws.org"; 11 + owner = "gil.hur"; 12 + domain = "sf.snu.ac.kr"; 8 13 inherit version fetcher; 9 14 defaultVersion = if versions.isLt "8.8" coq.coq-version then "0.92" else null; 10 15 release."0.92".sha256 = "0cf8y6728n81wwlbpq3vi7l2dbzi7759klypld4gpsjjp1y1fj74"; 11 16 12 17 mlPlugin = true; 13 - propagatedBuildInputs = [ coq ]; 14 - 15 - extraInstallFlags = [ "COQLIB=$out/lib/coq/${coq.coq-version}" ]; 16 18 preBuild = "cd src"; 17 19 20 + extraInstallFlags = [ "COQLIB=$(out)/lib/coq/${coq.coq-version}/" ]; 21 + 18 22 meta = { 19 - homepage = "https://www.mpi-sws.org/~gil/Heq/"; 23 + homepage = "https://ropas.snu.ac.kr/~gil.hur/Heq/"; 20 24 description = "Heq : a Coq library for Heterogeneous Equality"; 21 25 maintainers = with maintainers; [ jwiegley ]; 22 26 };
+1 -4
pkgs/development/coq-modules/hierarchy-builder/default.nix
··· 1 - { lib, mkCoqDerivation, which, coq, coq-elpi, version ? null }: 1 + { lib, mkCoqDerivation, coq, coq-elpi, version ? null }: 2 2 3 3 with lib; let hb = mkCoqDerivation { 4 4 pname = "hierarchy-builder"; ··· 17 17 release."0.10.0".sha256 = "1a3vry9nzavrlrdlq3cys3f8kpq3bz447q8c4c7lh2qal61wb32h"; 18 18 releaseRev = v: "v${v}"; 19 19 20 - extraNativeBuildInputs = [ which ]; 21 - 22 20 propagatedBuildInputs = [ coq-elpi ]; 23 21 24 22 mlPlugin = true; 25 23 26 - installFlags = [ "DESTDIR=$(out)" "COQMF_COQLIB=lib/coq/${coq.coq-version}" ]; 27 24 extraInstallFlags = [ "VFILES=structures.v" ]; 28 25 29 26 meta = {
+5 -3
pkgs/development/coq-modules/interval/default.nix
··· 1 - { lib, mkCoqDerivation, which, autoconf, coq, coquelicot, flocq, mathcomp-ssreflect, mathcomp-fingroup, bignums ? null, gnuplot_qt, version ? null }: 1 + { lib, mkCoqDerivation, autoconf, coq, coquelicot, flocq, 2 + mathcomp-ssreflect, mathcomp-fingroup, bignums ? null, gnuplot_qt, version ? null }: 2 3 3 4 mkCoqDerivation rec { 4 5 pname = "interval"; ··· 20 21 release."3.3.0".sha256 = "0lz2hgggzn4cvklvm8rpaxvwaryf37i8mzqajqgdxdbd8f12acsz"; 21 22 releaseRev = v: "interval-${v}"; 22 23 23 - extraNativeBuildInputs = [ which autoconf ]; 24 - propagatedBuildInputs = [ bignums coquelicot flocq mathcomp-ssreflect mathcomp-fingroup ] 24 + nativeBuildInputs = [ autoconf ]; 25 + propagatedBuildInputs = lib.optional (lib.versions.isGe "8.6" coq.coq-version) bignums 26 + ++ [ coquelicot flocq mathcomp-ssreflect mathcomp-fingroup ] 25 27 ++ lib.optionals (lib.versions.isGe "4.2.0" defaultVersion) [ gnuplot_qt ]; 26 28 useMelquiondRemake.logpath = "Interval"; 27 29 mlPlugin = true;
+1 -1
pkgs/development/coq-modules/itauto/default.nix
··· 17 17 ] null; 18 18 19 19 mlPlugin = true; 20 - extraNativeBuildInputs = (with coq.ocamlPackages; [ ocamlbuild ]); 20 + nativeBuildInputs = (with coq.ocamlPackages; [ ocamlbuild ]); 21 21 enableParallelBuilding = false; 22 22 23 23 meta = {
-1
pkgs/development/coq-modules/ltac2/default.nix
··· 17 17 release."0.1-8.7".rev = "v0.1-8.7"; 18 18 release."0.1-8.7".sha256 = "0l6wiwi4cvd0i324fb29i9mdh0ijlxzggw4mrjjy695l2qdnlgg0"; 19 19 20 - nativeBuildInputs = [ which ]; 21 20 mlPlugin = true; 22 21 23 22 meta = {
+1 -1
pkgs/development/coq-modules/math-classes/default.nix
··· 9 9 release."8.13.0".sha256 = "1ln7ziivfbxzbdvlhbvyg3v30jgblncmwcsam6gg3d1zz6r7cbby"; 10 10 release."8.15.0".sha256 = "10w1hm537k6jx8a8vghq1yx12rsa0sjk2ipv3scgir71ln30hllw"; 11 11 12 - extraBuildInputs = [ bignums ]; 12 + propagatedBuildInputs = [ bignums ]; 13 13 14 14 meta = { 15 15 homepage = "https://math-classes.github.io";
+5 -4
pkgs/development/coq-modules/mathcomp/default.nix
··· 10 10 # See the documentation at doc/languages-frameworks/coq.section.md. # 11 11 ############################################################################ 12 12 13 - { lib, ncurses, which, graphviz, lua, fetchzip, 13 + { lib, ncurses, graphviz, lua, fetchzip, 14 14 mkCoqDerivation, recurseIntoAttrs, withDoc ? false, single ? false, 15 - coqPackages, coq, ocamlPackages, version ? null }@args: 15 + coqPackages, coq, version ? null }@args: 16 16 with builtins // lib; 17 17 let 18 18 repo = "math-comp"; ··· 60 60 inherit version pname defaultVersion release releaseRev repo owner; 61 61 62 62 mlPlugin = versions.isLe "8.6" coq.coq-version; 63 - extraNativeBuildInputs = [ which ] ++ optionals withDoc [ graphviz lua ]; 64 - extraBuildInputs = [ ncurses ] ++ mathcomp-deps; 63 + nativeBuildInputs = optionals withDoc [ graphviz lua ]; 64 + buildInputs = [ ncurses ]; 65 + propagatedBuildInputs = mathcomp-deps; 65 66 66 67 buildFlags = optional withDoc "doc"; 67 68
+2 -4
pkgs/development/coq-modules/metacoq/default.nix
··· 1 - { lib, which, fetchzip, 1 + { lib, fetchzip, 2 2 mkCoqDerivation, recurseIntoAttrs, single ? false, 3 3 coqPackages, coq, equations, version ? null }@args: 4 4 with builtins // lib; ··· 36 36 derivation = mkCoqDerivation ({ 37 37 inherit version pname defaultVersion release releaseRev repo owner; 38 38 39 - extraNativeBuildInputs = [ which ]; 40 39 mlPlugin = true; 41 - extraBuildInputs = [ coq.ocamlPackages.zarith ]; 42 - propagatedBuildInputs = [ equations ] ++ metacoq-deps; 40 + propagatedBuildInputs = [ equations coq.ocamlPackages.zarith ] ++ metacoq-deps; 43 41 44 42 patchPhase = '' 45 43 patchShebangs ./configure.sh
-1
pkgs/development/coq-modules/metalib/default.nix
··· 13 13 release."8.10".sha256 = "0wbypc05d2lqfm9qaw98ynr5yc1p0ipsvyc3bh1rk9nz7zwirmjs"; 14 14 15 15 sourceRoot = "source/Metalib"; 16 - installFlags = "COQMF_COQLIB=$(out)/lib/coq/${coq.coq-version}"; 17 16 18 17 meta = { 19 18 license = licenses.mit;
+2 -2
pkgs/development/coq-modules/semantics/default.nix
··· 24 24 ] null; 25 25 26 26 mlPlugin = true; 27 - extraNativeBuildInputs = (with coq.ocamlPackages; [ ocamlbuild ]); 28 - extraBuildInputs = (with coq.ocamlPackages; [ num ]); 27 + nativeBuildInputs = (with coq.ocamlPackages; [ ocamlbuild ]); 28 + propagatedBuildInputs = (with coq.ocamlPackages; [ num ]); 29 29 30 30 postPatch = '' 31 31 for p in Make Makefile.coq.local
+2 -4
pkgs/development/coq-modules/simple-io/default.nix
··· 11 11 ] null; 12 12 release."1.7.0".sha256 = "sha256:1a1q9x2abx71hqvjdai3n12jxzd49mhf3nqqh3ya2ssl2lj609ci"; 13 13 release."1.3.0".sha256 = "1yp7ca36jyl9kz35ghxig45x6cd0bny2bpmy058359p94wc617ax"; 14 - extraNativeBuildInputs = (with coq.ocamlPackages; [ cppo zarith ]); 15 - propagatedBuildInputs = [ coq-ext-lib ] 16 - ++ (with coq.ocamlPackages; [ ocaml ocamlbuild ]); 17 - 18 14 mlPlugin = true; 15 + nativeBuildInputs = [ coq.ocamlPackages.cppo ]; 16 + propagatedBuildInputs = [ coq-ext-lib coq.ocamlPackages.ocamlbuild ]; 19 17 20 18 doCheck = true; 21 19 checkTarget = "test";
+5 -3
pkgs/development/coq-modules/smtcoq/default.nix
··· 13 13 { case = isEq "8.13"; out = "itp22"; } 14 14 ] null; 15 15 16 - propagatedBuildInputs = [ trakt cvc4 ] ++ lib.optionals (!stdenv.isDarwin) [ veriT ]; 17 - extraNativeBuildInputs = with coq.ocamlPackages; [ ocaml ocamlbuild ]; 18 - extraBuildInputs = with coq.ocamlPackages; [ findlib num zarith ]; 16 + propagatedBuildInputs = [ trakt cvc4 ] 17 + ++ lib.optionals (!stdenv.isDarwin) [ veriT ] 18 + ++ (with coq.ocamlPackages; [ num zarith ]); 19 + mlPlugin = true; 20 + nativeBuildInputs = with coq.ocamlPackages; [ ocamlbuild ]; 19 21 20 22 meta = { 21 23 description = "Communication between Coq and SAT/SMT solvers ";
+5 -4
pkgs/development/ocaml-modules/elpi/default.nix
··· 1 - { stdenv, lib, fetchzip, buildDunePackage, camlp5 1 + { lib 2 + , buildDunePackage, camlp5 2 3 , re, perl, ncurses 3 4 , ppxlib, ppx_deriving 4 5 , ppxlib_0_15, ppx_deriving_0_15 6 + , coqPackages 5 7 , version ? "1.14.1" 6 8 }: 7 9 with lib; 8 - let fetched = import ../../../build-support/coq/meta-fetch/default.nix 9 - {inherit lib stdenv fetchzip; } ({ 10 + let fetched = coqPackages.metaFetch ({ 10 11 release."1.14.1".sha256 = "sha256-BZPVL8ymjrE9kVGyf6bpc+GA2spS5JBpkUtZi04nPis="; 11 12 release."1.13.7".sha256 = "10fnwz30bsvj7ii1vg4l1li5pd7n0qqmwj18snkdr5j9gk0apc1r"; 12 13 release."1.13.5".sha256 = "02a6r23mximrdvs6kgv6rp0r2dgk7zynbs99nn7lphw2c4189kka"; ··· 27 28 buildInputs = [ perl ncurses ]; 28 29 29 30 propagatedBuildInputs = [ camlp5 re ] 30 - ++ (if lib.versionAtLeast version "1.13" 31 + ++ (if lib.versionAtLeast version "1.13" || version == "dev" 31 32 then [ ppxlib ppx_deriving ] 32 33 else [ ppxlib_0_15 ppx_deriving_0_15 ] 33 34 );
+4 -1
pkgs/top-level/coq-packages.nix
··· 1 - { lib, stdenv, callPackage, newScope, recurseIntoAttrs, ocamlPackages_4_05, ocamlPackages_4_09 1 + { lib, stdenv, fetchzip 2 + , callPackage, newScope, recurseIntoAttrs, ocamlPackages_4_05, ocamlPackages_4_09 2 3 , ocamlPackages_4_10, ocamlPackages_4_12, fetchpatch, makeWrapper, coq2html 3 4 }@args: 4 5 let lib = import ../build-support/coq/extra-lib.nix {inherit (args) lib;}; in ··· 8 9 inherit coq lib; 9 10 coqPackages = self; 10 11 12 + metaFetch = import ../build-support/coq/meta-fetch/default.nix 13 + {inherit lib stdenv fetchzip; }; 11 14 mkCoqDerivation = callPackage ../build-support/coq {}; 12 15 13 16 contribs = recurseIntoAttrs