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

Git submodules missing / Switch to pkgs.fetchgit #34

Closed
andir opened this issue Oct 9, 2019 · 3 comments · Fixed by #55
Closed

Git submodules missing / Switch to pkgs.fetchgit #34

andir opened this issue Oct 9, 2019 · 3 comments · Fixed by #55
Labels
enhancement New feature or request

Comments

@andir
Copy link
Collaborator

andir commented Oct 9, 2019

When using a git source for a crate the git submodules are not being fetched. This is a limitation of builtins.fetchGit. By using pkgs.fetchgit one can fetch those but is then required to provide the output hash of the source archive.

In the long run it is probably best to just do something like nix-prefetch-git for all of the git crates and always use pkgs.fetchgit (or even pkgs.fetchFromGitHub where possible).

This would also aid generating expressions that can be built in pure mode. For example on hydra instances.

@andir andir changed the title Git submodules missing Git submodules missing / Switch to pkgs.fetchgit Oct 9, 2019
@kolloch kolloch added the enhancement New feature or request label Oct 11, 2019
@kolloch
Copy link
Collaborator

kolloch commented Oct 11, 2019

I'd love to avoid prefetching as much as possible. Is there a chance to auto-detect submodules somehow? Probably not because you have to fetch the git repository to know if it contains sub modules?

@andir
Copy link
Collaborator Author

andir commented Nov 8, 2019

I'd love to avoid prefetching as much as possible. Is there a chance to auto-detect submodules somehow? Probably not because you have to fetch the git repository to know if it contains sub modules?

Yeah, you are probably right. There is no correct way to predict that.

What is the problem you are trying to avoid with prefetching?
I would like to avoid the extra complexity but in the long run that might not really be feasible.

@cpcloud
Copy link
Contributor

cpcloud commented Nov 25, 2019

I'm working on this and will have a PR up tomorrow. I've got cloning working, but I can't seem to figure out how to get my test to pick up the submodule's path. I'm currently trying to use crateOverrides but that doesn't seem to solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants