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

niv doesn't allow overriding the names of the download derivation #356

Open
lf- opened this issue Oct 6, 2022 · 2 comments
Open

niv doesn't allow overriding the names of the download derivation #356

lf- opened this issue Oct 6, 2022 · 2 comments

Comments

@lf-
Copy link

lf- commented Oct 6, 2022

Niv seems to hardcode names to things of format like *-nixpkgs-src according to a cursory reading of the file nix/sources.nix. This is problematic while interoperating with flakes, since if you put a path of any name except *-source as a "path" entry in the nix flake registry, it will be pointlessly copied on nearly every nix command run.

That limitation is filed upstream here: NixOS/nix#7075

It would be good to be able to override these names to workaround this Nix issue.

@nmattia
Copy link
Owner

nmattia commented Nov 8, 2022

hi, I'm still not 100% familiar with flakes. I'm quite curious though, what does your workflow look like with niv + flakes?

@lf-
Copy link
Author

lf- commented Nov 8, 2022

I use the option nix.registry.nixpkgs in my non flake NixOS configuration to set the nixpkgs flake in the system registry to the same nixpkgs the system was built with.

For instance, nix run nixpkgs#hello will get the same hello as nix-shell -p.

However Nix doesn't like it when you name store paths anything but "source" then put them in a flake registry and will recopy them every time if so. I wound up just patching niv's sources.nix about it.

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