at master 1.2 kB view raw
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 touch $out 39 ''; 40 41 meta = { 42 description = "Compatibility metapackage for Coq Stdlib library after the Rocq renaming"; 43 license = lib.licenses.lgpl21Only; 44 }; 45 }; 46in 47# this is just a wrapper for rocqPackages.stdlib for Rocq >= 9.0 48if coq.rocqPackages ? stdlib then 49 coq.rocqPackages.stdlib.override { 50 inherit version; 51 inherit (coq.rocqPackages) rocq-core; 52 } 53else 54 derivation