From 6c98e6a5dec2bcbc25ddeb2c279aa4a0b274bd6a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 27 Nov 2012 15:01:32 +0100 Subject: Optionally ignore null-valued derivation attributes This allows adding attributes like attr = if stdenv.system == "bla" then something else null; without changing the resulting derivation on non- platforms. We once considered adding a special "ignore" value for this purpose, but using null seems more elegant. --- src/libexpr/eval.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libexpr/eval.cc') diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 31aaad5485f0..9eb5fc758985 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -139,6 +139,7 @@ EvalState::EvalState() , sSystem(symbols.create("system")) , sOverrides(symbols.create("__overrides")) , sOutputName(symbols.create("outputName")) + , sIgnoreNulls(symbols.create("__ignoreNulls")) , baseEnv(allocEnv(128)) , baseEnvDispl(0) , staticBaseEnv(false, 0) -- cgit 1.4.1