Skip to content

Commit

Permalink
fix Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Aug 28, 2024
1 parent a5804e2 commit 30a2b4a
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 30a2b4a

Please sign in to comment.