depot/third_party/nixpkgs/pkgs/applications/version-management/git-and-tools/delta/default.nix
Default email 792b51d22f Project import generated by Copybara.
GitOrigin-RevId: d5f237872975e6fb6f76eef1368b5634ffcd266f
2022-02-20 05:27:41 +00:00

41 lines
1.1 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, installShellFiles
, DiskArbitration
, Foundation
, libiconv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "delta";
version = "0.12.0";
src = fetchFromGitHub {
owner = "dandavison";
repo = pname;
rev = version;
sha256 = "sha256-RlEPC9yyPYj974UVto7w+r24Lc5+Et1Ks49o+QTdrZQ=";
};
cargoSha256 = "sha256-4tOeYiRBF4qDUiI6yU093y0Ttq7+CdmGaA5eqdMjgow=";
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
'';
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 ];
};
}