1{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv, Security }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "cargo-cache";
5 version = "0.8.3";
6
7 src = fetchFromGitHub {
8 owner = "matthiaskrgr";
9 repo = pname;
10 rev = version;
11 sha256 = "sha256-q9tYKXK8RqiqbDZ/lTxUI1Dm/h28/yZR8rTQuq+roZs=";
12 };
13
14 cargoSha256 = "sha256-275QREIcncgBk4ah/CivSz5N2m6s/XPCfp6JGChpr38=";
15
16 buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
17
18 checkFlagsArray = [ "offline_tests" ];
19
20 meta = with lib; {
21 description = "Manage cargo cache (\${CARGO_HOME}, ~/.cargo/), print sizes of dirs and remove dirs selectively";
22 homepage = "https://github.com/matthiaskrgr/cargo-cache";
23 license = with licenses; [ asl20 /* or */ mit ];
24 maintainers = with maintainers; [ Br1ght0ne ];
25 };
26}