From c5940b2e45cfd251b9f7c67f2697435f35416eb1 Mon Sep 17 00:00:00 2001 From: Ali Rizvi Date: Thu, 17 Oct 2024 00:17:51 -0400 Subject: [PATCH] intel-lpmd: init at 0.0.8 --- pkgs/by-name/in/intel-lpmd/package.nix | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 pkgs/by-name/in/intel-lpmd/package.nix diff --git a/pkgs/by-name/in/intel-lpmd/package.nix b/pkgs/by-name/in/intel-lpmd/package.nix new file mode 100644 index 0000000000000..6c74d078bf769 --- /dev/null +++ b/pkgs/by-name/in/intel-lpmd/package.nix @@ -0,0 +1,62 @@ +{ + lib, + stdenv, + fetchFromGitHub, + + autoreconfHook, + pkg-config, + + glib, + gtk-doc, + libnl, + libxml2, + systemd, + upower, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "intel-lpmd"; + version = "0.0.8"; + + src = fetchFromGitHub { + owner = "intel"; + repo = "intel-lpmd"; + rev = "refs/tags/v${finalAttrs.version}"; + hash = "sha256-Af8H+hX9S7+AlFxFvClsRgEgt+bYqy9T+IWUkbUPVEw="; + }; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + + glib + gtk-doc + libnl + libxml2 + systemd + upower + ]; + + configureFlags = [ + ''--with-dbus-sys-dir="${placeholder "out"}/etc/dbus-1"'' + ''--with-systemdsystemunitdir="${placeholder "out"}/lib/systemd/system"'' + ]; + + meta = with lib; { + homepage = "https://github.com/intel/intel-lpmd"; + description = "Linux daemon used to optimize active idle power."; + longDescription = '' + Intel Low Power Model Daemon is a Linux daemon used to optimize active + idle power. It selects a set of most power efficient CPUs based on + configuration file or CPU topology. Based on system utilization and other + hints, it puts the system into Low Power Mode by activate the power + efficient CPUs and disable the rest, and restore the system from Low Power + Mode by activating all CPUs. + ''; + + platform = platforms.linux; + license = licenses.gpl2Only; + maintainers = with maintainers; [ frontear ]; + + mainProgram = "intel_lpmd"; + }; +})