summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ca/cargo-cache/package.nix
blob: 6c00cb5ac992c731c54907ac9fc79174a9720c4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
  lib,
  stdenv,
  fetchFromGitHub,
  rustPlatform,
  zlib,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "cargo-cache";
  version = "0.8.3";

  src = fetchFromGitHub {
    owner = "matthiaskrgr";
    repo = "cargo-cache";
    tag = finalAttrs.version;
    sha256 = "sha256-q9tYKXK8RqiqbDZ/lTxUI1Dm/h28/yZR8rTQuq+roZs=";
  };

  cargoHash = "sha256-cwTHJ5Cd17ur8AhEQb8FTS0mcgqg83VGjvCQP00JY6s=";

  buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
    zlib
  ];

  checkFlags = [ "offline_tests" ];

  meta = {
    description = "Manage cargo cache (\${CARGO_HOME}, ~/.cargo/), print sizes of dirs and remove dirs selectively";
    mainProgram = "cargo-cache";
    homepage = "https://github.com/matthiaskrgr/cargo-cache";
    license = with lib.licenses; [
      asl20 # or
      mit
    ];
    maintainers = with lib.maintainers; [
      matthiasbeyer
    ];
  };
})