summaryrefslogtreecommitdiffstats
path: root/lib/eval-source.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-07-23 10:22:35 +0200
committerlassulus <lassulus@lassul.us>2017-07-23 10:22:35 +0200
commit65c2680f24b3200d78e4c2d23da832dde141bfe5 (patch)
tree3d6854a87da32fb573cfc3faf012808cddc8ef3c /lib/eval-source.nix
parent241b943c3216073023b312b1a1297dc66dceb7af (diff)
parentccc7601a0e95d8adccf3a4a7db837aa9f1b3b3a6 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'lib/eval-source.nix')
-rw-r--r--lib/eval-source.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/eval-source.nix b/lib/eval-source.nix
index 468fc92d1..ff853185b 100644
--- a/lib/eval-source.nix
+++ b/lib/eval-source.nix
@@ -10,6 +10,12 @@ let
};
};
};
+ sanitize = x: getAttr (typeOf x) {
+ set = mapAttrs
+ (const sanitize)
+ (filterAttrs (name: value: name != "_module" && value != null) x);
+ string = x;
+ };
in
# This function's return value can be used as pkgs.populate input.
- _file: source: (eval _file source).config.source
+ _file: source: sanitize (eval _file source).config.source