mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
Add phc-intel: undervolt Intel CPUs under Linux
This commit is contained in:
parent
daa5938c6a
commit
1f6c2a97ef
47
pkgs/os-specific/linux/phc-intel/default.nix
Normal file
47
pkgs/os-specific/linux/phc-intel/default.nix
Normal file
@ -0,0 +1,47 @@
|
||||
{ stdenv, fetchurl, kernel, which }:
|
||||
|
||||
assert stdenv.isLinux;
|
||||
# don't bother with older versions, though some would probably work:
|
||||
assert stdenv.lib.versionAtLeast kernel.version "4.0";
|
||||
|
||||
let version = "0.4.0-rev17"; in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "linux-phc-intel-${version}-${kernel.version}";
|
||||
|
||||
src = fetchurl {
|
||||
sha256 = "1fdfpghnsa5s98lisd2sn0vplrq0n54l0pkyyzkyb77z4fa6bs4p";
|
||||
url = "http://www.linux-phc.org/forum/download/file.php?id=166";
|
||||
name = "phc-intel-pack-rev17.tar.bz2";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
inherit version;
|
||||
description = "Undervolting kernel driver for Intel processors";
|
||||
longDescription = ''
|
||||
PHC is a Linux kernel patch to undervolt processors. This can divide the
|
||||
power consumption of the CPU by two or more, increasing battery life
|
||||
while noticably reducing fan noise. This driver works only on supported
|
||||
Intel architectures.
|
||||
'';
|
||||
homepage = http://www.linux-phc.org/;
|
||||
downloadPage = "http://www.linux-phc.org/forum/viewtopic.php?f=7&t=267";
|
||||
license = with licenses; gpl2;
|
||||
platforms = with platforms; linux;
|
||||
maintainers = with maintainers; [ nckx ];
|
||||
};
|
||||
|
||||
buildInputs = [ which ];
|
||||
|
||||
makeFlags = "KERNELSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build DESTDIR=$(out)";
|
||||
|
||||
configurePhase = ''
|
||||
echo make $makeFlags brave
|
||||
'';
|
||||
|
||||
enableParallelBuilding = false;
|
||||
|
||||
installPhase = ''
|
||||
install -m 755 -d $out/lib/modules/${kernel.version}/extra/
|
||||
install -m 644 *.ko $out/lib/modules/${kernel.version}/extra/
|
||||
'';
|
||||
}
|
@ -9374,6 +9374,8 @@ let
|
||||
|
||||
perf = callPackage ../os-specific/linux/kernel/perf.nix { };
|
||||
|
||||
phc-intel = callPackage ../os-specific/linux/phc-intel { };
|
||||
|
||||
prl-tools = callPackage ../os-specific/linux/prl-tools { };
|
||||
|
||||
psmouse_alps = callPackage ../os-specific/linux/psmouse-alps { };
|
||||
|
Loading…
Reference in New Issue
Block a user