Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
67 lines
1.9 KiB
Nix
67 lines
1.9 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
installShellFiles,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
# 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.
|
|
pname = "du-dust";
|
|
version = "1.2.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bootandy";
|
|
repo = "dust";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-AB7NTiH9Q2SNIxFXsVTPHFs+DDVRn3egk7rZKgtYs0c=";
|
|
# Remove unicode file names which leads to different checksums on HFS+
|
|
# vs. other filesystems because of unicode normalisation.
|
|
postFetch = ''
|
|
rm -r $out/tests/test_dir_unicode/
|
|
'';
|
|
};
|
|
|
|
cargoHash = "sha256-TE+VkMDcfTMSyclyRf1HiNF7Q+qgIVI5x/f8Cou/4I4=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
checkFlags = [
|
|
# disable tests that depend on the unicode files we removed above
|
|
"--skip=test_show_files_by_type"
|
|
];
|
|
|
|
preCheck = ''
|
|
# These tests depend on the disk format of the build host.
|
|
rm tests/test_exact_output.rs
|
|
rm tests/tests_symlinks.rs
|
|
'';
|
|
|
|
postInstall = ''
|
|
installManPage man-page/dust.1
|
|
installShellCompletion completions/dust.{bash,fish} --zsh completions/_dust
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
versionCheckProgram = "${placeholder "out"}/bin/dust";
|
|
versionCheckProgramArg = "--version";
|
|
doInstallCheck = true;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "du, but more intuitive";
|
|
homepage = "https://github.com/bootandy/dust";
|
|
changelog = "https://github.com/bootandy/dust/releases/tag/v${finalAttrs.version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [
|
|
defelo
|
|
];
|
|
mainProgram = "dust";
|
|
};
|
|
})
|