2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
|
|
|
stdenv,
|
|
|
|
darwin,
|
|
|
|
nix-update-script,
|
|
|
|
testers,
|
|
|
|
bunbun,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "bunbun";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.4.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "devraza";
|
|
|
|
repo = "bunbun";
|
2024-09-19 14:19:46 +00:00
|
|
|
# TODO: remove '-bump' at next release
|
|
|
|
rev = "refs/tags/v${version}-bump";
|
|
|
|
hash = "sha256-r4xBUfNY+Q3uAC919ZQbIDgiF981FVqZCOT8XNojZP4=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-CcGfaSyCMv0Wm4QsYASBwEnpX8fKbLHRqyEcUmj2w2o=";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin (
|
|
|
|
with darwin.apple_sdk.frameworks;
|
|
|
|
[
|
|
|
|
CoreFoundation
|
|
|
|
IOKit
|
|
|
|
SystemConfiguration
|
|
|
|
]
|
|
|
|
);
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
tests.version = testers.testVersion { package = bunbun; };
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Simple and adorable sysinfo utility written in Rust";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://github.com/devraza/bunbun";
|
|
|
|
changelog = "https://github.com/devraza/bunbun/releases/tag/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ GaetanLepage ];
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "bunbun";
|
|
|
|
};
|
|
|
|
}
|