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";
|
2020-10-11 12:50:04 +00:00
|
|
|
version = "0.4.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dandavison";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-10-11 12:50:04 +00:00
|
|
|
sha256 = "1ng22g9h1l1v2yav8zh6w4nn6ifv8sfz8566m8155d0cza2iimw6";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
cargoSha256 = "0b3qv1ksk8fmpawih2qrz29wlpj1gvq9hw4yqm7hdk6awl5h8lvv";
|
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;
|
2020-07-18 16:06:22 +00:00
|
|
|
maintainers = with maintainers; [ marsam ma27 zowoq ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|