lol

tests.coq.overrideCoqDerivation: add test

+48
+6
pkgs/test/coq/default.nix
··· 1 + { lib, callPackage }: 2 + 3 + lib.recurseIntoAttrs { 4 + overrideCoqDerivation = callPackage ./overrideCoqDerivation { }; 5 + } 6 +
+40
pkgs/test/coq/overrideCoqDerivation/default.nix
··· 1 + { lib, coq, mkCoqPackages, runCommandNoCC }: 2 + 3 + let 4 + 5 + # This is just coq, but with dontFilter set to true. We need to set 6 + # dontFilter to true here so that _all_ packages are visibile in coqPackages. 7 + # There may be some versions of the top-level coq and coqPackages that don't 8 + # build QuickChick, which is what we are using for this test below. 9 + coqWithAllPackages = coq // { dontFilter = true; }; 10 + 11 + coqPackages = mkCoqPackages coqWithAllPackages; 12 + 13 + # This is the main test. This uses overrideCoqDerivation to 14 + # override arguments to mkCoqDerivation. 15 + # 16 + # Here, we override the defaultVersion and release arguments to 17 + # mkCoqDerivation. 18 + overriddenQuickChick = 19 + coqPackages.lib.overrideCoqDerivation 20 + { 21 + defaultVersion = "9999"; 22 + release."9999".sha256 = lib.fakeSha256; 23 + } 24 + coqPackages.QuickChick; 25 + in 26 + 27 + runCommandNoCC 28 + "coq-overrideCoqDerivation-test-0.1" 29 + { meta.maintainers = with lib.maintainers; [cdepillabout]; } 30 + '' 31 + # Confirm that the computed version number for the overridden QuickChick does 32 + # actually become 9999, as set above. 33 + if [ "${overriddenQuickChick.version}" -eq "9999" ]; then 34 + echo "overriddenQuickChick version was successfully set to 9999" 35 + touch $out 36 + else 37 + echo "ERROR: overriddenQuickChick version was supposed to be 9999, but was actually: ${overriddenQuickChick.version}" 38 + exit 1 39 + fi 40 + ''
+2
pkgs/test/default.nix
··· 75 75 76 76 dhall = callPackage ./dhall { }; 77 77 78 + coq = callPackage ./coq {}; 79 + 78 80 makeWrapper = callPackage ./make-wrapper { }; 79 81 makeBinaryWrapper = callPackage ./make-binary-wrapper { 80 82 makeBinaryWrapper = pkgs.makeBinaryWrapper.override {