2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, nix
|
|
|
|
, nlohmann_json
|
|
|
|
, boost
|
|
|
|
, graphviz
|
|
|
|
, Security
|
|
|
|
, pkg-config
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "nix-du";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.2.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "symphorien";
|
|
|
|
repo = "nix-du";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
sha256 = "sha256-WImnfkBU17SFQG1DzVUdsNq3hkiISNjAVZr2xGbgwHg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-gE99nCJIi6fsuxzJuU80VWXIZqVbqwBhKM2aRlhmYco=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ nix graphviz ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
boost
|
|
|
|
nix
|
2021-12-06 16:07:01 +00:00
|
|
|
nlohmann_json
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
|
2021-04-13 19:44:15 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool to determine which gc-roots take space in your nix store";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/symphorien/nix-du";
|
2021-04-13 19:44:15 +00:00
|
|
|
license = licenses.lgpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.symphorien ];
|
|
|
|
platforms = platforms.unix;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "nix-du";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|