3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/git-and-tools/delta/default.nix
2020-07-02 15:02:05 +10:00

40 lines
1,007 B
Nix

{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, installShellFiles
, libiconv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "delta";
version = "0.2.0";
src = fetchFromGitHub {
owner = "dandavison";
repo = pname;
rev = version;
sha256 = "15c7rsmiinnpxh12520jz3wr0j86vgzjq1ss5pf30fa7lcgicb32";
};
cargoSha256 = "0lzz32qh80s4dxr0d4pg0qagkn549lr4vbqknl2l0cmlq1bvvq6g";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
postInstall = ''
installShellCompletion --bash --name delta.bash completion/completion.bash
installShellCompletion --zsh --name _delta completion/completion.zsh
'';
meta = with lib; {
homepage = "https://github.com/dandavison/delta";
description = "A syntax-highlighting pager for git";
changelog = "https://github.com/dandavison/delta/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ marsam ma27 zowoq ];
};
}