depot/pkgs/os-specific/linux/x86_energy_perf_policy/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

27 lines
654 B
Nix

{ lib, stdenv, kernel }:
stdenv.mkDerivation {
pname = "x86_energy_perf_policy";
version = kernel.version;
src = kernel.src;
postPatch = ''
cd tools/power/x86/x86_energy_perf_policy
sed -i 's,/usr,,g' Makefile
'';
preInstall = ''
mkdir -p $out/bin $out/share/man/man8
'';
makeFlags = [ "DESTDIR=$(out)" ];
meta = with lib; {
description = "Set the energy versus performance policy preference bias on recent X86 processors";
mainProgram = "x86_energy_perf_policy";
homepage = "https://www.kernel.org/";
license = licenses.gpl2Only;
platforms = [ "i686-linux" "x86_64-linux" ]; # x86-specific
};
}