ffc78d3539
GitOrigin-RevId: d9dba88d08a9cdf483c3d45f0d7220cf97a4ce64
39 lines
1,010 B
Nix
39 lines
1,010 B
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, installShellFiles
|
|
, libiconv
|
|
, Security
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "delta";
|
|
version = "0.5.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dandavison";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "134dhkk6ckhk6pb2hmfy1q2hkb8d1fkhbshw9qzbnp0qwbv3wgqj";
|
|
};
|
|
|
|
cargoSha256 = "0633g8jyhmhs33cdspa46gvmnzl2jfwxylmjfhsvbxznzygb4dw3";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --bash --name delta.bash etc/completion/completion.bash
|
|
installShellCompletion --zsh --name _delta etc/completion/completion.zsh
|
|
'';
|
|
|
|
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;
|
|
maintainers = with maintainers; [ marsam zowoq ];
|
|
};
|
|
}
|