-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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: install git LFS with --local #113580
Conversation
Result of 11 packages built:2 suggestions:
|
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.
This is much better than the current situation: I'm having problems using nix-prefetch-git --fetch-lfs
at all (on current master). I think we should (rebase and) merge.
I tested this on top of master, success! Keep in mind that The only thing I think we should add is diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git
index 879f187994e..30b046abdd3 100755
--- a/pkgs/build-support/fetchgit/nix-prefetch-git
+++ b/pkgs/build-support/fetchgit/nix-prefetch-git
@@ -403,6 +403,7 @@ print_results() {
"date": "$(json_escape "$commitDateStrict8601")",
"path": "$(json_escape "$finalPath")",
"$(json_escape "$hashType")": "$(json_escape "$hash")",
+ "fetchLFS": $([[ -n "$fetchLFS" ]] && echo true || echo false),
"fetchSubmodules": $([[ -n "$fetchSubmodules" ]] && echo true || echo false),
"deepClone": $([[ -n "$deepClone" ]] && echo true || echo false),
"leaveDotGit": $([[ -n "$leaveDotGit" ]] && echo true || echo false) |
Oh, I see. I'll try to test it. |
Sorry, I haven't had time to test this wrt. git submodules, but I created this PR (#134122) now to at least make |
Motivation for this change
nix-builders run with GIT_CONFIG_NOSYSTEM (#63774) and
git lfs install
fails. The approach taken in PR #105998 setsHOME=$TMPDIR
to make it work. However,git lfs install
supports a--local
flag to set itself up in the local repository's git config. I believe this would be cleaner than the current approach. Furthermore,nix-prefetch-git
lacks the git-lfs dependence and does not publicly document the command line switch--fetch-lfs
.Note: I suspect this PR could cause
git-lfs
files in submodules not be fetched, so it may still need minor refinement.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)