diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-04-20 16:39:47 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-04-26 17:17:27 +0200 |
commit | 1ddabe1a0120787ff5bbdba5383222a6eb59c219 (patch) | |
tree | 5a7ef0ddf80daa022864225108e344c213c60dd9 /src/libcmd/installables.hh | |
parent | a81622c21db1397895ea0bb106819d2306b8fa43 (diff) |
nix: Respect meta.outputsToInstall, and use all outputs by default
'nix profile install' will now install all outputs listed in the
package's meta.outputsToInstall attribute, or all outputs if that
attribute doesn't exist. This makes it behave consistently with
nix-env. Fixes #6385.
Furthermore, for consistency, all other 'nix' commands do this as
well. E.g. 'nix build' will build and symlink the outputs in
meta.outputsToInstall, defaulting to all outputs. Previously, it only
built/symlinked the first output. Note that this means that selecting
a specific output using attrpath selection (e.g. 'nix build
nixpkgs#libxml2.dev') no longer works. A subsequent PR will add a way
to specify the desired outputs explicitly.
Diffstat (limited to 'src/libcmd/installables.hh')
-rw-r--r-- | src/libcmd/installables.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcmd/installables.hh b/src/libcmd/installables.hh index de8b08525..3c2c33549 100644 --- a/src/libcmd/installables.hh +++ b/src/libcmd/installables.hh @@ -141,7 +141,7 @@ struct InstallableValue : Installable struct DerivationInfo { StorePath drvPath; - std::string outputName; + std::set<std::string> outputsToInstall; }; virtual std::vector<DerivationInfo> toDerivations() = 0; |