diff --git a/pkgs/applications/version-management/git-trim/default.nix b/pkgs/applications/version-management/git-trim/default.nix index 0ef5a678ee8e..a7dbf0c6ba4b 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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 86bdd538cd92..8823c647a5a8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {