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

nixpkgs: setup self-referential symlink #39682

Closed

Conversation

lukateras
Copy link
Member

@lukateras lukateras commented Apr 29, 2018

This allows to use fork of nixpkgs as a nix-channel:

$ sudo nix-channel --add https://github.com/yegortimoshenko/nixpkgs nixos
$ sudo nix-channel --update
$ sudo nixos-rebuild switch

Currently this results in the following error:

warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

This allows to, for example, use fork of nixpkgs as a nix-channel:

$ sudo nix-channel --add https://github.com/serokell/nixpkgs nixos
$ sudo nix-channel --update
$ sudo nixos-rebuild switch

Currently this results in the following error:

warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
@lukateras
Copy link
Member Author

Seems to evaluate :-)

@lukateras
Copy link
Member Author

Would like to go ahead and merge this unless there are objections.

@lukateras lukateras self-assigned this May 5, 2018
@matthewbauer
Copy link
Member

matthewbauer commented May 5, 2018

So, would it be possible to get nix-channel to just recognize the new NixOS/nixpkgs format? IIRC the main reason it is set up like this was because NixOS & Nixpkgs used to be separate repos. Maybe there is a simple fix?

The main concern is just the hackiness of this. Right now I think you can just add a separate channel for nixpkgs:

$ sudo nix-channel --add https://github.com/yegortimoshenko/nixpkgs nixpkgs
$ sudo nix-channel --update

(of course then you have two channels that need to updated)

@matthewbauer matthewbauer requested a review from edolstra May 5, 2018 20:44
@lukateras
Copy link
Member Author

Right now I think you can just add a separate channel for nixpkgs: [...]

I think current NIX_PATH order would not allow that.

Maybe there is a simple fix?

One proposed in this pull request :-)

Kidding. I think changing NIX_PATH nixpkgs entry to /nix/var/nix/profiles/per-user/root/channels/nixos (i.e. removing /nixpkgs suffix) should also work.

@lukateras
Copy link
Member Author

#40016 would be an alternative resolution of the issue.

@lukateras
Copy link
Member Author

lukateras commented May 5, 2018

Going to close this in favor of #40016, will reopen if there are any issues with that.

@lukateras lukateras closed this May 5, 2018
@lukateras lukateras deleted the 20180429.200322/nixpkgs-symlink branch May 22, 2018 18:26
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

3 participants