about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/dust/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/dust/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/dust/default.nix17
1 files changed, 13 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/tools/misc/dust/default.nix b/nixpkgs/pkgs/tools/misc/dust/default.nix
index 88498f9b5dff..2e08e0654f82 100644
--- a/nixpkgs/pkgs/tools/misc/dust/default.nix
+++ b/nixpkgs/pkgs/tools/misc/dust/default.nix
@@ -1,14 +1,14 @@
-{ lib, fetchFromGitHub, rustPlatform }:
+{ stdenv, lib, fetchFromGitHub, rustPlatform, AppKit, installShellFiles }:
 
 rustPlatform.buildRustPackage rec {
   pname = "du-dust";
-  version = "0.8.1";
+  version = "0.8.6";
 
   src = fetchFromGitHub {
     owner = "bootandy";
     repo = "dust";
     rev = "v${version}";
-    sha256 = "sha256-7hhg54x8EZ3x40a8kaOUzhyHDF0CJ5dZibGVvcFF9zk=";
+    sha256 = "sha256-PEW13paHNQ1JAz9g3pIdCB1f1KqIz8XC4gGE0z/glOk=";
     # Remove unicode file names which leads to different checksums on HFS+
     # vs. other filesystems because of unicode normalisation.
     postFetch = ''
@@ -16,10 +16,19 @@ rustPlatform.buildRustPackage rec {
     '';
   };
 
-  cargoSha256 = "sha256-fbNP89xg0Di/p/y78C9kar3UKOqkAJ94rJqZOWK3Rp0=";
+  cargoHash = "sha256-VJBmVidLkx4nIQULtDoywV4QGmgf53YAAXLJH/LZ/j0=";
+
+  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";