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 the <nixpkgs> notation for nix-shell. #2935

Closed
wants to merge 1 commit into from

Conversation

athas
Copy link

@athas athas commented Jun 10, 2019

I was very confused about the examples in the documentation that use <nixpkgs> paths, because that is not documented in the manpage. After asking on #nixos, I was pointed at this Nix pill that seems to explain what is going on. I'm still not sure I get all the subtleties, though.

@toraritte
Copy link
Contributor

It is documented in the Nix manual, but is indeed missing from the man page.

From 15.1. Values, subsection "Simple Values": "Paths can also be specified between angle brackets, e.g. <nixpkgs>. This means that the directories listed in the environment variable NIX_PATH will be searched for the given file or directory name."

<para>If <replaceable>path</replaceable> is of the form
<literal>&lt;nixpkgs&gt;</literal>, it is replaced with the definition
of <literal>nixpkgs</literal> in the environment variable
<envar>NIX_PATH</envar>.</para>
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 not a good description because it suggests that <nixpkgs> is special, while in fact it can be any path resolved via the Nix search path (e.g. <foo/bar/xyzzy.nix>). Also, the search path is not just determined by NIX_PATH but also by -I flags.

@athas
Copy link
Author

athas commented Jun 11, 2019

I have updated the description to mention -I and not refer to nixpkgs specifically. Should the other manpages that take a path also be similarly updated? It's probably less important, because they are not used as prominently or as early in the Nix documentation.

@grahamc grahamc added this to the Nix 2.3 milestone Aug 27, 2019
@stale
Copy link

stale bot commented Feb 13, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 13, 2021
@stale
Copy link

stale bot commented Apr 16, 2022

I closed this issue due to inactivity. → More info

@stale stale bot closed this Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants