nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 coq,
3 mkCoqDerivation,
4 lib,
5 version ? null,
6}:
7
8let
9 derivation = mkCoqDerivation {
10
11 pname = "stdlib";
12 repo = "stdlib";
13 owner = "coq";
14 opam-name = "coq-stdlib";
15
16 inherit version;
17 defaultVersion =
18 let
19 case = case: out: { inherit case out; };
20 in
21 with lib.versions;
22 lib.switch coq.coq-version [
23 (case (isLe "9.1") "9.0.0")
24 # the < 9.0 above is artificial as stdlib was included in Coq before
25 ] null;
26 releaseRev = v: "V${v}";
27
28 release."9.0.0".sha256 = "sha256-2l7ak5Q/NbiNvUzIVXOniEneDXouBMNSSVFbD1Pf8cQ=";
29
30 configurePhase = ''
31 echo no configuration
32 '';
33 buildPhase = ''
34 echo building nothing
35 '';
36 installPhase = ''
37 echo installing nothing
38 # Make an output directory rather than a file, so this is more friendly to buildEnv
39 mkdir $out
40 '';
41
42 meta = {
43 description = "Compatibility metapackage for Coq Stdlib library after the Rocq renaming";
44 license = lib.licenses.lgpl21Only;
45 };
46 };
47in
48# this is just a wrapper for rocqPackages.stdlib for Rocq >= 9.0
49if coq.rocqPackages ? stdlib then
50 coq.rocqPackages.stdlib.override {
51 inherit version;
52 inherit (coq.rocqPackages) rocq-core;
53 }
54else
55 derivation