rename mapRecordFlatten to mapAttrsFlatten
svn path=/nixpkgs/trunk/; revision=17315
This commit is contained in:
parent
47a2c768f9
commit
88e66ae7f4
@ -243,8 +243,8 @@ rec {
|
||||
closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);});
|
||||
|
||||
# calls a function (f attr value ) for each record item. returns a list
|
||||
# should be renamed to mapAttrsFlatten
|
||||
mapRecordFlatten = f : r : map (attr: f attr (builtins.getAttr attr r) ) (attrNames r);
|
||||
mapAttrsFlatten = f : r : map (attr: f attr (builtins.getAttr attr r) ) (attrNames r);
|
||||
mapRecordFlatten = builtins.trace "depreceated usage of mapRecordFlatten, use mapAttrsFlatten instead" mapAttrsFlatten;
|
||||
|
||||
# attribute set containing one attribute
|
||||
nvs = name : value : listToAttrs [ (nameValuePair name value) ];
|
||||
|
@ -37,12 +37,12 @@
|
||||
|
||||
let
|
||||
inherit (builtins) getAttr attrNames;
|
||||
inherit (lib) concatStringsSep mapRecordFlatten;
|
||||
inherit (lib) concatStringsSep mapAttrsFlatten;
|
||||
toConfigLine = name : set :
|
||||
"[(\"name\",\"${name}\")," + ( concatStringsSep "," (map (a: "(\"${a}\",\"${getAttr a set}\")" ) (attrNames set)))+"]";
|
||||
config = writeText "nix-repository-manager_config"
|
||||
(bleedingEdgeRepos.managedRepoDir+"\n" +
|
||||
concatStringsSep "\n" (mapRecordFlatten toConfigLine (bleedingEdgeRepos.repos)));
|
||||
concatStringsSep "\n" (mapAttrsFlatten toConfigLine (bleedingEdgeRepos.repos)));
|
||||
|
||||
cfg = getConfig ["nixRepositoryManager" ] {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user