nix-helpers: 7fbcd1025b1003a19b544f70945faf23bb90708a
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 = as:
11: if isAttrs as then mapAttrs (n: go) (filterAttrs notOverride as) else as;
12:
13: notOverride = n: v: !(elem n [ "override" "overrideDerivation" ]);
14: };
15: go
Generated by git2html.