2020-07-01 23:42:32 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, installShellFiles
|
|
|
|
, libiconv
|
|
|
|
, Security
|
|
|
|
}:
|
2019-10-04 09:20:00 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "delta";
|
2020-07-01 23:42:32 +00:00
|
|
|
version = "0.2.0";
|
2019-10-04 09:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dandavison";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-07-01 23:42:32 +00:00
|
|
|
sha256 = "15c7rsmiinnpxh12520jz3wr0j86vgzjq1ss5pf30fa7lcgicb32";
|
2019-10-04 09:20:00 +00:00
|
|
|
};
|
|
|
|
|
2020-07-01 23:42:32 +00:00
|
|
|
cargoSha256 = "0lzz32qh80s4dxr0d4pg0qagkn549lr4vbqknl2l0cmlq1bvvq6g";
|
2020-04-26 23:17:00 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-07-01 23:42:32 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
|
|
|
|
2020-04-26 23:17:00 +00:00
|
|
|
postInstall = ''
|
2020-07-01 23:42:32 +00:00
|
|
|
installShellCompletion --bash --name delta.bash completion/completion.bash
|
|
|
|
installShellCompletion --zsh --name _delta 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";
|
2019-12-04 09:20:00 +00:00
|
|
|
changelog = "https://github.com/dandavison/delta/releases/tag/${version}";
|
2019-10-04 09:20:00 +00:00
|
|
|
license = licenses.mit;
|
2019-12-26 14:13:48 +00:00
|
|
|
maintainers = with maintainers; [ marsam ma27 ];
|
2019-10-04 09:20:00 +00:00
|
|
|
};
|
|
|
|
}
|