3 kernel = stdenv.hostPlatform.parsed.kernel.name;
4 abi = stdenv.hostPlatform.parsed.abi.name;
5 cpu = stdenv.hostPlatform.parsed.cpu.name;
6 updateFeatures = f: up: functions: lib.deepSeq f (lib.foldl' (features: fun: fun features) (lib.attrsets.recursiveUpdate f up) functions);
7 mapFeatures = features: map (fun: fun { features = features; });
8 mkFeatures = feat: lib.foldl (features: featureName:
9 if feat.${featureName} or false then
10 [ featureName ] ++ features
13 ) [] (lib.attrNames feat);
14 include = includedFiles: src: builtins.filterSource (path: type:
16 let p = toString (src + ("/" + f));
18 p == path || (lib.strings.hasPrefix (p + "/") path)
21 exclude = excludedFiles: src: builtins.filterSource (path: type:
23 !lib.strings.hasPrefix (toString (src + ("/" + f))) path