Also disallow pinning to a Nixpkgs lambda in Flakes

Somehow missed this one *shrugs*
This commit is contained in:
Zhaofeng Li 2021-11-17 22:21:00 -08:00
parent 0828bc3025
commit 1535857acc

View file

@ -313,7 +313,8 @@ let
# The referenced file might return an initialized Nixpkgs attribute set directly
else mkNixpkgs configName (import pkgConf)
else if typeOf pkgConf == "lambda" then
pkgConf {}
if hermetic then throw (uninitializedError "a Nixpkgs lambda")
else pkgConf {}
else if typeOf pkgConf == "set" then
if pkgConf ? outputs then throw (uninitializedError "an uninitialized Nixpkgs input")
else pkgConf