mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 15:32:43 +01:00
Merge pull request #12516 from NixOS/mergify/bp/2.25-maintenance/pr-12484
Support libgit2 1.9.0 (backport #12484)
This commit is contained in:
commit
9442b9bd7b
1 changed files with 36 additions and 33 deletions
|
|
@ -102,7 +102,8 @@ let
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
scope: {
|
scope:
|
||||||
|
{
|
||||||
inherit stdenv;
|
inherit stdenv;
|
||||||
|
|
||||||
aws-sdk-cpp =
|
aws-sdk-cpp =
|
||||||
|
|
@ -146,38 +147,6 @@ scope: {
|
||||||
installPhase = lib.replaceStrings [ "--without-python" ] [ "" ] old.installPhase;
|
installPhase = lib.replaceStrings [ "--without-python" ] [ "" ] old.installPhase;
|
||||||
});
|
});
|
||||||
|
|
||||||
libgit2 = pkgs.libgit2.overrideAttrs (attrs: {
|
|
||||||
src = inputs.libgit2;
|
|
||||||
version = inputs.libgit2.lastModifiedDate;
|
|
||||||
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 =
|
|
||||||
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
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
busybox-sandbox-shell =
|
busybox-sandbox-shell =
|
||||||
pkgs.busybox-sandbox-shell or (pkgs.busybox.override {
|
pkgs.busybox-sandbox-shell or (pkgs.busybox.override {
|
||||||
useMusl = true;
|
useMusl = true;
|
||||||
|
|
@ -232,3 +201,37 @@ scope: {
|
||||||
mesonLibraryLayer
|
mesonLibraryLayer
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
# libgit2: Nixpkgs 24.11 has < 1.9.0
|
||||||
|
// lib.optionalAttrs (!lib.versionAtLeast pkgs.libgit2.version "1.9.0") {
|
||||||
|
libgit2 = pkgs.libgit2.overrideAttrs (attrs: {
|
||||||
|
src = inputs.libgit2;
|
||||||
|
version = inputs.libgit2.lastModifiedDate;
|
||||||
|
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 =
|
||||||
|
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
|
||||||
|
];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue