lol

powertop: fix --auto-tune

See https://lists.01.org/pipermail/powertop/2014-December/001727.html

+16 -1
+11
pkgs/os-specific/linux/powertop/auto-tune.patch
··· 1 + diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp 2 + index d2e56e3..4de5c9b 100644 3 + --- a/src/devices/devfreq.cpp 4 + +++ b/src/devices/devfreq.cpp 5 + @@ -247,6 +247,7 @@ void create_all_devfreq_devices(void) 6 + fprintf(stderr, "Devfreq not enabled\n"); 7 + is_enabled = false; 8 + closedir(dir); 9 + + dir = NULL; 10 + return; 11 + }
+5 -1
pkgs/os-specific/linux/powertop/default.nix
··· 10 10 11 11 buildInputs = [ gettext libnl ncurses pciutils pkgconfig zlib ]; 12 12 13 - patchPhase = '' 13 + # Fix --auto-tune bug: 14 + # https://lists.01.org/pipermail/powertop/2014-December/001727.html 15 + patches = [ ./auto-tune.patch ]; 16 + 17 + postPatch = '' 14 18 substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe" 15 19 ''; 16 20