2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, libiconv, Security }:
|
2020-03-07 09:20:00 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "git-trim";
|
2020-11-01 01:10:34 +00:00
|
|
|
version = "0.4.2";
|
2020-03-07 09:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "foriequal0";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-11-01 01:10:34 +00:00
|
|
|
sha256 = "1rb9dhj7b7mjrhsvm9vw5gzjfxj10idnzv488jkfdz7sfhd3fcvz";
|
2020-03-07 09:20:00 +00:00
|
|
|
};
|
|
|
|
|
2021-05-07 12:00:49 +01:00
|
|
|
cargoSha256 = "1gy77c1cnm2qpgf0fr03alvxi3936x36c032865a6ch8bzns7k5v";
|
2020-03-07 09:20:00 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2021-01-15 13:21:58 +00:00
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ libiconv Security ];
|
2020-03-07 09:20:00 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-07 09:20:00 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|