Skip to content

Commit

Permalink
fix Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Sep 16, 2024
1 parent 976f539 commit 459d026
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions packaging/dependencies.nix
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,25 @@ 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 []
++ [
./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
];
Expand Down

0 comments on commit 459d026

Please sign in to comment.