2021-03-09 03:18:52 +00:00
|
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, cmake, pandoc, pkg-config, zlib
|
2021-02-13 14:23:35 +00:00
|
|
|
|
, Security, libiconv, installShellFiles
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}:
|
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
pname = "exa";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
version = "unstable-2021-01-14";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
|
cargoSha256 = "1lmjh0grpnx20y6raxnxgjkr92h395r6jk8mm2ypc4cxpxczdqvl";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "ogham";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
repo = pname;
|
|
|
|
|
rev = "13b91cced4cab012413b25c9d3e30c63548639d0";
|
|
|
|
|
sha256 = "18y4v1s102lh3gvgjwdd66qlsr75wpwpcj8zsk5y5r95a405dkfm";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
|
nativeBuildInputs = [ cmake pkg-config installShellFiles pandoc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
buildInputs = [ zlib ]
|
2021-02-13 14:23:35 +00:00
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv Security ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
|
|
|
|
|
postInstall = ''
|
2021-03-09 03:18:52 +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
|
2020-04-24 23:36:52 +00:00
|
|
|
|
installShellCompletion \
|
2021-03-09 03:18:52 +00:00
|
|
|
|
--name exa completions/completions.bash \
|
|
|
|
|
--name exa.fish completions/completions.fish \
|
|
|
|
|
--name _exa completions/completions.zsh
|
2020-04-24 23:36:52 +00:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
# Some tests fail, but Travis ensures a proper build
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +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.
|
|
|
|
|
'';
|
|
|
|
|
homepage = "https://the.exa.website";
|
|
|
|
|
license = licenses.mit;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
maintainers = with maintainers; [ ehegnes lilyball globin ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|