2025-01-21 19:00:55 -08:00

49 lines
1017 B
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
udev,
pciutils,
cmake,
}:
rustPlatform.buildRustPackage rec {
pname = "powerstation";
version = "0.4.2";
src = fetchFromGitHub {
owner = "ShadowBlip";
repo = "PowerStation";
tag = "v${version}";
hash = "sha256-R6p3zuYWggnOy60iGZ6G23ig1gzezweswAxVrCB+zvU=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-3mOmDDDGW7AClG4tNuXti07lCNbK5bMnpWUnsxcxGPI=";
nativeBuildInputs = [
cmake
pkg-config
rustPlatform.bindgenHook
];
buildInputs = [
udev
pciutils
];
postInstall = ''
cp -r rootfs/usr/* $out/
'';
meta = {
description = "Open source TDP control and performance daemon with DBus interface";
homepage = "https://github.com/ShadowBlip/PowerStation";
license = lib.licenses.gpl3Plus;
changelog = "https://github.com/ShadowBlip/PowerStation/releases/tag/v${version}";
maintainers = with lib.maintainers; [ shadowapex ];
mainProgram = "powerstation";
};
}