Skip to content

Commit f201446

Browse files
authored
Merge pull request NixOS#12518 from roberth/libgit2-use-ssh-exec
packaging: Restore libgit2 USE_SSH=exec
2 parents e672243 + 5488e29 commit f201446

File tree

1 file changed

+36
-34
lines changed

1 file changed

+36
-34
lines changed

packaging/dependencies.nix

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ let
2929
darwinStdenv = pkgs.overrideSDK prevStdenv { darwinMinVersion = "10.13"; };
3030

3131
in
32-
scope:
33-
{
32+
scope: {
3433
inherit stdenv;
3534

3635
aws-sdk-cpp =
@@ -66,36 +65,39 @@ scope:
6665
installPhase = lib.replaceStrings [ "--without-python" ] [ "" ] old.installPhase;
6766
});
6867

69-
}
70-
# libgit2: Nixpkgs 24.11 has < 1.9.0
71-
// lib.optionalAttrs (!lib.versionAtLeast pkgs.libgit2.version "1.9.0") {
72-
libgit2 = pkgs.libgit2.overrideAttrs (attrs: {
73-
cmakeFlags = attrs.cmakeFlags or [ ] ++ [ "-DUSE_SSH=exec" ];
74-
nativeBuildInputs =
75-
attrs.nativeBuildInputs or [ ]
76-
# gitMinimal does not build on Windows. See packbuilder patch.
77-
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
78-
# Needed for `git apply`; see `prePatch`
79-
pkgs.buildPackages.gitMinimal
80-
];
81-
# Only `git apply` can handle git binary patches
82-
prePatch =
83-
attrs.prePatch or ""
84-
+ lib.optionalString (!stdenv.hostPlatform.isWindows) ''
85-
patch() {
86-
git apply
87-
}
88-
'';
89-
patches =
90-
attrs.patches or [ ]
91-
++ [
92-
./patches/libgit2-mempack-thin-packfile.patch
93-
]
94-
# gitMinimal does not build on Windows, but fortunately this patch only
95-
# impacts interruptibility
96-
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
97-
# binary patch; see `prePatch`
98-
./patches/libgit2-packbuilder-callback-interruptible.patch
99-
];
100-
});
68+
libgit2 = pkgs.libgit2.overrideAttrs (
69+
attrs:
70+
{
71+
cmakeFlags = attrs.cmakeFlags or [ ] ++ [ "-DUSE_SSH=exec" ];
72+
}
73+
# libgit2: Nixpkgs 24.11 has < 1.9.0, which needs our patches
74+
// lib.optionalAttrs (!lib.versionAtLeast pkgs.libgit2.version "1.9.0") {
75+
nativeBuildInputs =
76+
attrs.nativeBuildInputs or [ ]
77+
# gitMinimal does not build on Windows. See packbuilder patch.
78+
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
79+
# Needed for `git apply`; see `prePatch`
80+
pkgs.buildPackages.gitMinimal
81+
];
82+
# Only `git apply` can handle git binary patches
83+
prePatch =
84+
attrs.prePatch or ""
85+
+ lib.optionalString (!stdenv.hostPlatform.isWindows) ''
86+
patch() {
87+
git apply
88+
}
89+
'';
90+
patches =
91+
attrs.patches or [ ]
92+
++ [
93+
./patches/libgit2-mempack-thin-packfile.patch
94+
]
95+
# gitMinimal does not build on Windows, but fortunately this patch only
96+
# impacts interruptibility
97+
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
98+
# binary patch; see `prePatch`
99+
./patches/libgit2-packbuilder-callback-interruptible.patch
100+
];
101+
}
102+
);
101103
}

0 commit comments

Comments
 (0)