mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 07:22:43 +01:00
packaging: Restore libgit2 USE_SSH=exec
... when nixpkgs is nixos-unstable or the overlay is used.
(cherry picked from commit 5488e29d2f)
This commit is contained in:
parent
9442b9bd7b
commit
e2558b8c26
1 changed files with 39 additions and 36 deletions
|
|
@ -102,8 +102,7 @@ let
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
scope:
|
scope: {
|
||||||
{
|
|
||||||
inherit stdenv;
|
inherit stdenv;
|
||||||
|
|
||||||
aws-sdk-cpp =
|
aws-sdk-cpp =
|
||||||
|
|
@ -200,38 +199,42 @@ scope:
|
||||||
mesonBuildLayer
|
mesonBuildLayer
|
||||||
mesonLibraryLayer
|
mesonLibraryLayer
|
||||||
];
|
];
|
||||||
}
|
|
||||||
# libgit2: Nixpkgs 24.11 has < 1.9.0
|
libgit2 = pkgs.libgit2.overrideAttrs (
|
||||||
// lib.optionalAttrs (!lib.versionAtLeast pkgs.libgit2.version "1.9.0") {
|
attrs:
|
||||||
libgit2 = pkgs.libgit2.overrideAttrs (attrs: {
|
{
|
||||||
src = inputs.libgit2;
|
cmakeFlags = attrs.cmakeFlags or [ ] ++ [ "-DUSE_SSH=exec" ];
|
||||||
version = inputs.libgit2.lastModifiedDate;
|
}
|
||||||
cmakeFlags = attrs.cmakeFlags or [ ] ++ [ "-DUSE_SSH=exec" ];
|
# libgit2: Nixpkgs 24.11 has < 1.9.0, which needs our patches
|
||||||
nativeBuildInputs =
|
// lib.optionalAttrs (!lib.versionAtLeast pkgs.libgit2.version "1.9.0") {
|
||||||
attrs.nativeBuildInputs or [ ]
|
src = inputs.libgit2;
|
||||||
# gitMinimal does not build on Windows. See packbuilder patch.
|
version = inputs.libgit2.lastModifiedDate;
|
||||||
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
|
nativeBuildInputs =
|
||||||
# Needed for `git apply`; see `prePatch`
|
attrs.nativeBuildInputs or [ ]
|
||||||
pkgs.buildPackages.gitMinimal
|
# gitMinimal does not build on Windows. See packbuilder patch.
|
||||||
];
|
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
|
||||||
# Only `git apply` can handle git binary patches
|
# Needed for `git apply`; see `prePatch`
|
||||||
prePatch =
|
pkgs.buildPackages.gitMinimal
|
||||||
attrs.prePatch or ""
|
];
|
||||||
+ lib.optionalString (!stdenv.hostPlatform.isWindows) ''
|
# Only `git apply` can handle git binary patches
|
||||||
patch() {
|
prePatch =
|
||||||
git apply
|
attrs.prePatch or ""
|
||||||
}
|
+ lib.optionalString (!stdenv.hostPlatform.isWindows) ''
|
||||||
'';
|
patch() {
|
||||||
patches =
|
git apply
|
||||||
attrs.patches or [ ]
|
}
|
||||||
++ [
|
'';
|
||||||
./patches/libgit2-mempack-thin-packfile.patch
|
patches =
|
||||||
]
|
attrs.patches or [ ]
|
||||||
# gitMinimal does not build on Windows, but fortunately this patch only
|
++ [
|
||||||
# impacts interruptibility
|
./patches/libgit2-mempack-thin-packfile.patch
|
||||||
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
|
]
|
||||||
# binary patch; see `prePatch`
|
# gitMinimal does not build on Windows, but fortunately this patch only
|
||||||
./patches/libgit2-packbuilder-callback-interruptible.patch
|
# 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