nix-helpers: c9212b00851281cc1870763f79cc8ddea8610db0
1: # Remove cruft, like "override" and "overrideDerivation". These are inserted
2: # into attrsets automatically by functions like callPackage, but since they're
3: # functions, they can't be converted to strings and hence they can break things
4: # like build environments (which are assumed to be name/value env vars).
5: { lib }:
6:
7: with builtins;
8: with lib;
9: with rec {
10: go =
11: as: if isAttrs as then mapAttrs (n: go) (filterAttrs notOverride as) else as;
12:
13: notOverride =
14: n: v:
15: !(elem n [
16: "override"
17: "overrideDerivation"
18: ]);
19: };
20: go
Generated by git2html.