Merge pull request #216122 from marsam/fix-git-trim-darwin
git-trim: fix build on darwin
This commit is contained in:
commit
11bc9b5b8c
2 changed files with 25 additions and 4 deletions
|
@ -1,4 +1,14 @@
|
|||
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, libiconv, Security }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, openssl
|
||||
, libgit2
|
||||
, IOKit
|
||||
, CoreFoundation
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "git-trim";
|
||||
|
@ -11,11 +21,22 @@ rustPlatform.buildRustPackage rec {
|
|||
sha256 = "sha256-XAO3Qg5I2lYZVNx4+Z5jKHRIFdNwBJsUQwJXFb4CbvM=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-KCLMb8NXxjscrmKXkP/RbV+LsJqOG7zaClJGFiQ4o9k=";
|
||||
cargoHash = "sha256-mS8kNkZs8jX99ryG4XkU+U/iWIIcmET2vOfG1YNNZFU=";
|
||||
|
||||
cargoPatches = [
|
||||
# Update git2 https://github.com/foriequal0/git-trim/pull/202
|
||||
(fetchpatch {
|
||||
url = "https://github.com/foriequal0/git-trim/commit/4355cd1d6f605455087c4d7ad16bfb92ffee941f.patch";
|
||||
sha256 = "sha256-C1pX4oe9ZCgvqYTBJeSjMdr0KFyjv2PNVMJDlwCAngY=";
|
||||
})
|
||||
];
|
||||
|
||||
OPENSSL_NO_VENDOR = 1;
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ libiconv Security ];
|
||||
buildInputs = [ openssl libgit2 ]
|
||||
++ lib.optionals stdenv.isDarwin [ IOKit CoreFoundation ];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 -t $out/share/man/man1/ docs/git-trim.1
|
||||
|
|
|
@ -1912,7 +1912,7 @@ with pkgs;
|
|||
git-town = callPackage ../applications/version-management/git-town { };
|
||||
|
||||
git-trim = callPackage ../applications/version-management/git-trim {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
inherit (darwin.apple_sdk_11_0.frameworks) IOKit CoreFoundation;
|
||||
};
|
||||
|
||||
git-up = callPackage ../applications/version-management/git-up {
|
||||
|
|
Loading…
Reference in a new issue