mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-16 01:45:11 +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
83 lines
2.3 KiB
Nix
83 lines
2.3 KiB
Nix
{
|
||
lib,
|
||
gitSupport ? true,
|
||
fetchFromGitHub,
|
||
rustPlatform,
|
||
cmake,
|
||
pandoc,
|
||
pkg-config,
|
||
zlib,
|
||
installShellFiles,
|
||
# once eza upstream gets support for setting up a compatibility symlink for exa, we should change
|
||
# the handling here from postInstall to passing the required argument to the builder.
|
||
exaAlias ? true,
|
||
}:
|
||
|
||
rustPlatform.buildRustPackage rec {
|
||
pname = "eza";
|
||
version = "0.20.11";
|
||
|
||
src = fetchFromGitHub {
|
||
owner = "eza-community";
|
||
repo = "eza";
|
||
rev = "v${version}";
|
||
hash = "sha256-JK2JXZCtrq5iVgzJ5mIrHSEhlWGgtxhKGVgbN3IuMxg=";
|
||
};
|
||
|
||
cargoHash = "sha256-5KVLxIYmWIcFcGNZUvNOrHrKTy0UD9LQvPn3IGpV6B0=";
|
||
|
||
nativeBuildInputs = [
|
||
cmake
|
||
pkg-config
|
||
installShellFiles
|
||
pandoc
|
||
];
|
||
buildInputs = [ zlib ];
|
||
|
||
buildNoDefaultFeatures = true;
|
||
buildFeatures = lib.optional gitSupport "git";
|
||
|
||
outputs = [
|
||
"out"
|
||
"man"
|
||
];
|
||
|
||
postInstall =
|
||
''
|
||
for page in eza.1 eza_colors.5 eza_colors-explanation.5; do
|
||
sed "s/\$version/v${version}/g" "man/$page.md" |
|
||
pandoc --standalone -f markdown -t man >"man/$page"
|
||
done
|
||
installManPage man/eza.1 man/eza_colors.5 man/eza_colors-explanation.5
|
||
installShellCompletion \
|
||
--bash completions/bash/eza \
|
||
--fish completions/fish/eza.fish \
|
||
--zsh completions/zsh/_eza
|
||
''
|
||
+ lib.optionalString exaAlias ''
|
||
ln -s eza $out/bin/exa
|
||
'';
|
||
|
||
meta = with lib; {
|
||
description = "Modern, maintained replacement for ls";
|
||
longDescription = ''
|
||
eza is a modern replacement for ls. It uses colours for information by
|
||
default, helping you distinguish between many types of files, such as
|
||
whether you are the owner, or in the owning group. It also has extra
|
||
features not present in the original ls, such as viewing the Git status
|
||
for a directory, or recursing into directories with a tree view. eza is
|
||
written in Rust, so it’s small, fast, and portable.
|
||
'';
|
||
homepage = "https://github.com/eza-community/eza";
|
||
changelog = "https://github.com/eza-community/eza/releases/tag/v${version}";
|
||
license = licenses.eupl12;
|
||
mainProgram = "eza";
|
||
maintainers = with maintainers; [
|
||
cafkafk
|
||
_9glenda
|
||
sigmasquadron
|
||
];
|
||
platforms = platforms.unix ++ platforms.windows;
|
||
};
|
||
}
|