1 { lib, coq, mkCoqPackages, runCommand }:
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; };
11 coqPackages = mkCoqPackages coqWithAllPackages;
13 # This is the main test. This uses overrideCoqDerivation to
14 # override arguments to mkCoqDerivation.
16 # Here, we override the defaultVersion and release arguments to
18 overriddenQuickChick =
19 coqPackages.lib.overrideCoqDerivation
21 defaultVersion = "9999";
22 release."9999".sha256 = lib.fakeSha256;
24 coqPackages.QuickChick;
28 "coq-overrideCoqDerivation-test-0.1"
29 { meta.maintainers = with lib.maintainers; [cdepillabout]; }
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"
37 echo "ERROR: overriddenQuickChick version was supposed to be 9999, but was actually: ${overriddenQuickChick.version}"