···6969 "<pkg>.overrideDerivation" to learn about `overrideDerivation` and caveats
7070 related to its use.
7171 */
7272- makeOverridable = f: origArgs:
7373- let
7272+ makeOverridable = f: lib.setFunctionArgs
7373+ (origArgs: let
7474 result = f origArgs;
75757676 # Creates a functor with the same arguments as f
···9595 lib.setFunctionArgs result (lib.functionArgs result) // {
9696 override = overrideArgs;
9797 }
9898- else result;
9898+ else result)
9999+ (lib.functionArgs f);
99100100101101102 /* Call the package function in the file `fn` with the required
+12
lib/tests/misc.nix
···43434444runTests {
45454646+# CUSTOMIZATION
4747+4848+ testFunctionArgsMakeOverridable = {
4949+ expr = functionArgs (makeOverridable ({ a, b, c ? null}: {}));
5050+ expected = { a = false; b = false; c = true; };
5151+ };
5252+5353+ testFunctionArgsMakeOverridableOverride = {
5454+ expr = functionArgs (makeOverridable ({ a, b, c ? null }: {}) { a = 1; b = 2; }).override;
5555+ expected = { a = false; b = false; c = true; };
5656+ };
5757+4658# TRIVIAL
47594860 testId = {