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

37 lines
1,017 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, rustPlatform, pkgconfig, makeWrapper, openssl, git, libiconv, Security, installShellFiles }:
2019-07-08 04:39:45 +00:00
rustPlatform.buildRustPackage rec {
pname = "git-gone";
2020-11-01 02:35:57 +00:00
version = "0.3.7";
2019-07-08 04:39:45 +00:00
src = fetchFromGitHub {
owner = "lunaryorn";
repo = pname;
rev = "v${version}";
2020-11-01 02:35:57 +00:00
sha256 = "0hhy1yazda9r4n753a5m9jf31fbzmm4v8wvl3pksspj2syglmll8";
2019-07-08 04:39:45 +00:00
};
2020-11-01 02:35:57 +00:00
cargoSha256 = "1g2jijx8y34lid9qwa26v4svab5v9ki6gn9vcfiy61dqa964c3l9";
2019-07-08 04:39:45 +00:00
2020-04-20 09:20:00 +00:00
nativeBuildInputs = [ pkgconfig makeWrapper installShellFiles ];
2019-07-08 04:39:45 +00:00
buildInputs = [ openssl ]
2021-01-15 13:21:58 +00:00
++ lib.optionals stdenv.isDarwin [ libiconv Security ];
2019-07-08 04:39:45 +00:00
2020-04-20 09:20:00 +00: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
'';
meta = with lib; {
2019-07-08 04:39:45 +00: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;
};
}