mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
lib.makeOverridable: fix functionArgs on returned function
This commit is contained in:
parent
f6caf65a4a
commit
0a10279342
2 changed files with 16 additions and 3 deletions
|
@ -69,8 +69,8 @@ rec {
|
|||
"<pkg>.overrideDerivation" to learn about `overrideDerivation` and caveats
|
||||
related to its use.
|
||||
*/
|
||||
makeOverridable = f: origArgs:
|
||||
let
|
||||
makeOverridable = f: lib.setFunctionArgs
|
||||
(origArgs: let
|
||||
result = f origArgs;
|
||||
|
||||
# Creates a functor with the same arguments as f
|
||||
|
@ -95,7 +95,8 @@ rec {
|
|||
lib.setFunctionArgs result (lib.functionArgs result) // {
|
||||
override = overrideArgs;
|
||||
}
|
||||
else result;
|
||||
else result)
|
||||
(lib.functionArgs f);
|
||||
|
||||
|
||||
/* Call the package function in the file `fn` with the required
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue