summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2017-07-23 21:11:11 +0200
committermakefu <github@syntax-fehler.de>2017-07-23 21:11:11 +0200
commit1e3931d983127bb2cf5fc93471bacfc9770e5b08 (patch)
tree9308da0abd27ad72547bc765e9a4100ccc71630b /lib
parentfd7d1531acd5345136dad71bdcd1050176d88cd6 (diff)
parent1bf9e1e1eea95ea9efeb72a48e19a6df11881a7f (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lib')
-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