2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2023-08-29 00:00:00 +00:00
|
|
|
, stdenv
|
2020-04-09 09:51:59 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, installShellFiles
|
2023-08-29 00:00:00 +00:00
|
|
|
, darwin
|
2022-04-26 15:13:35 +00:00
|
|
|
, pandoc
|
2022-04-20 14:40:48 +00:00
|
|
|
, testers
|
2022-01-16 10:52:47 +00:00
|
|
|
, lsd
|
2020-04-09 09:51:59 +00:00
|
|
|
}:
|
2019-03-08 18:59:12 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-03-17 19:20:03 +00:00
|
|
|
pname = "lsd";
|
2023-08-27 18:53:45 +00:00
|
|
|
version = "1.0.0";
|
2019-03-08 18:59:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-08-27 18:53:45 +00:00
|
|
|
owner = "lsd-rs";
|
|
|
|
repo = "lsd";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-syT+1LNdigUWkfJ/wkbY/kny2uW6qfpl7KmW1FjZKR8=";
|
2019-03-08 18:59:12 +00:00
|
|
|
};
|
|
|
|
|
2023-08-27 18:53:45 +00:00
|
|
|
cargoHash = "sha256-viLr76Bq9OkPMp+BoprQusMDgx59nbevVi4uxjZ+eZg=";
|
2019-03-08 18:59:12 +00:00
|
|
|
|
2022-04-26 15:13:35 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles pandoc ];
|
2023-08-29 00:00:00 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
|
|
|
|
2020-04-09 09:51:59 +00:00
|
|
|
postInstall = ''
|
2022-04-26 15:13:35 +00:00
|
|
|
pandoc --standalone --to man doc/lsd.md -o lsd.1
|
|
|
|
installManPage lsd.1
|
|
|
|
|
2023-08-27 18:53:45 +00:00
|
|
|
installShellCompletion --cmd lsd \
|
|
|
|
--bash $releaseDir/build/lsd-*/out/lsd.bash \
|
|
|
|
--fish $releaseDir/build/lsd-*/out/lsd.fish \
|
|
|
|
--zsh $releaseDir/build/lsd-*/out/_lsd
|
2019-03-08 18:59:12 +00:00
|
|
|
'';
|
|
|
|
|
2020-12-13 06:14:18 +00:00
|
|
|
# Found argument '--test-threads' which wasn't expected, or isn't valid in this context
|
|
|
|
doCheck = false;
|
2020-10-21 11:49:30 +00:00
|
|
|
|
2022-04-20 14:40:48 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
2022-01-16 10:52:47 +00:00
|
|
|
package = lsd;
|
|
|
|
};
|
2020-11-28 18:19:46 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2023-08-27 18:53:45 +00:00
|
|
|
homepage = "https://github.com/lsd-rs/lsd";
|
2019-03-08 18:59:12 +00:00
|
|
|
description = "The next gen ls command";
|
|
|
|
license = licenses.asl20;
|
2023-08-27 18:53:45 +00:00
|
|
|
maintainers = with maintainers; [ marsam zowoq SuperSandro2000 ];
|
2019-03-08 18:59:12 +00:00
|
|
|
};
|
|
|
|
}
|