forked from mirrors/nixpkgs
Is it time to uncomment mkDerivationByConfiguration and start using listToAttrs etc?
Let's try * fixes attr -> name change in function av of unstable lib svn path=/nixpkgs/trunk/; revision=9590
This commit is contained in:
parent
c7cf206bdd
commit
0acef47d44
|
@ -187,7 +187,7 @@ rec {
|
|||
mapRecordFlatten = f : r : map (attr: f attr (builtins.getAttr attr r) ) (attrNames r);
|
||||
|
||||
# to be used with listToAttrs (_a_ttribute _v_alue)
|
||||
av = attr : value : { inherit attr value; };
|
||||
av = name : value : { inherit name value; };
|
||||
# attribute set containing one attribute
|
||||
avs = attr : value : listToAttrs [ (av attr value) ];
|
||||
# adds / replaces an attribute of an attribute set
|
||||
|
@ -203,6 +203,7 @@ rec {
|
|||
|
||||
mergeAttrs = fold ( x : y : x // y) {};
|
||||
|
||||
# returns atribute values as a list
|
||||
flattenAttrs = set : map ( attr : builtins.getAttr attr set) (attrNames set);
|
||||
mapIf = cond : f : fold ( x : l : if (cond x) then [(f x)] ++ l else l) [];
|
||||
|
||||
|
|
|
@ -189,8 +189,6 @@ rec {
|
|||
meta = (if drv ? meta then drv.meta else {}) // {priority = "10";};
|
||||
};
|
||||
|
||||
# commented out because it's using the new configuration style proposal which is unstable
|
||||
/*
|
||||
mkDerivationByConfiguration = ({ flagConfig ? {}, optionals ? [], defaults ? [],
|
||||
extraAttrs, collectExtraPhaseActions ? []} :
|
||||
args: with args.lib_unstable; with args;
|
||||
|
@ -201,7 +199,6 @@ rec {
|
|||
{
|
||||
inherit (co) configureFlags buildInputs;
|
||||
} // extraAttrs co // co.pass // co.flags_prefixed ));
|
||||
*/
|
||||
|
||||
|
||||
# Check absence of non-used options
|
||||
|
|
Loading…
Reference in a new issue