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

Update example command to install man #153

Closed
wants to merge 1 commit into from

Conversation

wathiede
Copy link

@wathiede wathiede commented Sep 7, 2020

Following through the pill, I saw this example, however:

$ nix-env -i man
error: selector 'man' matches no derivations

So I searched for the package and found:

$ nix-env -q 'man.*'
man-db-2.9.3

Following through the pill, I saw this example, however:
```
$ nix-env -i man
error: selector 'man' matches no derivations
```

So I searched for the package and found:
```
$ nix-env -q 'man.*'
man-db-2.9.3
```
@jonringer
Copy link

jonringer commented Sep 7, 2020

this is expected behavior:

$ nix-build -A man
/nix/store/gkrcn0xm6qrjhp5blwryx1a5qjhl52rc-man-db-2.9.3

this is probably the behavior you want, but it assumes that you have a "nixpkgs" nix-channel

$ nix-env -iA nixpkgs.man

@wathiede
Copy link
Author

wathiede commented Sep 7, 2020

Well I don't think expected behavior that the 3rd pill is broken :)

The online search suggests nix-env -iA nixos.man. It seems like the namespace is different if you're using the nixos vs nixpkgs (I'm new here, so I might not be using the right words).

I happen to have some nixos boxen, but I was working through the pills on an Ubuntu machine w/ nixpkgs. This sort of friction early on in the learning phase can have a large negative effect on trying out nix*. As pills are useful to people new to nixpkgs and nixos (i.e. me), there's probably value in having instructions that work for either environment.

Is there a way to do that without using nix-env -i man-db?

@jonringer
Copy link

nix-env kind of deviates from expectations, in fact, I never use it personally.

As pills are useful to people new to nixpkgs and nixos (i.e. me), there's probably value in having instructions that work for either environment.

Agreed, unfortunately nix-env is opinionated about your particular environment and channel names

Maybe we should just just replace the use of nix-env with nix-shell, which can pull in packages into a new shell session:

$ nix-shell -p man
[nix-shell:~/projects/nixpkgs]$ man
man         mandb       manpath     man-recode

However, this doesn't "install" man

@jonringer
Copy link

jonringer commented Oct 8, 2020

I should have merged this, but this was resolved in #157

@jonringer jonringer closed this Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants