Skip to content

Commit

Permalink
make-derivation: install all outputs
Browse files Browse the repository at this point in the history
This confuses users too much and to me seems to have very little
benefit. Since it only effect “declarative” installation, it doesn’t
seem helpful to not give every output available. In this case, users
want what would normally be included in the /zlib/ package, not just
one output.

Fixes NixOS#44144
Fixes NixOS#24717
  • Loading branch information
matthewbauer committed Jul 27, 2018
1 parent 62dca7c commit ddf58a1
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions pkgs/stdenv/generic/make-derivation.nix
Expand Up @@ -253,17 +253,14 @@ rec {
# lets have a clean always accessible version here.
inherit name;

# If the packager hasn't specified `outputsToInstall`, choose a default,
# which is the name of `p.bin or p.out or p`;
# if he has specified it, it will be overridden below in `// meta`.
# Note: This default probably shouldn't be globally configurable.
# Services and users should specify outputs explicitly,
# unless they are comfortable with this default.
outputsToInstall =
let
outs = outputs'; # the value passed to derivation primitive
hasOutput = out: builtins.elem out outs;
in [( lib.findFirst hasOutput null (["bin" "out"] ++ outs) )];
# By default, just install all outputs. This would
# previously only install one output, but this led to much
# confusion from users expecting all of the outputs to be
# available. If you do not wants to make every output
# available, individual packages can still specify a
# default. Notice that this will only affect “nix-env -i”
# and not normal Nixpkgs dependency behavior.
outputsToInstall = outputs';
}
// attrs.meta or {}
# Fill `meta.position` to identify the source location of the package.
Expand Down

0 comments on commit ddf58a1

Please sign in to comment.