From 1535857acc38b20f4e8df84f8cbd511dbc75565a Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Wed, 17 Nov 2021 22:21:00 -0800 Subject: [PATCH] Also disallow pinning to a Nixpkgs lambda in Flakes Somehow missed this one *shrugs* --- src/nix/eval.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nix/eval.nix b/src/nix/eval.nix index b589785..3437655 100644 --- a/src/nix/eval.nix +++ b/src/nix/eval.nix @@ -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