nixpkgs/pkgs/applications/version-management/git-and-tools/git-trim/default.nix

34 lines
921 B
Nix
Raw Normal View History

{ 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
};
2020-11-01 01:10:34 +00:00
cargoSha256 = "1q62gqqhf78ljcvzp7yrnr0vk65rif2f7axzjq0b87prbcsr7ij4";
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;
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 ];
};
}