a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
49 lines
1.3 KiB
Nix
49 lines
1.3 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, installShellFiles
|
|
, DiskArbitration
|
|
, Foundation
|
|
, libiconv
|
|
, Security
|
|
, git
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "delta";
|
|
version = "0.15.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dandavison";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-rPtLvO6raBY6BfrP0erBaXD86W1JL8g4XC4VbkR4Pww=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-raT8a8K05ZpiGuZdM1hNikGxqY6w0g8G1DohfybXD9s=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation libiconv Security ];
|
|
|
|
nativeCheckInputs = [ git ];
|
|
|
|
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
|
|
'';
|
|
|
|
checkFlags = lib.optionals stdenv.isDarwin [
|
|
"--skip=test_diff_same_non_empty_file"
|
|
];
|
|
|
|
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 zowoq SuperSandro2000 ];
|
|
};
|
|
}
|