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

nix-daemon: strip /nixpkgs from nixpkgs channel #40016

Closed
wants to merge 1 commit into from

Conversation

lukateras
Copy link
Member

Alternative to #39682.

Copy link
Member

@matthewbauer matthewbauer left a comment

Choose a reason for hiding this comment

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

This is much better to me at least! Should verify it still works okay with https://nixos.org/channels/ though.

@lukateras
Copy link
Member Author

lukateras commented May 6, 2018

Works for me (with NixOS channel).

@edolstra
Copy link
Member

edolstra commented May 6, 2018

I'm very hesitant about this. I'm pretty sure there was a reason for using the nixpkgs symlink but I don't remember what it was.

@matthewbauer
Copy link
Member

@edolstra Maybe you would prefer the original, #39682? I didn't like having it in the top tree, but that was before I realized that the channels already have the nixpkgs symlink.

@dezgeg
Copy link
Contributor

dezgeg commented May 21, 2018

Maybe this commit (2cd7c1f) which actually creates the symlink in question has an explanation?

commit 2cd7c1f19888ae73bf7ef0f41a45680cfb86334a
Author: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date:   Wed Aug 5 17:29:08 2015 +0200

    Unify NixOS and Nixpkgs channel structure
    
    This is primarily to ensure that
    
      -I nixpkgs=https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz
    
    and
    
      -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz
    
    and
    
      -I nixpkgs=https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz
    
    behave consistently.
    
    It also allows installing packages via "nix-env -iA nixos.<pkg>"
    rather than "nixos.pkgs.<pkg>". It would be even better to allow
    "nixpkgs.<pkg>", but that requires a change to nix-channel.

@lukateras
Copy link
Member Author

lukateras commented May 21, 2018

Locations that do have nixpkgs -> . symlink:

Locations that don't (currently broken for nix-channel, fixed by this patch):

This seems to be a safe change to me, because it only normalizes the first case. For this change to cause breakage, there should be a nixpkgs channel that has nixpkgs/ directory that it is something other than nixpkgs -> . symlink.

@dezgeg
Copy link
Contributor

dezgeg commented May 21, 2018

I agree with that analysis, this change seems safe. I'm guessing it used to be needed for pre-15.09 channels but those seem to be garbage-collected already so I can't check.

@lukateras
Copy link
Member Author

Superseded by #40892.

@lukateras lukateras closed this May 22, 2018
@lukateras lukateras deleted the yegortimoshenko-patch-3 branch May 22, 2018 00:19
@copumpkin
Copy link
Member

Sorry I missed this, but thanks for all the discussion!

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

6 participants