Merge pull request #177977 from thefloweringash/call-packages-with-function-args

lib/customization: propagate function arguments in callPackagesWith
This commit is contained in:
Artturi
2024-03-03 21:07:56 +02:00
committed by GitHub
2 changed files with 20 additions and 1 deletions

View File

@@ -55,6 +55,24 @@ runTests {
expected = { a = false; b = false; c = true; };
};
testCallPackageWithOverridePreservesArguments =
let
f = { a ? 0, b }: {};
f' = callPackageWith { a = 1; b = 2; } f {};
in {
expr = functionArgs f'.override;
expected = functionArgs f;
};
testCallPackagesWithOverridePreservesArguments =
let
f = { a ? 0, b }: { nested = {}; };
f' = callPackagesWith { a = 1; b = 2; } f {};
in {
expr = functionArgs f'.nested.override;
expected = functionArgs f;
};
# TRIVIAL
testId = {