phc-intel: 0.4.0-rev{17 -> 18} for Linux 4.2

Fix build failure: http://hydra.nixos.org/build/25314451/nixlog/1
This commit is contained in:
Tobias Geerinckx-Rice 2015-08-31 20:53:41 +02:00
parent 11d1eeed7c
commit d35d991028

View File

@ -2,20 +2,41 @@
assert stdenv.isLinux;
# Don't bother with older versions, though some would probably work:
assert stdenv.lib.versionAtLeast kernel.version "4.0";
assert stdenv.lib.versionAtLeast kernel.version "4.2";
# Disable on grsecurity kernels, which break module building:
assert !kernel.features ? grsecurity;
let version = "0.4.0-rev17"; in
stdenv.mkDerivation {
let
release = "0.4.0";
revbump = "rev18"; # don't forget to change forum download id...
version = "${release}-${revbump}";
in stdenv.mkDerivation {
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";
sha256 = "1480y75yid4nw7dhzm97yb10dykinzjz34abvavsrqpq7qclhv27";
url = "http://www.linux-phc.org/forum/download/file.php?id=167";
name = "phc-intel-pack-${revbump}.tar.bz2";
};
buildInputs = [ which ];
makeFlags = with kernel; [
"DESTDIR=$(out)"
"KERNELSRC=${dev}/lib/modules/${modDirVersion}/build"
];
configurePhase = ''
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/
'';
meta = with stdenv.lib; {
inherit version;
description = "Undervolting kernel driver for Intel processors";
@ -28,22 +49,7 @@ stdenv.mkDerivation {
homepage = http://www.linux-phc.org/;
downloadPage = "http://www.linux-phc.org/forum/viewtopic.php?f=7&t=267";
license = licenses.gpl2;
platforms = with platforms; linux;
platforms = 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/
'';
}