From 0acef47d44327387aa16154f7f30dde5e6197be9 Mon Sep 17 00:00:00 2001 From: Marc Weber <marco-oweber@gmx.de> Date: Mon, 5 Nov 2007 21:27:32 +0000 Subject: [PATCH] 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 --- pkgs/lib/default-unstable.nix | 3 ++- pkgs/top-level/all-packages.nix | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/lib/default-unstable.nix b/pkgs/lib/default-unstable.nix index 84f6a02cb6e2..33fb68f58578 100644 --- a/pkgs/lib/default-unstable.nix +++ b/pkgs/lib/default-unstable.nix @@ -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) []; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 884b8be90d13..c6dcc9952501 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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