1 { lib, stdenv, buildPackages, kernel, pciutils, gettext }:
5 inherit (kernel) version src patches;
7 nativeBuildInputs = [ gettext ];
8 buildInputs = [ pciutils ];
11 cd tools/power/cpupower
12 sed -i 's,/bin/true,${buildPackages.coreutils}/bin/true,' Makefile
13 sed -i 's,/bin/pwd,${buildPackages.coreutils}/bin/pwd,' Makefile
14 sed -i 's,/usr/bin/install,${buildPackages.coreutils}/bin/install,' Makefile
18 "CROSS=${stdenv.cc.targetPrefix}"
19 "CC=${stdenv.cc.targetPrefix}cc"
20 "LD=${stdenv.cc.targetPrefix}cc"
23 installFlags = lib.mapAttrsToList
24 (n: v: "${n}dir=${placeholder "out"}/${v}") {
30 locale = "share/locale";
31 doc = "share/doc/cpupower";
33 bash_completion_ = "share/bash-completion/completions";
36 enableParallelBuilding = true;
39 description = "Tool to examine and tune power saving features";
40 homepage = "https://www.kernel.org/";
41 license = licenses.gpl2Only;
42 mainProgram = "cpupower";
43 platforms = platforms.linux;