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.

60 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
, pkg-config
, oniguruma
, stdenv
, darwin
, git
}:
2019-10-04 09:20:00 +00:00
rustPlatform.buildRustPackage rec {
pname = "delta";
version = "0.16.5";
2019-10-04 09:20:00 +00:00
src = fetchFromGitHub {
owner = "dandavison";
repo = pname;
rev = version;
hash = "sha256-W6XtfXfOP8QfQ0t5hquFdYvCO9muE50N1fQsNtnOzfM=";
2019-10-04 09:20:00 +00:00
};
cargoHash = "sha256-SNKbgEyelJCHKCaBRfCGc3RECGABtZzMC2rCbhzqZtU=";
2020-04-26 23:17:00 +00:00
nativeBuildInputs = [
installShellFiles
pkg-config
];
2020-04-26 23:17:00 +00:00
buildInputs = [
oniguruma
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk_11_0.frameworks.Foundation
];
nativeCheckInputs = [ git ];
env = {
RUSTONIG_SYSTEM_LIBONIG = true;
};
2020-04-26 23:17:00 +00:00
postInstall = ''
installShellCompletion --cmd delta \
etc/completion/completion.{bash,fish,zsh}
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 figsoda ];
2023-09-28 20:40:14 +00:00
mainProgram = "delta";
2019-10-04 09:20:00 +00:00
};
}