Don't import impure overlays if meta.nixpkgs is a path

Also update documentations to recommend specifying `overlays = []`
explicitly.

Fixes #39.
This commit is contained in:
Zhaofeng Li 2022-06-03 23:51:32 -07:00
parent ca12be27ed
commit b87da69558
3 changed files with 4 additions and 1 deletions

View file

@ -73,6 +73,7 @@ let
colmena = {
${configName} = import nixpkgs {
system = "${currentSystem}";
overlays = [];
};
};
};
@ -85,7 +86,7 @@ let
else mkNixpkgs configName (import pkgConf)
else if typeOf pkgConf == "lambda" then
if hermetic then throw (uninitializedError "a Nixpkgs lambda")
else pkgConf {}
else pkgConf { overlays = []; }
else if typeOf pkgConf == "set" then
if pkgConf ? outputs then throw (uninitializedError "an uninitialized Nixpkgs input")
else pkgConf