powertop: Patch out path to /sbin/modprobe (close #8702)

The modprobe call is made via system(), so an absolute path is not
needed if modprobe is in PATH. Which it is by default at least in
NixOS and Arch.

Fixes #5424.

authored by Tuomas Tynkkynen and committed by Vladimír Čunát 88e43eb3 7c339ff1

+4
+4
pkgs/os-specific/linux/powertop/default.nix
··· 10 11 buildInputs = [ gettext libnl ncurses pciutils pkgconfig zlib ]; 12 13 meta = { 14 description = "Analyze power consumption on Intel-based laptops"; 15 license = stdenv.lib.licenses.gpl2;
··· 10 11 buildInputs = [ gettext libnl ncurses pciutils pkgconfig zlib ]; 12 13 + patchPhase = '' 14 + substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe" 15 + ''; 16 + 17 meta = { 18 description = "Analyze power consumption on Intel-based laptops"; 19 license = stdenv.lib.licenses.gpl2;