Commit af1c72c7 authored by Mario Rodas's avatar Mario Rodas
Browse files

du-dust: install man page and completions

parent 6913943e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
{ stdenv, lib, fetchFromGitHub, rustPlatform, AppKit }:
{ stdenv, lib, fetchFromGitHub, rustPlatform, AppKit, installShellFiles }:

rustPlatform.buildRustPackage rec {
  pname = "du-dust";
@@ -18,10 +18,17 @@ rustPlatform.buildRustPackage rec {

  cargoHash = "sha256-jtQ/nkD5XMD2rsq550XsRK416wOCR3OuhgGPeuC3jzc=";

  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";