mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 20:00:10 +00:00
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
35 lines
671 B
Nix
35 lines
671 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 = {
|
|
description = "Set the energy versus performance policy preference bias on recent X86 processors";
|
|
mainProgram = "x86_energy_perf_policy";
|
|
homepage = "https://www.kernel.org/";
|
|
license = lib.licenses.gpl2Only;
|
|
platforms = [
|
|
"i686-linux"
|
|
"x86_64-linux"
|
|
]; # x86-specific
|
|
};
|
|
}
|