github-desktop: link libexec/git-core into git wrapper

needed so github-desktop's git wrapper (dugite) can find subcommands
like `git-submodule` etc. Retrieve the full list with `ls -l $(nix build
--print-out-paths nixpkgs#git)/libexec/git-core | grep -vE '( -> )?git$'
| awk '{ print $7 }'`.

Fixes #524797

(cherry picked from commit 3fd65b2bc8)
This commit is contained in:
Tom Oostveen 2026-05-27 14:13:52 +02:00 committed by github-actions[bot]
commit 1ce3eb2173

View file

@ -101,9 +101,15 @@ stdenv.mkDerivation (finalAttrs: {
yarn --cwd app/node_modules/desktop-notifications run install
# use git from nixpkgs instead of an automatically downloaded one by dugite
makeWrapper ${lib.getExe git} app/node_modules/dugite/git/bin/git \
gitRoot=app/node_modules/dugite/git
makeWrapper ${lib.getExe git} "$gitRoot/bin/git" \
--prefix PATH : ${lib.makeBinPath [ git-lfs ]}
mkdir -p "$gitRoot/libexec/git-core"
for script in ${git}/libexec/git-core/*; do
ln -s "$script" "$gitRoot/libexec/git-core/$(basename "$script")"
done
# exception: printenvz needs `node-gyp` configure first for some reason
pushd node_modules/printenvz