mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
ac45560964
https://github.com/dandavison/delta/releases/tag/0.14.0 - add shell completions for fish
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, installShellFiles
|
|
, DiskArbitration
|
|
, Foundation
|
|
, libiconv
|
|
, Security
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "delta";
|
|
version = "0.14.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dandavison";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-hB8qpVXsAVJvtrdTnbPYcL9K4gL2nkZLo6vunjOP/7o=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-19ZGWM8vPbIEYaCxrAZ2HWgSqbeLu3hEb8eLL4a7fAI=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation libiconv Security ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --bash --name delta.bash etc/completion/completion.bash
|
|
installShellCompletion --zsh --name _delta etc/completion/completion.zsh
|
|
installShellCompletion --fish --name delta.fish etc/completion/completion.fish
|
|
'';
|
|
|
|
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 SuperSandro2000 ];
|
|
};
|
|
}
|