Files
nixpkgs/pkgs/by-name/gi/git-trim/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

58 lines
1.2 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
libgit2,
zlib,
fetchpatch,
}:
rustPlatform.buildRustPackage rec {
pname = "git-trim";
version = "0.4.4";
src = fetchFromGitHub {
owner = "foriequal0";
repo = "git-trim";
rev = "v${version}";
sha256 = "sha256-XAO3Qg5I2lYZVNx4+Z5jKHRIFdNwBJsUQwJXFb4CbvM=";
};
cargoHash = "sha256-irgekVTWCujzSbZQMNJw3NZ3cjaUftpSJha6iZQqYJ8=";
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
libgit2
zlib
];
postInstall = ''
install -Dm644 -t $out/share/man/man1/ docs/git-trim.1
'';
# fails with sandbox
doCheck = false;
meta = with lib; {
description = "Automatically trims your branches whose tracking remote refs are merged or gone";
homepage = "https://github.com/foriequal0/git-trim";
license = licenses.mit;
maintainers = with maintainers; [ cafkafk ];
mainProgram = "git-trim";
};
}