-
Notifications
You must be signed in to change notification settings - Fork 79
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
fetchGit and submodules #58
Comments
Definitely. Whenever we merge #35 (cough cough Soon ™) I'll most likely deprecate the |
@nmattia I guess the resolution of this issue would solve my issue:
I am trying to replace a call to pkgs.fetchgit with niv. Here is my source.json:
|
@PierreR in this case you can also use |
Forgot to update this! There's experimental support for $ niv add git [email protected]:nmattia/niv -a rev=deadbeef |
How would I use |
This is not directly supported, but you can make it work as follows. diff --git a/nix/sources.nix b/nix/sources.nix
index 8a725cb..800b0f8 100644
--- a/nix/sources.nix
+++ b/nix/sources.nix
@@ -19,7 +19,7 @@ let
pkgs.fetchzip { inherit (spec) url sha256; };
fetch_git = spec:
- builtins.fetchGit { url = spec.repo; inherit (spec) rev ref; };
+ builtins.fetchGit { url = spec.repo; inherit (spec) rev ref submodules; };
fetch_builtin-tarball = spec:
builtins.trace Finally, add "dhall-haskell": {
"ref": "master",
"repo": "https://github.com/dhall-lang/dhall-haskell",
"rev": "9afffaea7108a86df197cb97b64a9504fe37ecfc",
"submodules": true,
"type": "git"
}, |
@nmattia I just realized how long-standing this issue has been. I've personally run into a second time now (submodules aren't so rare to never see them... but they aren't the common case). What are your latest thoughts on how best to solve it? Is there anything I can do to help push it over the finish line? |
hey @shajra , I wrote up some thoughts in here: #229 (comment) I unfortunately don't have as much time as I used to these days, but one way to contribute would be to share the above and get feedback on it; then we can actually go forward (implementation shouldn't take long). Also I didn't see @Nadrieril 's comment above; that's definitely something we could add to sources.nix right now! PRs welcome. |
Hey i think this can be closed now with the latest PR being merged, right? #352 |
Yes, thanks! |
I love the support for 'normal' GitHub repo's, but
niv
in its current implementation can't include the submodules, which makes it useless in some cases.This can be solved by adding support for
fetchGit
.The text was updated successfully, but these errors were encountered: