-
Notifications
You must be signed in to change notification settings - Fork 18
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
Adding a source does not seem to add it to the store #57
Comments
I think that we try to use the correct Nix prefetch call to avoid this, but it might depend on the exact situation. Can you please show a command which adds a source which reproduces this? |
I had it on a humongous GitHub repo, but can't reproduce it with something smaller such as Nixpkgs and don't want to try to download gigabytes again... |
If you encounter it again or manage to extract the respective command from the shell history, feel free to open again. |
I've run into a similar issue myself with the following pin: "google-fonts": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "google",
"repo": "fonts"
},
"branch": "main",
"revision": "3992c83a1afd00abb72a6c237159f20e419433dc",
"url": "https://github.com/google/fonts/archive/3992c83a1afd00abb72a6c237159f20e419433dc.tar.gz",
"hash": "1zcqm82c7a08mkkfhm7py494qa41q8pb7x237hdqas01qw5kzcp8"
}, Updating the pin seems to take a while on its own - presumably the tarball must be downloaded to get the hash. |
Could it be that this is because |
Yes indeed we shell out to the |
An alternative would be doing the same thing as flakes and storing the NAR hashes in the lockfile, and then constructing the store path via FOD on import. |
Sounds like a nix bug to me tbh |
I'd say it's a lack of deliberate design. A bug would mean something particular was intended but went wrong by accident. The code doesn't look like that to me. |
I would say this is an explicit bug, as the documentation for
|
Per some testing I did, it seems that So a similar workaround for the remaining fetchers should do the trick for now. (Though I still consider it a borderline nix bug that the default behaviour is to induce a cache miss... especially if the docs say "fetchurl uses the same name for the downloaded file as nix-prefetch-url".) |
When I add a large repo as a source, it has to download for a long time. Using that source in a derivation requires downloading it again, apparently. Is that a user error or is it how the tool works?
The text was updated successfully, but these errors were encountered: