3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/git-and-tools/delta/default.nix

40 lines
1 KiB
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";
2021-11-24 22:45:17 +00:00
version = "0.10.0";
2019-10-04 10:20:00 +01:00
src = fetchFromGitHub {
owner = "dandavison";
repo = pname;
rev = version;
2021-11-24 22:45:17 +00:00
sha256 = "sha256-PkVZag/h1KzOWsE6+61HIixs+DldrGk9khlZy7DEbC8=";
2019-10-04 10:20:00 +01:00
};
2021-11-24 22:45:17 +00:00
cargoSha256 = "sha256-o1HyPJ81g9fLA7CKQNKg1EctoIh3W0uGzKF2YNE+Ado=";
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 SuperSandro2000 ];
2019-10-04 10:20:00 +01:00
};
}