From a3a9d407dafdc4cd6a7f5214f86c1183a04a4063 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Sat, 18 Aug 2007 22:29:00 +0000 Subject: fix: listToAttrs added (which I had forgotten) when evaluating flags svn path=/nixpkgs/trunk/; revision=9164 --- pkgs/lib/default-unstable.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pkgs') diff --git a/pkgs/lib/default-unstable.nix b/pkgs/lib/default-unstable.nix index ac87edd17e0..1d94b319191 100644 --- a/pkgs/lib/default-unstable.nix +++ b/pkgs/lib/default-unstable.nix @@ -220,8 +220,8 @@ rec { #in args.stdenv.mkDerivation { - # # passing the flags in case a library using this want's to check them .. - # inherit (co) flags buildInputs configureFlags; + # # passing the flags in case a library using this want's to check them (*) .. + # inherit (co) /* flags */ buildInputs configureFlags; # inherit (co.flags) justAOption; # extraSrc = (if co.flags.justAOption then null else src = .. ); @@ -232,6 +232,8 @@ rec { # }; #} + # (*) does'nt work because nix is seeing this set as derivation and complains about missing outpath.. :-( + # resolves chosen flags based on flagDescr passed dependencies in args @@ -289,7 +291,7 @@ rec { configureFlags = concatStrings (intersperse " " ( catAttrs "cfgOption" chosenFlat)) + (if (__hasAttr "profilingLibraries" chosen) then "" else " --disable-profiling"); - flags = map ( flag: av flag (__hasAttr flag chosen) ) (__attrNames flagDescr); + flags = listToAttrs (map ( flag: av flag (__hasAttr flag chosen) ) (__attrNames flagDescr)); }; } -- cgit 1.4.1