2020-07-02 00:42:32 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, installShellFiles
|
2021-11-25 23:20:56 +00:00
|
|
|
, DiskArbitration
|
|
|
|
, Foundation
|
2020-07-02 00:42:32 +01:00
|
|
|
, libiconv
|
|
|
|
, Security
|
|
|
|
}:
|
2019-10-04 10:20:00 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "delta";
|
2021-12-16 00:53:34 +00:00
|
|
|
version = "0.11.3";
|
2019-10-04 10:20:00 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dandavison";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-12-16 00:53:34 +00:00
|
|
|
sha256 = "sha256-qpoXUzXRcsUi1WHZAYGgnEaNxBYEQAdkXAz7YPiPae8=";
|
2019-10-04 10:20:00 +01:00
|
|
|
};
|
|
|
|
|
2021-12-16 00:53:34 +00:00
|
|
|
cargoSha256 = "sha256-eds2W47+lOwO/HHKR+IjXOJOD8p1OYkk5qilDYTOUyk=";
|
2020-04-27 00:17:00 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-11-25 23:20:56 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation libiconv Security ];
|
2020-07-02 00:42:32 +01:00
|
|
|
|
2020-04-27 00:17:00 +01:00
|
|
|
postInstall = ''
|
2020-08-08 23:02:46 +01:00
|
|
|
installShellCompletion --bash --name delta.bash etc/completion/completion.bash
|
|
|
|
installShellCompletion --zsh --name _delta etc/completion/completion.zsh
|
2020-04-27 00:17:00 +01:00
|
|
|
'';
|
2019-10-04 10:20:00 +01: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 10:20:00 +01:00
|
|
|
license = licenses.mit;
|
2021-11-24 23:28:48 +00:00
|
|
|
maintainers = with maintainers; [ marsam zowoq SuperSandro2000 ];
|
2019-10-04 10:20:00 +01:00
|
|
|
};
|
|
|
|
}
|