Commit 02fe1e94 authored by figsoda's avatar figsoda
Browse files
parent 36226e3b
Loading
Loading
Loading
Loading
+16 −9
Original line number Diff line number Diff line
{ lib, stdenv, rustPlatform, fetchFromGitHub, libiconv, Foundation }:
{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, darwin
}:

rustPlatform.buildRustPackage rec {
  pname = "dua";
  version = "2.19.2";

  buildInputs = lib.optionals stdenv.isDarwin [ libiconv Foundation ];
  version = "2.20.1";

  src = fetchFromGitHub {
    owner = "Byron";
    repo = "dua-cli";
    rev = "v${version}";
    sha256 = "sha256-A39lYXkHinvppZVm2V9HXmtcbR4jOiHRtABQeryqLG8=";
    hash = "sha256-yBPzf0ZpL49CupdtxjEo9QiOC5vwTcqdfAC2Q6WcNhE=";
    # Remove unicode file names which leads to different checksums on HFS+
    # vs. other filesystems because of unicode normalisation.
    postFetch = ''
@@ -18,15 +21,19 @@ rustPlatform.buildRustPackage rec {
    '';
  };

  cargoHash = "sha256-7SrNPf1inu8zaIMErJ6zADDFkLMPvR6zCg44Vv1DarM=";
  cargoHash = "sha256-jgPOC8xtxYyKhYzsJezefwgopVL+1MED+Wf5h6bCYBg=";

  buildInputs = lib.optionals stdenv.isDarwin [
    darwin.apple_sdk.frameworks.Foundation
  ];

  doCheck = false;

  meta = with lib; {
    description = "A tool to conveniently learn about the disk usage of directories, fast!";
    description = "A tool to conveniently learn about the disk usage of directories";
    homepage = "https://github.com/Byron/dua-cli";
    changelog = "https://github.com/Byron/dua-cli/raw/v${version}/CHANGELOG.md";
    changelog = "https://github.com/Byron/dua-cli/blob/v${version}/CHANGELOG.md";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ killercup ];
    maintainers = with maintainers; [ figsoda killercup ];
  };
}
+1 −3
Original line number Diff line number Diff line
@@ -4614,9 +4614,7 @@ with pkgs;
  dtrx = callPackage ../tools/compression/dtrx { };
  dua = callPackage ../tools/misc/dua {
    inherit (darwin.apple_sdk.frameworks) Foundation;
  };
  dua = callPackage ../tools/misc/dua { };
  duf = callPackage ../tools/misc/duf { };