3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix
2021-01-16 17:58:11 +07:00

35 lines
993 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, libiconv, Security }:
rustPlatform.buildRustPackage rec {
pname = "git-absorb";
version = "0.6.6";
src = fetchFromGitHub {
owner = "tummychow";
repo = pname;
rev = "refs/tags/${version}";
sha256 = "04v10bn24acify34vh5ayymsr1flcyb05f3az9k1s2m6nlxy5gb9";
};
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
cargoSha256 = "0h0vlz4qd8i9bf1mgjr618zbdwfp6bmy7ql9a1xzjmfdpkl3cgk9";
postInstall = ''
installManPage Documentation/git-absorb.1
for shell in bash zsh fish; do
$out/bin/git-absorb --gen-completions $shell > git-absorb.$shell
installShellCompletion git-absorb.$shell
done
'';
meta = with lib; {
homepage = "https://github.com/tummychow/git-absorb";
description = "git commit --fixup, but automatic";
license = [ licenses.bsd3 ];
maintainers = [ maintainers.marsam ];
};
}