fork/eza

git clone https://git.julia.blue/fork/eza

Christina Sørensenrefactor(nix): move eza, trycmd packages4320ec96

main
1.5 KiB55 linesraw
1# SPDX-FileCopyrightText: 2024 Christina Sørensen
2# SPDX-License-Identifier: EUPL-1.2
3{
4  pkgs,
5  naersk',
6  buildInputs,
7  ...
8}:
9
10naersk'.buildPackage rec {
11  pname = "eza";
12  version = "git";
13
14  src = ../.;
15  doCheck = true;
16
17  inherit buildInputs;
18  nativeBuildInputs = with pkgs; [
19    cmake
20    pkg-config
21    installShellFiles
22    pandoc
23  ];
24
25  buildNoDefaultFeatures = true;
26  buildFeatures = "git";
27
28  postInstall = ''
29    for page in eza.1 eza_colors.5 eza_colors-explanation.5; do
30      sed "s/\$version/${version}/g" "man/$page.md" |
31        pandoc --standalone -f markdown -t man >"man/$page"
32    done
33    installManPage man/eza.1 man/eza_colors.5 man/eza_colors-explanation.5
34    installShellCompletion \
35      --bash completions/bash/eza \
36      --fish completions/fish/eza.fish \
37      --zsh completions/zsh/_eza
38  '';
39
40  meta = with pkgs.lib; {
41    description = "A modern, maintained replacement for ls";
42    longDescription = ''
43      eza is a modern replacement for ls. It uses colours for information by
44      default, helping you distinguish between many types of files, such as
45      whether you are the owner, or in the owning group. It also has extra
46      features not present in the original ls, such as viewing the Git status
47      for a directory, or recursing into directories with a tree view. eza is
48      written in Rust, so it’s small, fast, and portable.
49    '';
50    homepage = "https://github.com/eza-community/eza";
51    license = licenses.mit;
52    mainProgram = "eza";
53    maintainers = with maintainers; [ cafkafk ];
54  };
55}