Add setFunctionArgs lib function.
Among other things, this will allow *2nix tools to output plain data while still being composable with the traditional callPackage/.override interfaces.
This commit is contained in:
@@ -4,10 +4,10 @@ with lib;
|
||||
|
||||
let
|
||||
isConfig = x:
|
||||
builtins.isAttrs x || builtins.isFunction x;
|
||||
builtins.isAttrs x || lib.isFunction x;
|
||||
|
||||
optCall = f: x:
|
||||
if builtins.isFunction f
|
||||
if lib.isFunction f
|
||||
then f x
|
||||
else f;
|
||||
|
||||
@@ -38,7 +38,7 @@ let
|
||||
overlayType = mkOptionType {
|
||||
name = "nixpkgs-overlay";
|
||||
description = "nixpkgs overlay";
|
||||
check = builtins.isFunction;
|
||||
check = lib.isFunction;
|
||||
merge = lib.mergeOneOption;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user