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

37 lines
1.0 KiB
Nix
Raw Normal View History

2020-04-20 02:20:00 -07:00
{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, makeWrapper, openssl, git, libiconv, Security, installShellFiles }:
2019-07-07 21:39:45 -07:00
rustPlatform.buildRustPackage rec {
pname = "git-gone";
2020-06-15 02:20:00 -07:00
version = "0.3.6";
2019-07-07 21:39:45 -07:00
src = fetchFromGitHub {
owner = "lunaryorn";
repo = pname;
rev = "v${version}";
2020-06-15 02:20:00 -07:00
sha256 = "0wpmabd5lshsga3dhv1hix7i99f1f82rpl6kjmpi315whg11kki3";
2019-07-07 21:39:45 -07:00
};
2020-06-15 02:20:00 -07:00
cargoSha256 = "0ayqsrhy6hpi20gfryhnwl2c1na4nnmzxkp7him104cc07vsdllq";
2019-07-07 21:39:45 -07:00
2020-04-20 02:20:00 -07:00
nativeBuildInputs = [ pkgconfig makeWrapper installShellFiles ];
2019-07-07 21:39:45 -07:00
buildInputs = [ openssl ]
2019-12-14 17:20:20 -08:00
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
2019-07-07 21:39:45 -07:00
2020-04-20 02:20:00 -07:00
postInstall = ''
installManPage git-gone.1
'';
2019-12-21 21:00:00 -08:00
postFixup = ''
wrapProgram $out/bin/git-gone --prefix PATH : "${stdenv.lib.makeBinPath [ git ]}"
'';
2019-07-07 21:39:45 -07:00
meta = with stdenv.lib; {
description = "Cleanup stale Git branches of pull requests";
homepage = "https://github.com/lunaryorn/git-gone";
license = licenses.asl20;
maintainers = [ maintainers.marsam ];
platforms = platforms.unix;
};
}