2019-12-15 01:18:50 +00:00
|
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, rustPlatform, cmake, perl, pkgconfig, zlib
|
2019-09-08 22:59:09 +01:00
|
|
|
|
, darwin, libiconv, installShellFiles
|
2018-03-01 17:24:57 +00:00
|
|
|
|
}:
|
2016-02-15 20:43:31 +00:00
|
|
|
|
|
|
|
|
|
with rustPlatform;
|
|
|
|
|
|
2017-10-03 11:17:40 +01:00
|
|
|
|
buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
|
pname = "exa";
|
2019-07-15 07:44:25 +01:00
|
|
|
|
version = "0.9.0";
|
2016-02-15 20:43:31 +00:00
|
|
|
|
|
2019-07-15 07:44:25 +01:00
|
|
|
|
cargoSha256 = "1hgjp23rjd90wyf0nq6d5akjxdfjlaps54dv23zgwjvkhw24fidf";
|
2016-02-15 20:43:31 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "ogham";
|
|
|
|
|
repo = "exa";
|
2017-06-13 14:27:51 +01:00
|
|
|
|
rev = "v${version}";
|
2019-07-15 07:44:25 +01:00
|
|
|
|
sha256 = "14qlm9zb9v22hxbbi833xaq2b7qsxnmh15s317200vz5f1305hhw";
|
2016-02-15 20:43:31 +00:00
|
|
|
|
};
|
|
|
|
|
|
2019-12-15 01:18:50 +00:00
|
|
|
|
patches = [
|
|
|
|
|
(fetchpatch {
|
|
|
|
|
# https://github.com/ogham/exa/pull/584
|
|
|
|
|
name = "fix-panic-on-broken-symlink-in-git-repository.patch";
|
|
|
|
|
url = "https://github.com/ogham/exa/pull/584/commits/a7a8e99cf3a15992afb2383435da0231917ffb54.patch";
|
|
|
|
|
sha256 = "0n5q483sz300jkp0sbb350hdinmkw7s6bmigdyr6ypz3fvygd9hx";
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
|
2019-09-08 22:59:09 +01:00
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig perl installShellFiles ];
|
2018-03-01 17:24:57 +00:00
|
|
|
|
buildInputs = [ zlib ]
|
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [
|
|
|
|
|
libiconv darwin.apple_sdk.frameworks.Security ]
|
|
|
|
|
;
|
2016-02-15 20:43:31 +00:00
|
|
|
|
|
2019-09-08 22:59:09 +01:00
|
|
|
|
outputs = [ "out" "man" ];
|
2018-05-13 20:49:23 +01:00
|
|
|
|
|
2019-09-08 22:59:09 +01:00
|
|
|
|
postInstall = ''
|
|
|
|
|
installManPage contrib/man/exa.1
|
|
|
|
|
installShellCompletion \
|
|
|
|
|
--name exa contrib/completions.bash \
|
|
|
|
|
--name exa.fish contrib/completions.fish \
|
|
|
|
|
--name _exa contrib/completions.zsh
|
2018-05-13 20:49:23 +01:00
|
|
|
|
'';
|
|
|
|
|
|
2016-02-15 20:43:31 +00:00
|
|
|
|
# Some tests fail, but Travis ensures a proper build
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
|
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.
|
|
|
|
|
'';
|
2017-10-03 11:17:40 +01:00
|
|
|
|
homepage = https://the.exa.website;
|
2016-02-15 20:43:31 +00:00
|
|
|
|
license = licenses.mit;
|
2019-08-20 18:36:05 +01:00
|
|
|
|
maintainers = with maintainers; [ ehegnes lilyball globin ];
|
2016-02-15 20:43:31 +00:00
|
|
|
|
};
|
|
|
|
|
}
|