2020-07-18 16:06:22 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, installShellFiles
|
|
|
|
, libiconv
|
|
|
|
, Security
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "delta";
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "0.8.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dandavison";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-07-14 22:03:04 +00:00
|
|
|
sha256 = "sha256-lwdsl3dzqrIL1JoBFmldwsCvNCWUcTlgeoEoCvmlTCQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
cargoSha256 = "sha256-7TvxkSJ3iWJnjD3Xe7WDXBNWIyl8U9XTCn9muUG1AmI=";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
postInstall = ''
|
2020-08-20 17:08:02 +00:00
|
|
|
installShellCompletion --bash --name delta.bash etc/completion/completion.bash
|
|
|
|
installShellCompletion --zsh --name _delta etc/completion/completion.zsh
|
2020-05-03 17:38:23 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +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}";
|
|
|
|
license = licenses.mit;
|
2021-01-05 17:05:55 +00:00
|
|
|
maintainers = with maintainers; [ marsam zowoq ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|