depot/third_party/nixpkgs/pkgs/applications/version-management/git-and-tools/git-trim/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

33 lines
930 B
Nix

{ stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, libiconv, Security }:
rustPlatform.buildRustPackage rec {
pname = "git-trim";
version = "0.3.1";
src = fetchFromGitHub {
owner = "foriequal0";
repo = pname;
rev = "v${version}";
sha256 = "06wni47s8yq274bh5f7bcy0sah23938kjiw5pdxnma5kwwnrccrr";
};
cargoSha256 = "06ndja8212xy4rybh1117wijsyj70w4z8h6km538a7598s49vzdk";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
postInstall = ''
install -Dm644 -t $out/share/man/man1/ docs/git-trim.1
'';
# 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 ];
};
}