2023-02-02 18:25:31 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, rustPlatform, AppKit, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "du-dust";
|
2023-03-24 00:07:29 +00:00
|
|
|
version = "0.8.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bootandy";
|
|
|
|
repo = "dust";
|
|
|
|
rev = "v${version}";
|
2023-03-24 00:07:29 +00:00
|
|
|
sha256 = "sha256-NP87I2D3+hKfyeK+QawVopSJOKYmGNH9XvNR9GTQcls=";
|
2020-04-24 23:36:52 +00:00
|
|
|
# Remove unicode file names which leads to different checksums on HFS+
|
|
|
|
# vs. other filesystems because of unicode normalisation.
|
2022-06-16 17:23:12 +00:00
|
|
|
postFetch = ''
|
2021-02-13 14:23:35 +00:00
|
|
|
rm -r $out/tests/test_dir_unicode/
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
cargoHash = "sha256-weg1etimlSenKP6UNuO8iM7gbH3+7XP98xYE4VlHhhs=";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ AppKit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage man-page/dust.1
|
|
|
|
installShellCompletion completions/dust.{bash,fish} --zsh completions/_dust
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "du + rust = dust. Like du but more intuitive";
|
|
|
|
homepage = "https://github.com/bootandy/dust";
|
|
|
|
license = licenses.asl20;
|
2021-02-13 14:23:35 +00:00
|
|
|
maintainers = with maintainers; [ infinisil SuperSandro2000 ];
|
2021-07-18 21:22:44 +00:00
|
|
|
mainProgram = "dust";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|