diff options
author | Shea Levy <shea@shealevy.com> | 2018-01-31 14:02:19 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-01-31 14:02:19 -0500 |
commit | 943592f69850fd07dd2422da062b1c1ebc45974d (patch) | |
tree | 3376a06cd3ab25a1622c8f320573ab09b55a9470 /pkgs/development/beam-modules/lib.nix | |
parent | 0d7a0d7572d35526ddf34b6d011b7b88a8904b36 (diff) | |
download | nixpkgs-943592f69850fd07dd2422da062b1c1ebc45974d.tar nixpkgs-943592f69850fd07dd2422da062b1c1ebc45974d.tar.gz nixpkgs-943592f69850fd07dd2422da062b1c1ebc45974d.tar.bz2 nixpkgs-943592f69850fd07dd2422da062b1c1ebc45974d.tar.lz nixpkgs-943592f69850fd07dd2422da062b1c1ebc45974d.tar.xz nixpkgs-943592f69850fd07dd2422da062b1c1ebc45974d.tar.zst nixpkgs-943592f69850fd07dd2422da062b1c1ebc45974d.zip |
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.
Diffstat (limited to 'pkgs/development/beam-modules/lib.nix')
-rw-r--r-- | pkgs/development/beam-modules/lib.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/beam-modules/lib.nix b/pkgs/development/beam-modules/lib.nix index 26d868a8e7c..d6b83cb1af0 100644 --- a/pkgs/development/beam-modules/lib.nix +++ b/pkgs/development/beam-modules/lib.nix @@ -6,8 +6,8 @@ rec { */ callPackageWith = autoArgs: fn: args: let - f = if builtins.isFunction fn then fn else import fn; - auto = builtins.intersectAttrs (builtins.functionArgs f) autoArgs; + f = if pkgs.lib.isFunction fn then fn else import fn; + auto = builtins.intersectAttrs (stdenv.lib.functionArgs f) autoArgs; in f (auto // args); callPackage = callPackageWith pkgs; |