fix Windows build

(cherry picked from commit 459d02672c)
This commit is contained in:
Robert Hensing 2024-08-28 11:13:03 +02:00 committed by Mergify
parent a01d3dd0e8
commit f299bc2f06

View File

@ -133,16 +133,18 @@ scope: {
cmakeFlags = attrs.cmakeFlags or []
++ [ "-DUSE_SSH=exec" ];
nativeBuildInputs = attrs.nativeBuildInputs or []
++ [
# gitMinimal does not build on Windows. See packbuilder patch.
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
# Needed for `git apply`; see `prePatch`
pkgs.buildPackages.gitMinimal
];
# Only `git apply` can handle git binary patches
prePatch = ''
patch() {
git apply
}
'';
prePatch = attrs.prePatch or ""
+ lib.optionalString (!stdenv.hostPlatform.isWindows) ''
patch() {
git apply
}
'';
patches = attrs.patches or []
<<<<<<< HEAD
++ [ ./patches/libgit2-mempack-thin-packfile.patch ];
@ -150,7 +152,10 @@ scope: {
=======
++ [
./patches/libgit2-mempack-thin-packfile.patch
]
# gitMinimal does not build on Windows, but fortunately this patch only
# impacts interruptibility
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
# binary patch; see `prePatch`
./patches/libgit2-packbuilder-callback-interruptible.patch
];