2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
2023-01-20 10:41:00 +00:00
|
|
|
, stdenv
|
|
|
|
, darwin
|
2023-01-11 07:51:40 +00:00
|
|
|
}:
|
2021-04-18 02:13:31 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "macchina";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "6.1.8";
|
2021-04-18 02:13:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Macchina-CLI";
|
|
|
|
repo = pname;
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-MntHq5nphfjbO0Rx7v6WjsnabSMH5Ke3aR9/embG/rk=";
|
2021-04-18 02:13:31 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
cargoHash = "sha256-w8WIpT8rUe7olB5kdpDyrId6D698AhcqzsfpOlutaHQ=";
|
2021-04-18 02:13:31 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
2023-01-20 10:41:00 +00:00
|
|
|
darwin.apple_sdk.frameworks.AppKit
|
|
|
|
darwin.apple_sdk.frameworks.DisplayServices
|
2023-01-11 07:51:40 +00:00
|
|
|
];
|
2021-04-18 02:13:31 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2023-01-20 10:41:00 +00:00
|
|
|
installManPage doc/macchina.{1,7}
|
2021-04-18 02:13:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A fast, minimal and customizable system information fetcher";
|
|
|
|
homepage = "https://github.com/Macchina-CLI/macchina";
|
|
|
|
changelog = "https://github.com/Macchina-CLI/macchina/releases/tag/v${version}";
|
|
|
|
license = with licenses; [ mit ];
|
2023-01-20 10:41:00 +00:00
|
|
|
maintainers = with maintainers; [ _414owen figsoda ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "macchina";
|
2021-04-18 02:13:31 +00:00
|
|
|
};
|
|
|
|
}
|