You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
andir
changed the title
Git submodules missing
Git submodules missing / Switch to pkgs.fetchgit
Oct 9, 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?
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.
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.
When using a git source for a crate the git submodules are not being fetched. This is a limitation of
builtins.fetchGit
. By usingpkgs.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 usepkgs.fetchgit
(or evenpkgs.fetchFromGitHub
where possible).This would also aid generating expressions that can be built in pure mode. For example on hydra instances.
The text was updated successfully, but these errors were encountered: