Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 14a9365952fc
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e338d801e207
Choose a head ref
  • 3 commits
  • 5 files changed
  • 1 contributor

Commits on Nov 4, 2018

  1. coqPackages.mathcomp: refactor

    vbgl committed Nov 4, 2018
    Copy the full SHA
    d2c38d1 View commit details
  2. coqPackages.ssreflect: refactor

    vbgl committed Nov 4, 2018
    Copy the full SHA
    b3f6840 View commit details
  3. Copy the full SHA
    e338d80 View commit details
46 changes: 41 additions & 5 deletions pkgs/development/coq-modules/mathcomp/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ callPackage, fetchurl, coq }:
{ stdenv, fetchurl, coq, ncurses, which
, graphviz, withDoc ? false
}:

let param =
let params =

let param_1_7 = {
version = "1.7.0";
@@ -16,14 +18,48 @@ let param =
"8.6" = param_1_7;
"8.7" = param_1_7;
"8.8" = param_1_7;
"8.9" = param_1_7;

}."${coq.coq-version}"
; in
};
param = params."${coq.coq-version}";
in

callPackage ./generic.nix {
stdenv.mkDerivation {
name = "coq${coq.coq-version}-mathcomp-${param.version}";

src = fetchurl {
url = "https://github.com/math-comp/math-comp/archive/mathcomp-${param.version}.tar.gz";
inherit (param) sha256;
};

nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
buildInputs = [ coq ncurses which ] ++ (with coq.ocamlPackages; [ ocaml findlib camlp5 ]);

enableParallelBuilding = true;

buildFlags = stdenv.lib.optionalString withDoc "doc";

preBuild = ''
patchShebangs etc/utils/ssrcoqdep || true
cd mathcomp
export COQBIN=${coq}/bin/
'';

installPhase = ''
make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install
'' + stdenv.lib.optionalString withDoc ''
make -f Makefile.coq install-doc DOCDIR=$out/share/coq/${coq.coq-version}/
'';

meta = with stdenv.lib; {
homepage = http://ssr.msr-inria.inria.fr/;
license = licenses.cecill-b;
maintainers = [ maintainers.vbgl maintainers.jwiegley ];
platforms = coq.meta.platforms;
};

passthru = {
compatibleCoqVersions = v: builtins.hasAttr v params;
};

}
42 changes: 0 additions & 42 deletions pkgs/development/coq-modules/mathcomp/generic.nix

This file was deleted.

47 changes: 42 additions & 5 deletions pkgs/development/coq-modules/ssreflect/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ callPackage, fetchurl, coq }:
{ stdenv, fetchurl, coq, ncurses, which
, graphviz, withDoc ? false
}:

let param =
let params =

let param_1_7 = {
version = "1.7.0";
@@ -16,14 +18,49 @@ let param =
"8.6" = param_1_7;
"8.7" = param_1_7;
"8.8" = param_1_7;
"8.9" = param_1_7;

}."${coq.coq-version}"
; in
};
param = params."${coq.coq-version}";
in

stdenv.mkDerivation {

callPackage ./generic.nix {
name = "coq${coq.coq-version}-ssreflect-${param.version}";
src = fetchurl {
url = "https://github.com/math-comp/math-comp/archive/mathcomp-${param.version}.tar.gz";
inherit (param) sha256;
};

nativeBuildInputs = stdenv.lib.optionals withDoc [ graphviz ];
buildInputs = [ coq ncurses which ] ++ (with coq.ocamlPackages; [ ocaml findlib camlp5 ]);

enableParallelBuilding = true;

preBuild = ''
patchShebangs etc/utils/ssrcoqdep || true
cd mathcomp/ssreflect
export COQBIN=${coq}/bin/
'';

installPhase = ''
make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install
'';

postInstall = stdenv.lib.optionalString withDoc ''
mkdir -p $out/share/doc/coq/${coq.coq-version}/user-contrib/mathcomp/ssreflect/
cp -r html $out/share/doc/coq/${coq.coq-version}/user-contrib/mathcomp/ssreflect/
'';

meta = with stdenv.lib; {
homepage = http://ssr.msr-inria.inria.fr/;
license = licenses.cecill-b;
maintainers = with maintainers; [ vbgl jwiegley ];
inherit (coq.meta) platforms;
};

passthru = {
compatibleCoqVersions = v: builtins.hasAttr v params;
};

}
49 changes: 0 additions & 49 deletions pkgs/development/coq-modules/ssreflect/generic.nix

This file was deleted.

11 changes: 10 additions & 1 deletion pkgs/top-level/coq-packages.nix
Original file line number Diff line number Diff line change
@@ -48,9 +48,18 @@ let

in rec {

/* The function `mkCoqPackages` takes as input a derivation for Coq and produces
* a set of libraries built with that specific Coq. More libraries are known to
* this function than what is compatible with that version of Coq. Therefore,
* libraries that are not known to be compatible are removed (filtered out) from
* the resulting set. For meta-programming purposes (inpecting the derivations
* rather than building the libraries) this filtering can be disabled by setting
* a `dontFilter` attribute into the Coq derivation.
*/
mkCoqPackages = coq:
let self = mkCoqPackages' self coq; in
filterCoqPackages coq self;
if coq.dontFilter or false then self
else filterCoqPackages coq self;

coq_8_5 = callPackage ../applications/science/logic/coq {
ocamlPackages = ocamlPackages_4_05;