2022-03-05 16:20:37 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-10-21 18:38:19 +00:00
|
|
|
, fetchFromGitHub
|
2022-03-05 16:20:37 +00:00
|
|
|
, rustPlatform
|
|
|
|
, Security
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "git-gone";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
src = fetchFromGitHub {
|
2023-04-12 12:48:02 +00:00
|
|
|
owner = "swsnr";
|
2022-10-21 18:38:19 +00:00
|
|
|
repo = "git-gone";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-Mc9/P4VBmLOC05xqdx/yopbhvdpQS3uejc4YA7BIgug=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
cargoHash = "sha256-NyyficEDJReMLAw2VAK2fOXNIwHilnUqQRACGck+0Vo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage git-gone.1
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-03-05 16:20:37 +00:00
|
|
|
description = "Cleanup stale Git branches of merge requests";
|
2023-04-12 12:48:02 +00:00
|
|
|
homepage = "https://github.com/swsnr/git-gone";
|
|
|
|
changelog = "https://github.com/swsnr/git-gone/raw/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ cafkafk ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "git-gone";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|