depot/third_party/nixpkgs/pkgs/applications/version-management/git-and-tools/delta/default.nix
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01:00

39 lines
1,008 B
Nix

{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, installShellFiles
, libiconv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "delta";
version = "0.8.1";
src = fetchFromGitHub {
owner = "dandavison";
repo = pname;
rev = version;
sha256 = "sha256-YS4XuP5V7HLhz6PTwbz4mqVdzRDQvpwwL7oYeQW8Xcs=";
};
cargoSha256 = "sha256-wX7x6SbbEWFBo5HeXTjb3r4IJ2leP4T0nVqf43Bl94k=";
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 ];
};
}