-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Use fetchFromGitHub
instead of fetchgit
when the source is a GitHub clone URL
#260
Comments
BTW, I might take a crack at this at some point, but I'm busy right now, so I figured I'd at least put up an issue. |
What about those of us who are not using github? Can this be made compatible? |
Then it should fall back to fetchgit? I didn't say "use fetchFromGitHub always"... |
@Fresheyeball it's possible to use shallow clone ( But the optimization should only be used for github.com urls. |
Depends on NixOS/nixpkgs#21732 |
Besides bandwidth, time would be spent for any package set projects like stack2nix, hackage2nix, stackage2nix, etc. |
I've looked into how to implement this in cabal2nix.
Prefetching would be: cabal2nix currently just guesses what prefetcher to use, by trying all of them and using the first one to succeed. I'd propose we add a flag like Thoughts? /cc @peti |
Personally, I am rather unhappy about the current "guessing code" and would love to replace it with a more deterministic solution that chooses the appropriate |
See input-output-hk/stack2nix#130 for more problems relating to this |
Hmm, is there some convertor if one uses lots of these then? |
Pretty self-explanatory. Should be very easy to implement, and will save some bandwidth for anyone who uses
cabal2nix
on GitHub repos (since, IIRC, it will only download the revision tarball, not the whole git repo).It would also be nice if
cabal2nix
gave a warning when an SSH clone URL is given, since those are impure (they depend on the SSH keys in your home directory).The text was updated successfully, but these errors were encountered: