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-06-28 23:13:55 +00:00
|
|
|
version = "0.8.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dandavison";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "sha256-YS4XuP5V7HLhz6PTwbz4mqVdzRDQvpwwL7oYeQW8Xcs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
cargoSha256 = "sha256-wX7x6SbbEWFBo5HeXTjb3r4IJ2leP4T0nVqf43Bl94k=";
|
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
|
|
|
};
|
|
|
|
}
|