nixpkgs/pkgs/os-specific/linux/x86_energy_perf_policy/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

28 lines
650 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.gpl2;
platforms = [ "i686-linux" "x86_64-linux" ]; # x86-specific
};
}