diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2023-02-13 08:33:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 08:33:07 -0500 |
commit | 11bc9b5b8cda49a248ee71d7d10ea112a5e734ab (patch) | |
tree | 2c0660f098ad010bd25b716a57b448031ed1f2dc /pkgs/applications/version-management | |
parent | d990d1ea881a3cf1226ab4dbbf612bc7a01c9c79 (diff) | |
parent | 51b444c7c9b80be13473eaa45ddd7dd22703a392 (diff) |
Merge pull request #216122 from marsam/fix-git-trim-darwin
git-trim: fix build on darwin
Diffstat (limited to 'pkgs/applications/version-management')
-rw-r--r-- | pkgs/applications/version-management/git-trim/default.nix | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/pkgs/applications/version-management/git-trim/default.nix b/pkgs/applications/version-management/git-trim/default.nix index 0ef5a678ee8ef..a7dbf0c6ba4bc 100644 --- a/pkgs/applications/version-management/git-trim/default.nix +++ b/pkgs/applications/version-management/git-trim/default.nix @@ -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 |