2023-01-31 18:38:00 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, rustPlatform, AppKit, installShellFiles }:
|
2018-04-18 20:11:28 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-03-06 23:33:57 +00:00
|
|
|
pname = "du-dust";
|
2023-05-07 06:52:03 +00:00
|
|
|
version = "0.8.6";
|
2018-04-18 20:11:28 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bootandy";
|
|
|
|
repo = "dust";
|
|
|
|
rev = "v${version}";
|
2023-05-07 06:52:03 +00:00
|
|
|
sha256 = "sha256-PEW13paHNQ1JAz9g3pIdCB1f1KqIz8XC4gGE0z/glOk=";
|
2020-02-19 23:18:18 +00:00
|
|
|
# Remove unicode file names which leads to different checksums on HFS+
|
|
|
|
# vs. other filesystems because of unicode normalisation.
|
2022-05-17 19:10:33 +00:00
|
|
|
postFetch = ''
|
2021-02-12 03:22:05 +00:00
|
|
|
rm -r $out/tests/test_dir_unicode/
|
2020-02-19 23:18:18 +00:00
|
|
|
'';
|
2018-04-18 20:11:28 +00:00
|
|
|
};
|
|
|
|
|
2023-05-07 06:52:03 +00:00
|
|
|
cargoHash = "sha256-VJBmVidLkx4nIQULtDoywV4QGmgf53YAAXLJH/LZ/j0=";
|
2022-09-01 10:55:50 +00:00
|
|
|
|
2023-01-31 18:38:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-09-01 10:55:50 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ AppKit ];
|
2018-04-18 20:11:28 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-01-31 18:38:00 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage man-page/dust.1
|
|
|
|
installShellCompletion completions/dust.{bash,fish} --zsh completions/_dust
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-04-18 20:11:28 +00:00
|
|
|
description = "du + rust = dust. Like du but more intuitive";
|
2020-02-19 23:18:18 +00:00
|
|
|
homepage = "https://github.com/bootandy/dust";
|
2018-04-18 20:11:28 +00:00
|
|
|
license = licenses.asl20;
|
2023-07-23 17:30:22 +00:00
|
|
|
maintainers = with maintainers; [ infinisil ];
|
2021-07-18 13:24:03 +00:00
|
|
|
mainProgram = "dust";
|
2018-04-18 20:11:28 +00:00
|
|
|
};
|
|
|
|
}
|