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

Error entering the shell #2

Closed
nuxeh opened this issue Apr 19, 2019 · 3 comments
Closed

Error entering the shell #2

nuxeh opened this issue Apr 19, 2019 · 3 comments

Comments

@nuxeh
Copy link

nuxeh commented Apr 19, 2019

I can't enter the nix-shell on a fresh install of Nix unstable on Debian, any pointers?

$ nix-shell
error: file 'nixos-unstable' was not found in the Nix search path (add it using $NIX_PATH or -I), at /home/ed/git/crate2nix/shell.nix:5:16

$ nix-channel --list
nixpkgs https://nixos.org/channels/nixpkgs-unstable

$ echo $NIX_PATH 
nixpkgs=/home/ed/.nix-defexpr/channels/nixpkgs

Thanks.

@kolloch
Copy link
Collaborator

kolloch commented Apr 19, 2019

Hi @nuxeh,

I tried to describe it at https://github.com/kolloch/crate2nix#installation but it is slightly confusing.

Your problem is that you have a channel pointing to nixpkgs-unstable but that it is called nixpkgs. The shell hard-codes a reference to nixpkgs-unstable.

This should work for you:

nix-shell --arg pkgs 'import <nixos> {config = {}; }'

Let me know if it doesn't!

@kolloch
Copy link
Collaborator

kolloch commented Apr 20, 2019

Hi @nuxeh, I also changed the shell.nix in such a way now that it does not depend on your local channel configuration. Let me know if it works for you!

@nuxeh
Copy link
Author

nuxeh commented Apr 22, 2019

Aha, just seen this... yes, seems to work nicely!

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

No branches or pull requests

2 participants