about summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-and-tools/git-gone/default.nix
blob: 7a26b38b6b2d3501130239e228e09a28b0f861e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ lib
, stdenv
, fetchFromGitea
, rustPlatform
, libiconv
, Security
, installShellFiles
}:

rustPlatform.buildRustPackage rec {
  pname = "git-gone";
  version = "0.4.1";

  src = fetchFromGitea {
    domain = "codeberg.org";
    owner = "flausch";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-kqKFs3xvTVHnsLpLC9gjj1dcPChhegmupNrbWy+7C6o=";
  };

  cargoSha256 = "sha256-8R13eHS69fQ3r3LYlnB3nPTPX7VesUPlAUCmQEpUUdw=";

  nativeBuildInputs = [ installShellFiles ];

  buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];

  postInstall = ''
    installManPage git-gone.1
  '';

  meta = with lib; {
    description = "Cleanup stale Git branches of merge requests";
    homepage = "https://codeberg.org/flausch/git-gone";
    changelog = "https://codeberg.org/flausch/git-gone/raw/tag/v${version}/CHANGELOG.md";
    license = licenses.asl20;
    maintainers = [ maintainers.marsam ];
  };
}