2020-07-18 16:06:22 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, installShellFiles
|
2021-12-06 16:07:01 +00:00
|
|
|
, DiskArbitration
|
|
|
|
, Foundation
|
2020-07-18 16:06:22 +00:00
|
|
|
, libiconv
|
|
|
|
, Security
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "delta";
|
2022-03-10 19:12:11 +00:00
|
|
|
version = "0.12.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dandavison";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-03-10 19:12:11 +00:00
|
|
|
sha256 = "sha256-khW+Ri+MZytMZcd2tRXhc/D6kOOhk+LP6MsS+GijjQM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-10 19:12:11 +00:00
|
|
|
cargoSha256 = "sha256-SD1y+l86wqlJUUaG4ae4PXXSMS+4CPth3F4pLYbXMVc=";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation libiconv Security ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
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-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ marsam zowoq SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|