Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document nix-env bug relating to multiple output installation #76794

Conversation

dudebout
Copy link
Contributor

@dudebout dudebout commented Jan 1, 2020

Document the issue and workaround discussed in https://discourse.nixos.org/t/cant-find-a-way-to-install-gnumake-info-files-to-user-environment/3534 @doronbehar @lilyball @lheckemann

cc @dtzWill @matthewbauer as you both worked in that space in #35884

I encountered the issue trying to install netcat from nix-env, which is not easy anymore since it is provided via the nc output of libressl which is not part of outputsToInstall (#14708, #39634)

@stale
Copy link

stale bot commented Jun 30, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 30, 2020
@lheckemann
Copy link
Member

still valid

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 30, 2020
doc/stdenv/multiple-output.xml Outdated Show resolved Hide resolved
doc/stdenv/multiple-output.xml Show resolved Hide resolved
doc/stdenv/multiple-output.xml Outdated Show resolved Hide resolved
doc/stdenv/multiple-output.xml Show resolved Hide resolved
doc/stdenv/multiple-output.xml Outdated Show resolved Hide resolved
doc/stdenv/multiple-output.xml Outdated Show resolved Hide resolved
pkgs/stdenv/generic/make-derivation.nix Outdated Show resolved Hide resolved
@dudebout
Copy link
Contributor Author

dudebout commented Jul 29, 2020 via email

@dudebout
Copy link
Contributor Author

@lilyball I have attempted to address all your concerns. Let me know if you need anything more.

<para>
TODO: more about tweaking the attribute, etc.
<command>nix-env</command> silenty disregards the outputs selected by the user, and instead installs the outputs from <varname>meta.outputsToInstall</varname>. For example,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already mentioned in the paragraph above. Can probably remove the warning section.

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good otherwise! @lilyball Can you take another look too?

@dudebout
Copy link
Contributor Author

dudebout commented Aug 25, 2020 via email

@infinisil
Copy link
Member

I see what you are saying, but I think this warrants a warning box. This is a very confusing bug from a user perspective and having a self-contained warning box describing the problem can save time for the reader. If we want to remove the warning box, the section needs to be tweaked because the warning box contains the example that is used in the following paragraph.

Alright I see. I guess it's fine, even though the warning box contains part of what was said just before it.

On a related note, any idea on what can be done to push this PR past the finish line? This bug has been known for a long time, there was a TODO in the doc, I offered some content almost 8 months ago and I cannot seem to get traction to get this merged in.

That's what I'm here for :). I can merge this PR after the commits are squashed!

@dudebout dudebout force-pushed the document-nix-env-multiple-output-install-bug branch from 1b6a8fd to e3be3a8 Compare September 5, 2020 09:26
@dudebout
Copy link
Contributor Author

dudebout commented Sep 5, 2020

@infinisil I have squashed the commits

@dudebout dudebout force-pushed the document-nix-env-multiple-output-install-bug branch from e3be3a8 to 611258f Compare September 5, 2020 09:32
@dudebout
Copy link
Contributor Author

dudebout commented Sep 5, 2020

And re-squashed with trailing whitespaces removed

@infinisil infinisil merged commit 560bb92 into NixOS:master Sep 5, 2020
@dudebout dudebout deleted the document-nix-env-multiple-output-install-bug branch January 1, 2022 18:06
fricklerhandwerk added a commit to fricklerhandwerk/nixpkgs that referenced this pull request Sep 18, 2023
The text was originally added [0] following an apparently incomplete
research on how everything plays together. In fact, Nix propagates
`outputs` to the corresponding nested derivations, and there is some
messy behavior in Nixpkgs that only seems to propagate
`meta.outputsToInstall` in `buildEnv`[1].

This change moves the hints on how to use NixOS specifics to NixOS
module documentation (which is hopefully easier to find through
search.nixos.org), describes the default behavior in Nixpkgs (updating
a the link to the source), and removes the confusing mention of
`nix-env`.

the last of them should not be there to begin with. we don't want
beginners to use `nix-env`, as this is known to run them into trouble
eventually.

[0]: NixOS#76794
[1]: https://github.com/NixOS/nixpkgs/blob/1774d07242995050d2d8a91cb4da0855eac2e472/pkgs/build-support/buildenv/default.nix#L66
fricklerhandwerk added a commit to fricklerhandwerk/nixpkgs that referenced this pull request Sep 18, 2023
The text was originally added [0] following an apparently incomplete
research on how everything plays together. In fact, Nix propagates
`outputs` to the corresponding nested derivations, and there is some
messy behavior in Nixpkgs that only seems to propagate
`meta.outputsToInstall` in `buildEnv`[1].

This change moves the hints on how to use NixOS specifics to NixOS
module documentation (which is hopefully easier to find through
search.nixos.org), describes the default behavior in Nixpkgs (updating
a the link to the source), and removes the confusing mention of
`nix-env`.

the last of them should not be there to begin with. we don't want
beginners to use `nix-env`, as this is known to run them into trouble
eventually.

[0]: NixOS#76794
[1]: https://github.com/NixOS/nixpkgs/blob/1774d07242995050d2d8a91cb4da0855eac2e472/pkgs/build-support/buildenv/default.nix#L66
fricklerhandwerk added a commit to fricklerhandwerk/nixpkgs that referenced this pull request Sep 18, 2023
The text was originally added [0] following an apparently incomplete
research on how everything plays together. In fact, Nix propagates
`outputs` to the corresponding nested derivations, and there is some
messy behavior in Nixpkgs that only seems to propagate
`meta.outputsToInstall` in `buildEnv`[1].

This change moves the hints on how to use NixOS specifics to NixOS
module documentation (which is hopefully easier to find through
search.nixos.org), describes the default behavior in Nixpkgs (updating
a the link to the source), and removes the confusing mention of
`nix-env`.

the last of them should not be there to begin with. we don't want
beginners to use `nix-env`, as this is known to run them into trouble
eventually.

[0]: NixOS#76794
[1]: https://github.com/NixOS/nixpkgs/blob/1774d07242995050d2d8a91cb4da0855eac2e472/pkgs/build-support/buildenv/default.nix#L66
fricklerhandwerk added a commit that referenced this pull request Sep 25, 2023
…255947)

The text was originally added [0] following an apparently incomplete
research on how everything plays together. In fact, Nix propagates
`outputs` to the corresponding nested derivations, and there is some
messy behavior in Nixpkgs that only seems to propagate
`meta.outputsToInstall` in `buildEnv`[1].

This change moves the hints on how to use NixOS specifics to NixOS
module documentation (which is hopefully easier to find through
search.nixos.org), describes the default behavior in Nixpkgs (updating
a the link to the source), and removes the confusing mention of
`nix-env`.

the last of them should not be there to begin with. we don't want
beginners to use `nix-env`, as this is known to run them into trouble
eventually.

[0]: #76794
[1]: https://github.com/NixOS/nixpkgs/blob/1774d07242995050d2d8a91cb4da0855eac2e472/pkgs/build-support/buildenv/default.nix#L66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants