1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-12 23:55:23 +00:00
nixpkgs/pkgs/applications/version-management/git-and-tools/git-trim/default.nix

34 lines
930 B
Nix
Raw Normal View History

2020-03-07 09:20:00 +00:00
{ stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, libiconv, Security }:
rustPlatform.buildRustPackage rec {
pname = "git-trim";
2020-05-05 01:47:07 +01:00
version = "0.3.2";
2020-03-07 09:20:00 +00:00
src = fetchFromGitHub {
owner = "foriequal0";
repo = pname;
rev = "v${version}";
2020-05-05 01:47:07 +01:00
sha256 = "079kavm3n776wvmy25jq1g4qdvmhh3d3x1vdpb1f6pw5rkky8lyw";
2020-03-07 09:20:00 +00:00
};
2020-05-05 01:47:07 +01:00
cargoSha256 = "1ii5l7z9avg0gzlaav2gnfbr8wkbp008i5rz6k6bs2sfqnpnn5k6";
2020-03-07 09:20:00 +00:00
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
postInstall = ''
2020-04-14 10:20:00 +01:00
install -Dm644 -t $out/share/man/man1/ docs/git-trim.1
2020-03-07 09:20:00 +00:00
'';
# fails with sandbox
doCheck = false;
meta = with stdenv.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 = [ maintainers.marsam ];
};
}