nixpkgs/pkgs/applications/version-management/git-and-tools/delta/default.nix

40 lines
1,015 B
Nix
Raw Normal View History

{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, installShellFiles
, libiconv
, Security
}:
2019-10-04 09:20:00 +00:00
rustPlatform.buildRustPackage rec {
pname = "delta";
version = "0.4.5";
2019-10-04 09:20:00 +00:00
src = fetchFromGitHub {
owner = "dandavison";
repo = pname;
rev = version;
sha256 = "0rh902h76pn7ja5zizlfklmwcyyki4b0v4irw1j40cjjnah75ljp";
2019-10-04 09:20:00 +00:00
};
cargoSha256 = "1rniihx1rb18n2bp4b2yhn4ayih5cbcyqmiv6jckas7jwrgk6wra";
2020-04-26 23:17:00 +00:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
2020-04-26 23:17:00 +00:00
postInstall = ''
installShellCompletion --bash --name delta.bash etc/completion/completion.bash
installShellCompletion --zsh --name _delta etc/completion/completion.zsh
2020-04-26 23:17:00 +00:00
'';
2019-10-04 09:20:00 +00:00
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}";
2019-10-04 09:20:00 +00:00
license = licenses.mit;
2020-07-01 23:43:24 +00:00
maintainers = with maintainers; [ marsam ma27 zowoq ];
2019-10-04 09:20:00 +00:00
};
}