nixpkgs/pkgs/applications/version-management/git-and-tools/delta/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, installShellFiles
, DiskArbitration
, Foundation
, libiconv
, Security
}:
2019-10-04 09:20:00 +00:00
rustPlatform.buildRustPackage rec {
pname = "delta";
version = "0.14.0";
2019-10-04 09:20:00 +00:00
src = fetchFromGitHub {
owner = "dandavison";
repo = pname;
rev = version;
sha256 = "sha256-hB8qpVXsAVJvtrdTnbPYcL9K4gL2nkZLo6vunjOP/7o=";
2019-10-04 09:20:00 +00:00
};
cargoSha256 = "sha256-19ZGWM8vPbIEYaCxrAZ2HWgSqbeLu3hEb8eLL4a7fAI=";
2020-04-26 23:17:00 +00:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation libiconv Security ];
2020-04-26 23:17:00 +00:00
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
2020-04-26 23:17:00 +00:00
'';
2019-10-04 09:20:00 +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}";
2019-10-04 09:20:00 +00:00
license = licenses.mit;
maintainers = with maintainers; [ marsam zowoq SuperSandro2000 ];
2019-10-04 09:20:00 +00:00
};
}