about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix
blob: 00f279942d9d1bfe0a0157faa10f3ebe7be97850 (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
{ stdenv, fetchFromGitHub, rustPlatform, installShellFiles, libiconv, Security }:

rustPlatform.buildRustPackage rec {
  pname = "git-absorb";
  version = "0.6.3";

  src = fetchFromGitHub {
    owner  = "tummychow";
    repo   = pname;
    rev    = "refs/tags/${version}";
    sha256 = "0kvb9nzjlxhnrd2ir3zjd99v7zcq4bch1i9nqsn3505j5m0wv0hh";
  };

  nativeBuildInputs = [ installShellFiles ];

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

  cargoSha256 = "0bppb1ng77ynhlxnhgz9qx4x5j0lyzcxw3zshfpgjc03fxcwl6cz";

  postInstall = ''
    installManPage Documentation/git-absorb.1
  '';

  meta = with stdenv.lib; {
    homepage = "https://github.com/tummychow/git-absorb";
    description = "git commit --fixup, but automatic";
    license = [ licenses.bsd3 ];
    maintainers = [ maintainers.marsam ];
  };
}