2018-03-01 17:24:57 +00:00
|
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, cmake, perl, pkgconfig, zlib
|
|
|
|
|
, darwin, libiconv
|
|
|
|
|
}:
|
2016-02-15 20:43:31 +00:00
|
|
|
|
|
|
|
|
|
with rustPlatform;
|
|
|
|
|
|
2017-10-03 11:17:40 +01:00
|
|
|
|
buildRustPackage rec {
|
2017-06-13 14:27:51 +01:00
|
|
|
|
name = "exa-${version}";
|
2017-10-03 11:17:40 +01:00
|
|
|
|
version = "0.8.0";
|
2016-02-15 20:43:31 +00:00
|
|
|
|
|
2017-08-05 15:38:48 +01:00
|
|
|
|
cargoSha256 = "08zzn3a32xfjkmpawcjppn1mr26ws3iv40cckiz8ldz4qc8y9gdh";
|
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}";
|
2017-10-03 11:17:40 +01:00
|
|
|
|
sha256 = "0jy11a3xfnfnmyw1kjmv4ffavhijs8c940kw24vafklnacx5n88m";
|
2016-02-15 20:43:31 +00:00
|
|
|
|
};
|
|
|
|
|
|
2017-04-04 10:00:38 +01:00
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig perl ];
|
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
|
|
|
|
|
2018-05-13 20:49:23 +01:00
|
|
|
|
postInstall = ''
|
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
|
cp contrib/man/exa.1 $out/share/man/man1/
|
|
|
|
|
|
|
|
|
|
mkdir -p $out/share/bash-completion/completions
|
|
|
|
|
cp contrib/completions.bash $out/share/bash-completion/completions/exa
|
|
|
|
|
|
|
|
|
|
mkdir -p $out/share/fish/vendor_completions.d
|
|
|
|
|
cp contrib/completions.fish $out/share/fish/vendor_completions.d/exa.fish
|
|
|
|
|
|
|
|
|
|
mkdir -p $out/share/zsh/site-functions
|
|
|
|
|
cp contrib/completions.zsh $out/share/zsh/site-functions/_exa
|
|
|
|
|
'';
|
|
|
|
|
|
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;
|
2017-12-05 22:20:11 +00:00
|
|
|
|
maintainers = [ maintainers.ehegnes ];
|
2016-02-15 20:43:31 +00:00
|
|
|
|
};
|
|
|
|
|
}
|