From 0cf542bc41fa763100cde03d96b8b6f8f962e2f4 Mon Sep 17 00:00:00 2001 From: William Edwards Date: Fri, 3 Jan 2025 06:54:33 -0800 Subject: [PATCH] powerstation: init at 0.4.2 --- pkgs/by-name/po/powerstation/package.nix | 48 ++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/by-name/po/powerstation/package.nix diff --git a/pkgs/by-name/po/powerstation/package.nix b/pkgs/by-name/po/powerstation/package.nix new file mode 100644 index 000000000000..d7f3dd5f8952 --- /dev/null +++ b/pkgs/by-name/po/powerstation/package.nix @@ -0,0 +1,48 @@ +{ + 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"; + }; +}