2020-07-01 16:42:32 -07:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, installShellFiles
|
|
|
|
, libiconv
|
|
|
|
, Security
|
|
|
|
}:
|
2019-10-04 02:20:00 -07:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "delta";
|
2020-08-03 18:23:37 -07:00
|
|
|
version = "0.4.0";
|
2019-10-04 02:20:00 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dandavison";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-08-03 18:23:37 -07:00
|
|
|
sha256 = "1i4ddz2fivn5h35059b68z3lfw48psak79aab6pk7d8iamz4njb9";
|
2019-10-04 02:20:00 -07:00
|
|
|
};
|
|
|
|
|
2020-08-03 18:23:37 -07:00
|
|
|
cargoSha256 = "1na6wqjm69diwhkyxlzk0jm3qwkdrah3w6i8p7dhzrsx434lhmya";
|
2020-04-26 16:17:00 -07:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-07-01 16:42:32 -07:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
|
|
|
|
2020-04-26 16:17:00 -07:00
|
|
|
postInstall = ''
|
2020-07-01 16:42:32 -07:00
|
|
|
installShellCompletion --bash --name delta.bash completion/completion.bash
|
|
|
|
installShellCompletion --zsh --name _delta completion/completion.zsh
|
2020-04-26 16:17:00 -07:00
|
|
|
'';
|
2019-10-04 02:20:00 -07:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/dandavison/delta";
|
|
|
|
description = "A syntax-highlighting pager for git";
|
2019-12-04 01:20:00 -08:00
|
|
|
changelog = "https://github.com/dandavison/delta/releases/tag/${version}";
|
2019-10-04 02:20:00 -07:00
|
|
|
license = licenses.mit;
|
2020-07-01 16:43:24 -07:00
|
|
|
maintainers = with maintainers; [ marsam ma27 zowoq ];
|
2019-10-04 02:20:00 -07:00
|
|
|
};
|
|
|
|
}
|