2024-08-19 17:12:50 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
installShellFiles,
|
2024-10-18 04:17:13 +00:00
|
|
|
apple-sdk_11,
|
2024-08-19 17:12:50 +00:00
|
|
|
pandoc,
|
|
|
|
testers,
|
|
|
|
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";
|
2024-08-26 13:01:33 +00:00
|
|
|
version = "1.1.5";
|
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}";
|
2024-08-26 13:01:33 +00:00
|
|
|
hash = "sha256-LlMcBMb40yN+rlvGVsh7JaC3j9sF60YxitQQXe1q/oI=";
|
2019-03-08 18:59:12 +00:00
|
|
|
};
|
|
|
|
|
2024-08-26 13:01:33 +00:00
|
|
|
cargoHash = "sha256-yyXFtMyiMq6TaN9/7+BaBERHgubeA8SJGOr08Mn3RnY=";
|
2019-03-08 18:59:12 +00:00
|
|
|
|
2024-08-19 17:12:50 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
pandoc
|
|
|
|
];
|
2023-08-29 00:00:00 +00:00
|
|
|
|
2024-10-18 04:17:13 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ];
|
2023-08-29 00:00:00 +00:00
|
|
|
|
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
|
|
|
|
2024-08-19 17:12:50 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = lsd; };
|
2020-11-28 18:19:46 +00:00
|
|
|
|
2024-08-19 17:13:21 +00:00
|
|
|
meta = {
|
2023-08-27 18:53:45 +00:00
|
|
|
homepage = "https://github.com/lsd-rs/lsd";
|
2019-03-08 18:59:12 +00:00
|
|
|
description = "Next gen ls command";
|
2024-08-19 17:13:21 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [
|
2024-08-19 17:12:50 +00:00
|
|
|
zowoq
|
|
|
|
SuperSandro2000
|
|
|
|
];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "lsd";
|
2019-03-08 18:59:12 +00:00
|
|
|
};
|
|
|
|
}
|