From 46a369ad9558939bc2c6ee588df483ca503bbb5a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 26 Nov 2012 15:39:10 +0100 Subject: Make "nix-build -A ." do the right thing For example, given a derivation with outputs "out", "man" and "bin": $ nix-build -A pkg produces ./result pointing to the "out" output; $ nix-build -A pkg.man produces ./result-man pointing to the "man" output; $ nix-build -A pkg.all produces ./result, ./result-man and ./result-bin; $ nix-build -A pkg.all -A pkg2 produces ./result, ./result-man, ./result-bin and ./result-2. --- corepkgs/derivation.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'corepkgs/derivation.nix') diff --git a/corepkgs/derivation.nix b/corepkgs/derivation.nix index 757108be3614..c0fbe8082cd3 100644 --- a/corepkgs/derivation.nix +++ b/corepkgs/derivation.nix @@ -6,7 +6,7 @@ drvAttrs @ { outputs ? [ "out" ], ... }: let strict = derivationStrict drvAttrs; - + commonAttrs = drvAttrs // (builtins.listToAttrs outputsList) // { all = map (x: x.value) outputsList; inherit drvAttrs; @@ -21,7 +21,7 @@ let inherit outputName; }; }; - + outputsList = map outputToAttrListElement outputs; - + in (builtins.head outputsList).value -- cgit 1.4.1