nixpkgs/pkgs/by-name/du/dust/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, rustPlatform, AppKit, installShellFiles }:
2018-04-18 23:11:28 +03:00
rustPlatform.buildRustPackage rec {
2024-01-20 08:30:49 +03: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.
pname = "du-dust";
2024-03-26 03:10:40 +03:00
version = "1.0.0";
2018-04-18 23:11:28 +03:00
src = fetchFromGitHub {
owner = "bootandy";
repo = "dust";
rev = "v${version}";
2024-03-26 03:10:40 +03:00
hash = "sha256-KTsB9QqcLafG2XNj8PdkzwVrFDmpBQzNyDLajT/JDz0=";
2020-02-20 02:18:18 +03:00
# Remove unicode file names which leads to different checksums on HFS+
# vs. other filesystems because of unicode normalisation.
2022-05-17 22:10:33 +03:00
postFetch = ''
2021-02-12 06:22:05 +03:00
rm -r $out/tests/test_dir_unicode/
2020-02-20 02:18:18 +03:00
'';
2018-04-18 23:11:28 +03:00
};
2024-03-26 03:10:40 +03:00
cargoHash = "sha256-d6Mnuo6JlbuHUGz+UCmC8jvNks3SpeP/aNQGXHBzB+8=";
2022-09-01 13:55:50 +03:00
nativeBuildInputs = [ installShellFiles ];
2022-09-01 13:55:50 +03:00
buildInputs = lib.optionals stdenv.isDarwin [ AppKit ];
2018-04-18 23:11:28 +03:00
doCheck = false;
postInstall = ''
installManPage man-page/dust.1
installShellCompletion completions/dust.{bash,fish} --zsh completions/_dust
'';
meta = with lib; {
2018-04-18 23:11:28 +03:00
description = "du + rust = dust. Like du but more intuitive";
2020-02-20 02:18:18 +03:00
homepage = "https://github.com/bootandy/dust";
2018-04-18 23:11:28 +03:00
license = licenses.asl20;
2024-03-26 03:10:40 +03:00
maintainers = with maintainers; [ aaronjheng ];
2021-07-18 16:24:03 +03:00
mainProgram = "dust";
2018-04-18 23:11:28 +03:00
};
}