2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, installShellFiles
|
2022-04-27 09:35:20 +00:00
|
|
|
, pandoc
|
|
|
|
, testers
|
2022-01-19 23:45:15 +00:00
|
|
|
, lsd
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "lsd";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "0.22.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Peltoche";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-YeSEaamtIjip2nLBw/1/RSkr6ZL0p1GG2pHU14Ry6XU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
cargoSha256 = "sha256-JsPGw5hjNy+yTZiSBeF05o9Zl6pYXxEI4kIDLY6Q54Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles pandoc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2022-04-27 09:35:20 +00:00
|
|
|
pandoc --standalone --to man doc/lsd.md -o lsd.1
|
|
|
|
installManPage lsd.1
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
installShellCompletion $releaseDir/build/lsd-*/out/{_lsd,lsd.{bash,fish}}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
# Found argument '--test-threads' which wasn't expected, or isn't valid in this context
|
|
|
|
doCheck = false;
|
2020-10-27 00:29:36 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
2022-01-19 23:45:15 +00:00
|
|
|
package = lsd;
|
|
|
|
};
|
2020-11-30 08:33:03 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/Peltoche/lsd";
|
|
|
|
description = "The next gen ls command";
|
|
|
|
license = licenses.asl20;
|
2021-03-09 03:18:52 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne marsam zowoq SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|