nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, lib, fetchFromGitHub, rustPlatform, AppKit, installShellFiles }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "du-dust";
5 version = "0.8.6";
6
7 src = fetchFromGitHub {
8 owner = "bootandy";
9 repo = "dust";
10 rev = "v${version}";
11 sha256 = "sha256-PEW13paHNQ1JAz9g3pIdCB1f1KqIz8XC4gGE0z/glOk=";
12 # Remove unicode file names which leads to different checksums on HFS+
13 # vs. other filesystems because of unicode normalisation.
14 postFetch = ''
15 rm -r $out/tests/test_dir_unicode/
16 '';
17 };
18
19 cargoHash = "sha256-VJBmVidLkx4nIQULtDoywV4QGmgf53YAAXLJH/LZ/j0=";
20
21 nativeBuildInputs = [ installShellFiles ];
22
23 buildInputs = lib.optionals stdenv.isDarwin [ AppKit ];
24
25 doCheck = false;
26
27 postInstall = ''
28 installManPage man-page/dust.1
29 installShellCompletion completions/dust.{bash,fish} --zsh completions/_dust
30 '';
31
32 meta = with lib; {
33 description = "du + rust = dust. Like du but more intuitive";
34 homepage = "https://github.com/bootandy/dust";
35 license = licenses.asl20;
36 maintainers = with maintainers; [ infinisil SuperSandro2000 ];
37 mainProgram = "dust";
38 };
39}