Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

44 lines
1.4 KiB
Nix

{
lib,
coq,
mkCoqPackages,
runCommand,
}:
let
# This is just coq, but with dontFilter set to true. We need to set
# dontFilter to true here so that _all_ packages are visible in coqPackages.
# There may be some versions of the top-level coq and coqPackages that don't
# build QuickChick, which is what we are using for this test below.
coqWithAllPackages = coq // {
dontFilter = true;
};
coqPackages = mkCoqPackages coqWithAllPackages;
# This is the main test. This uses overrideCoqDerivation to
# override arguments to mkCoqDerivation.
#
# Here, we override the defaultVersion and release arguments to
# mkCoqDerivation.
overriddenQuickChick = coqPackages.lib.overrideCoqDerivation {
defaultVersion = "9999";
release."9999".sha256 = lib.fakeSha256;
} coqPackages.QuickChick;
in
runCommand "coq-overrideCoqDerivation-test-0.1"
{ meta.maintainers = with lib.maintainers; [ cdepillabout ]; }
''
# Confirm that the computed version number for the overridden QuickChick does
# actually become 9999, as set above.
if [ "${overriddenQuickChick.version}" -eq "9999" ]; then
echo "overriddenQuickChick version was successfully set to 9999"
touch $out
else
echo "ERROR: overriddenQuickChick version was supposed to be 9999, but was actually: ${overriddenQuickChick.version}"
exit 1
fi
''