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-prefetch-git produces different store paths from fetchgit #6651

Closed
copumpkin opened this issue Mar 3, 2015 · 3 comments · Fixed by #12597
Closed

nix-prefetch-git produces different store paths from fetchgit #6651

copumpkin opened this issue Mar 3, 2015 · 3 comments · Fixed by #12597
Labels
0.kind: enhancement Add something new

Comments

@copumpkin
Copy link
Member

It looks like nix-prefetch-git always produces <hash>-git-export (i.e., name = "git-export"), whereas fetchgit tries to do fancy things with the basename of the repo URL and the git revision.

@copumpkin
Copy link
Member Author

To be clear, the annoyance here is that nix-prefetch-git can tell me the hash of the result, but it won't actually prefetch it for a build that uses fetchgit, because fetchgit won't notice that the work has already been done.

@edolstra edolstra added the 0.kind: enhancement Add something new label Mar 6, 2015
@zimbatm
Copy link
Member

zimbatm commented Jan 24, 2016

Do you think we should adopt the same naming heuristic in nix-prefetch-git or just use "git-export" everywhere ?

@zimbatm
Copy link
Member

zimbatm commented Jan 24, 2016

@copumpkin I got both versions (7bfa5a4542933a17262eca47d67a3de1aa877e6b and 35fe889927f2f50ba29c88f01d4f7dfb95cba5ca) I think the second-one is the nicest because it's still possible to infer what the derivation is based on it's name when looking at /nix/store. In exchange we have that heuristic that might not be 100% equivalent between nix and bash.

zimbatm added a commit to zimbatm/nixpkgs that referenced this issue Feb 13, 2016
This commit fixes NixOS#6651.

Before this change the `nix-prefetch-git` script would use a different store
name than nix's `fetchgit` function. Because of that it was not possible to
use `nix-prefetch-git` as a way to pre-populate the store (for example when
the user it using private git dependencies that needs access to the ssh agent)
kamilchm pushed a commit to kamilchm/nixpkgs that referenced this issue Feb 15, 2016
This commit fixes NixOS#6651.

Before this change the `nix-prefetch-git` script would use a different store
name than nix's `fetchgit` function. Because of that it was not possible to
use `nix-prefetch-git` as a way to pre-populate the store (for example when
the user it using private git dependencies that needs access to the ssh agent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants