1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-20 17:29:36 +01:00

Add poor man's module system

This commit is contained in:
Eelco Dolstra 2020-08-26 09:44:12 +02:00
parent 38b339d447
commit 13735a63b4
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 52 additions and 1 deletions

View file

@ -2416,6 +2416,10 @@ void EvalState::createBaseEnv()
evalFile(path, v);
addConstant("derivation", v);
path = canonPath(settings.nixDataDir + "/nix/corepkgs/module.nix", true);
evalFile(path, v);
addConstant("module", v);
/* Add a value containing the current Nix expression search path. */
mkList(v, searchPath.size());
int n = 0;