nixpkgs/pkgs/applications/version-management/delta/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, installShellFiles
, DiskArbitration
, Foundation
, libiconv
, Security
, git
}:
2019-10-04 09:20:00 +00:00
rustPlatform.buildRustPackage rec {
pname = "delta";
version = "0.15.1";
2019-10-04 09:20:00 +00:00
src = fetchFromGitHub {
owner = "dandavison";
repo = pname;
rev = version;
sha256 = "sha256-rPtLvO6raBY6BfrP0erBaXD86W1JL8g4XC4VbkR4Pww=";
2019-10-04 09:20:00 +00:00
};
cargoSha256 = "sha256-raT8a8K05ZpiGuZdM1hNikGxqY6w0g8G1DohfybXD9s=";
2020-04-26 23:17:00 +00:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation libiconv Security ];
nativeCheckInputs = [ git ];
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
installShellCompletion --fish --name delta.fish etc/completion/completion.fish
2020-04-26 23:17:00 +00:00
'';
2019-10-04 09:20:00 +00:00
checkFlags = lib.optionals stdenv.isDarwin [
"--skip=test_diff_same_non_empty_file"
];
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 SuperSandro2000 ];
2019-10-04 09:20:00 +00:00
};
}