andir / npins

Nix dependency pinning. Very similar to Niv but has a few features that I personally wanted.
European Union Public License 1.2
199 stars 16 forks source link

Fix private repos and add filename support #36

Open dasJ opened 1 year ago

dasJ commented 1 year ago

I'm very sorry for this.

So essentially when using a private repos, the sha1= parameter was replaced by the private token rather than the private token being appended to the query params. This would have been an easy fix but that actually results in & being part of the derivation name which is invalid. This is why I now generate filenames for all the pins that are fetchurl'ed. Yay.

piegamesde commented 1 year ago

I really dislike having to track the name in the pins JSON. Is there no way that we can solve this in Nix on the import side of things with a simple string substitution?

dasJ commented 1 year ago

I can try but I don't see how this will be fast

dasJ commented 1 year ago

Ah yes we have to do this in the Rust code because nix-prefetch-url will otherwise fail because the path is invalid

piegamesde commented 1 year ago

The idea is, would it be possible to generate the derivation name on the fly where required instead of having to store it in the pins file.