Repository navigation
Conversation
On macOS, /usr/bin/git is an xcode-select shim that locates the real binary via DEVELOPER_DIR. Nix's Darwin stdenv points DEVELOPER_DIR at its pinned Apple SDK, which contains only xcrun, so git fails with "tool 'git' not found" inside the dev shells. Adding git to the shared crane devShell packages puts nix's git ahead of the shim on PATH. This covers the default, nightly, stable and msrv shells. Signed-off-by: shytypes <abbaadamu302@icloud.com>
Collaborator
Coverage Report for CI Build 38271540532Coverage remained the same at 87.494%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #1906.
On macOS,
/usr/bin/gitis Apple's xcode-select shim, which locates the real binary throughDEVELOPER_DIR. Nix's Darwin stdenv setsDEVELOPER_DIRto its pinned Apple SDK, which ships onlyxcrun, so git fails witherror: tool 'git' not foundinside the dev shells. This includes the default shell that.envrcloads, sodirenvusers like myself have no working git in the project directory.This adds
gitto the shared cranedevShellpackages, the same wayreleaseDevShellalready does. Nix's git then comes before the shim onPATH. Because the crane shells are generated from one definition, this one line coversdefault,nightly,stableandmsrv. Nix's git also shipsgit-credential-osxkeychain, so the macOS keychain credential helper keeps working.The language shells are left alone on purpose. They are used to build and test the bindings.
Testing
This only affects Macs where Apple's
/usr/bin/gitshim is the first git onPATH(details). Runnix develop -c which -a gitand check the first line:master: if it's/usr/bin/git, your Mac is affected./nix/store/...-git-2.51.2/bin/gitpath.On an affected Mac, git now works in
default,nightly,stableandmsrv.Reviewer: @xstoicunicornx
Disclosure: co-authored by Claude Code
Pull Request Checklist
Please confirm the following before requesting review: