3
0
Fork 0
forked from mirrors/nixpkgs
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 10:20:00 +01:00
rustPlatform.buildRustPackage rec {
pname = "delta";
version = "0.5.1";
2019-10-04 10:20:00 +01:00
src = fetchFromGitHub {
owner = "dandavison";
repo = pname;
rev = version;
sha256 = "17cmwkha25hwsvnjcp388zd9kwacfq7adjp0sjw59y0vyr1maf22";
2019-10-04 10:20:00 +01:00
};
cargoSha256 = "1bji818cmkl0286a4qcnfiwibnqd5q5fvzmzgk5cabrdwaag2ia5";
2020-04-27 00:17:00 +01:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
2020-04-27 00:17:00 +01:00
postInstall = ''
installShellCompletion --bash --name delta.bash etc/completion/completion.bash
installShellCompletion --zsh --name _delta etc/completion/completion.zsh
2020-04-27 00:17:00 +01:00
'';
2019-10-04 10:20:00 +01: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 10:20:00 +01:00
license = licenses.mit;
maintainers = with maintainers; [ marsam zowoq ];
2019-10-04 10:20:00 +01:00
};
}