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

40 lines
1,010 B
Nix
Raw Normal View History

{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, installShellFiles
, libiconv
, Security
}:
2019-10-04 09:20:00 +00:00
rustPlatform.buildRustPackage rec {
pname = "delta";
version = "0.7.1";
2019-10-04 09:20:00 +00:00
src = fetchFromGitHub {
owner = "dandavison";
repo = pname;
rev = version;
sha256 = "02gm3fxqq91gn1hffy9kc6dkc0y7p09sl6f8njfpsaficij4bs7a";
2019-10-04 09:20:00 +00:00
};
cargoSha256 = "1w1w98vhjd561mkiwv89zb8k0nf1p5fc67jb5dddwg9nj6mqjrhp";
2020-04-26 23:17:00 +00:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ 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
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 ];
2019-10-04 09:20:00 +00:00
};
}