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
fetchgitPrivate: Remove fetcher #73406
Conversation
Since Nix 2.0 we have `builtins.fetchGit` which is a much better option since it runs in the evaluator and has access to the regular users ssh keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only mention is the package itself
[09:33:24] jon@jon-desktop /home/jon/projects/nixpkgs (master)
$ rg fetchgitPrivate
pkgs/top-level/all-packages.nix
253: fetchgitPrivate = callPackage ../build-support/fetchgit/private.nix { };
I guess there may be some private (sic) use of it out of nixpkgs. Maybe a mention of the alternative in 20.03 release note would be good. |
probably more correct, would be make an alias of builtins.fetchgit |
@adisbladis So I just learned that this removal happened, I used
like this and it allowed me to use nix with packages that had private repos, any idea how I can do that without it? If there's a way to do it with |
|
@jonringer I tried it, but unfortunately that doesn't work.
This is where I'm right now.
|
your package might be private, but the dependencies should be public (unless go implemented private repo references that I'm unaware of (I don't mess much with go)). just use builtins.fetchGit on the |
Go internally uses git for fetching. There are two ways to make it work with private repos: One way (most convenient) to make it work with private repo is to add this to the [url "ssh://git@github.com/"]
insteadOf = https://github.com/ Then it will fall back to ssh and be able to access all private repos. (this is also how Another way is to create |
beyond me, sorry ;( |
Would this be a good reason to restore Alternatively is there a way for |
As a side note, I use
I wish we could have fetch and build remotely with local ssh keys... |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/why-doesnt-fetchfromgithub-support-submodules-with-private/6600/3 |
fetchgitPrivate was removed in NixOS/nixpkgs#73406 Apparently builtins.fetchGit has support for user ssh keys, etc. This is a temporary hack, which seems to work for a simple use-case.
Since Nix 2.0 we have
builtins.fetchGit
which is a much betteroption since it runs in the evaluator and has access to the regular
users ssh keys.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @