mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
74 lines
1.6 KiB
Nix
74 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
pkg-config,
|
|
oniguruma,
|
|
stdenv,
|
|
apple-sdk_11,
|
|
git,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "delta";
|
|
version = "0.18.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dandavison";
|
|
repo = "delta";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-fJSKGa935kwLG8WYmT9Ncg2ozpSNMzUJx0WLo1gtVAA=";
|
|
};
|
|
|
|
cargoHash = "sha256-DIWzRVTADfAZdFckhh2lIfOD13h7GP3KIOQHf/oBHgc=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs =
|
|
[
|
|
oniguruma
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
apple-sdk_11
|
|
];
|
|
|
|
nativeCheckInputs = [ git ];
|
|
|
|
env = {
|
|
RUSTONIG_SYSTEM_LIBONIG = true;
|
|
};
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd delta \
|
|
etc/completion/completion.{bash,fish,zsh}
|
|
'';
|
|
|
|
# test_env_parsing_with_pager_set_to_bat sets environment variables,
|
|
# which can be flaky with multiple threads:
|
|
# https://github.com/dandavison/delta/issues/1660
|
|
dontUseCargoParallelTests = true;
|
|
|
|
checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
# This test tries to read /etc/passwd, which fails with the sandbox
|
|
# enabled on Darwin
|
|
"--skip=test_diff_real_files"
|
|
];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/dandavison/delta";
|
|
description = "Syntax-highlighting pager for git";
|
|
changelog = "https://github.com/dandavison/delta/releases/tag/${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [
|
|
zowoq
|
|
SuperSandro2000
|
|
figsoda
|
|
];
|
|
mainProgram = "delta";
|
|
};
|
|
}
|