2022-09-13 21:02:58 +00:00
|
|
|
|
{ lib
|
|
|
|
|
, gitSupport ? true
|
|
|
|
|
, stdenv
|
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
, rustPlatform
|
|
|
|
|
, cmake
|
|
|
|
|
, pandoc
|
|
|
|
|
, pkg-config
|
|
|
|
|
, zlib
|
|
|
|
|
, Security
|
|
|
|
|
, libiconv
|
|
|
|
|
, installShellFiles
|
2018-03-01 17:24:57 +00:00
|
|
|
|
}:
|
2016-02-15 20:43:31 +00:00
|
|
|
|
|
2023-06-29 07:40:02 +00:00
|
|
|
|
rustPlatform.buildRustPackage {
|
2019-08-31 11:41:23 +00:00
|
|
|
|
pname = "exa";
|
2023-06-29 07:40:02 +00:00
|
|
|
|
version = "unstable-2023-03-01";
|
2016-02-15 20:43:31 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "ogham";
|
2023-06-29 07:40:02 +00:00
|
|
|
|
repo = "exa";
|
|
|
|
|
rev = "c697d066702ab81ce0684fedb4c638e0fc0473e8";
|
|
|
|
|
hash = "sha256-sSEnZLL0n7Aw72fPNJmyRxSLXCMC5uWwfTy2fpsuo6c=";
|
2016-02-15 20:43:31 +00:00
|
|
|
|
};
|
|
|
|
|
|
2023-06-29 07:40:02 +00:00
|
|
|
|
cargoHash = "sha256-/sxiQMWix4GR12IzuvXbx56mZhbcFpd+NJ49S2N+jzw=";
|
2022-06-02 14:31:02 +00:00
|
|
|
|
|
2021-09-07 06:19:50 +00:00
|
|
|
|
nativeBuildInputs = [ cmake pkg-config installShellFiles pandoc ];
|
2018-03-01 17:24:57 +00:00
|
|
|
|
buildInputs = [ zlib ]
|
2021-02-12 04:18:07 +00:00
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv Security ];
|
2016-02-15 20:43:31 +00:00
|
|
|
|
|
2022-09-13 21:02:58 +00:00
|
|
|
|
buildNoDefaultFeatures = true;
|
|
|
|
|
buildFeatures = lib.optional gitSupport "git";
|
|
|
|
|
|
2021-09-07 06:19:50 +00:00
|
|
|
|
outputs = [ "out" "man" ];
|
2018-05-13 19:49:23 +00:00
|
|
|
|
|
2021-09-07 06:19:50 +00:00
|
|
|
|
postInstall = ''
|
2021-02-27 10:25:04 +00:00
|
|
|
|
pandoc --standalone -f markdown -t man man/exa.1.md > man/exa.1
|
|
|
|
|
pandoc --standalone -f markdown -t man man/exa_colors.5.md > man/exa_colors.5
|
|
|
|
|
installManPage man/exa.1 man/exa_colors.5
|
2019-09-08 21:59:09 +00:00
|
|
|
|
installShellCompletion \
|
2023-06-29 07:40:02 +00:00
|
|
|
|
--bash completions/bash/exa \
|
|
|
|
|
--fish completions/fish/exa.fish \
|
|
|
|
|
--zsh completions/zsh/_exa
|
2018-05-13 19:49:23 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
|
meta = with lib; {
|
2016-02-15 20:43:31 +00:00
|
|
|
|
description = "Replacement for 'ls' written in Rust";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
exa 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. exa is
|
|
|
|
|
written in Rust, so it’s small, fast, and portable.
|
|
|
|
|
'';
|
2023-06-29 07:40:02 +00:00
|
|
|
|
changelog = "https://github.com/ogham/exa/releases";
|
2020-04-01 01:11:51 +00:00
|
|
|
|
homepage = "https://the.exa.website";
|
2016-02-15 20:43:31 +00:00
|
|
|
|
license = licenses.mit;
|
2021-04-03 17:37:11 +00:00
|
|
|
|
maintainers = with maintainers; [ ehegnes lilyball globin fortuneteller2k ];
|
2016-02-15 20:43:31 +00:00
|
|
|
|
};
|
|
|
|
|
}
|