2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, makeWrapper, openssl, git, libiconv, Security, installShellFiles }:
|
2019-07-08 05:39:45 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "git-gone";
|
2020-11-01 02:35:57 +00:00
|
|
|
version = "0.3.7";
|
2019-07-08 05:39:45 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lunaryorn";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-11-01 02:35:57 +00:00
|
|
|
sha256 = "0hhy1yazda9r4n753a5m9jf31fbzmm4v8wvl3pksspj2syglmll8";
|
2019-07-08 05:39:45 +01:00
|
|
|
};
|
|
|
|
|
2021-05-07 12:00:49 +01:00
|
|
|
cargoSha256 = "0mbc1742szpxnqqah6q0yhkn4fyyxqzg830bd1vzr07v273wr06r";
|
2019-07-08 05:39:45 +01:00
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper installShellFiles ];
|
2019-07-08 05:39:45 +01:00
|
|
|
|
|
|
|
buildInputs = [ openssl ]
|
2021-01-15 13:21:58 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv Security ];
|
2019-07-08 05:39:45 +01:00
|
|
|
|
2020-04-20 10:20:00 +01:00
|
|
|
postInstall = ''
|
|
|
|
installManPage git-gone.1
|
|
|
|
'';
|
|
|
|
|
2019-12-22 05:00:00 +00:00
|
|
|
postFixup = ''
|
2021-01-15 13:21:58 +00:00
|
|
|
wrapProgram $out/bin/git-gone --prefix PATH : "${lib.makeBinPath [ git ]}"
|
2019-12-22 05:00:00 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-08 05:39:45 +01:00
|
|
|
description = "Cleanup stale Git branches of pull requests";
|
|
|
|
homepage = "https://github.com/lunaryorn/git-gone";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|