depot/third_party/nixpkgs/pkgs/applications/version-management/git-and-tools/delta/default.nix
Default email 1ffc76754d Project import generated by Copybara.
GitOrigin-RevId: a5cc7d3197705f933d88e97c0c61849219ce76c1
2020-07-18 18:06:22 +02:00

39 lines
1,007 B
Nix

{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, installShellFiles
, libiconv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "delta";
version = "0.3.0";
src = fetchFromGitHub {
owner = "dandavison";
repo = pname;
rev = version;
sha256 = "0y3gkan5v0d6637yf5p5a9dklyv5zngw7a8pyqzj4ixys72ixg20";
};
cargoSha256 = "15sh2lsc16nf9w7sp3avy77f4vyj0rdsm6m1bn60y8gmv2r16v6i";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
postInstall = ''
installShellCompletion --bash --name delta.bash completion/completion.bash
installShellCompletion --zsh --name _delta 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 ma27 zowoq ];
};
}