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 {
|
2024-02-29 20:09:43 +00:00
|
|
|
# Originally, this package was under the attribute `du-dust`, since `dust` was taken.
|
|
|
|
# Since then, `dust` has been freed up, allowing this package to take that attribute.
|
|
|
|
# However in order for tools like `nix-env` to detect package updates, keep `du-dust` for pname.
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "du-dust";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bootandy";
|
|
|
|
repo = "dust";
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-ERcXVLzgurY6vU+exZ5IcM0rPbWrpghDO1m2XwE5i38=";
|
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
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
cargoHash = "sha256-ubcfLNiLQ71QcD5YneMD5N1ipsR1GK5GJQ0PrJyv6qI=";
|
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;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ aaronjheng ];
|
2021-07-18 21:22:44 +00:00
|
|
|
mainProgram = "dust";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|