eza.nix 1.5 KB

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