depot/third_party/nixpkgs/pkgs/tools/misc/dust/default.nix
Default email 410b979fe2 Project import generated by Copybara.
GitOrigin-RevId: a64e169e396460d6b5763a1de1dd197df8421688
2023-03-24 01:07:29 +01:00

39 lines
1.1 KiB
Nix

{ stdenv, lib, fetchFromGitHub, rustPlatform, AppKit, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "du-dust";
version = "0.8.5";
src = fetchFromGitHub {
owner = "bootandy";
repo = "dust";
rev = "v${version}";
sha256 = "sha256-NP87I2D3+hKfyeK+QawVopSJOKYmGNH9XvNR9GTQcls=";
# 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-weg1etimlSenKP6UNuO8iM7gbH3+7XP98xYE4VlHhhs=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ AppKit ];
doCheck = false;
postInstall = ''
installManPage man-page/dust.1
installShellCompletion completions/dust.{bash,fish} --zsh completions/_dust
'';
meta = with lib; {
description = "du + rust = dust. Like du but more intuitive";
homepage = "https://github.com/bootandy/dust";
license = licenses.asl20;
maintainers = with maintainers; [ infinisil SuperSandro2000 ];
mainProgram = "dust";
};
}