Merge pull request #67 from nix-community/call-package
make deprecated callPackage api a evaluation failure
This commit is contained in:
commit
355dfd0b83
1 changed files with 2 additions and 3 deletions
|
|
@ -27,8 +27,7 @@ let
|
|||
# True if not all arguments are either passed by default (e.g. pkgs) or defaulted (e.g. foo ? 10)
|
||||
usesCallPackage = ! lib.all (arg: lib.elem arg (lib.attrNames passedArgs) || args.${arg}) (lib.attrNames args);
|
||||
|
||||
in if usesCallPackage then lib.warn ''
|
||||
in if usesCallPackage then throw ''
|
||||
NUR repository ${prettyName} is using the deprecated callPackage syntax which
|
||||
might result in infinite recursion when used with NixOS modules.
|
||||
'' (passedArgs.pkgs.callPackages src {})
|
||||
else expr (builtins.intersectAttrs args passedArgs)
|
||||
'' else expr (builtins.intersectAttrs args passedArgs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue