summary refs log tree commit diff
path: root/pkgs/os-specific/linux/powertop
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2015-07-08 15:10:33 +0300
committerVladimír Čunát <vcunat@gmail.com>2015-07-09 11:57:38 +0200
commit88e43eb39bcda5f8fdf41d566bc6799596177cd0 (patch)
tree67b12b9ccab091f311731c76f0595bca5e43618b /pkgs/os-specific/linux/powertop
parent7c339ff10ea5ebdd70e8df035ad6c08f5743ebaf (diff)
downloadnixlib-88e43eb39bcda5f8fdf41d566bc6799596177cd0.tar
nixlib-88e43eb39bcda5f8fdf41d566bc6799596177cd0.tar.gz
nixlib-88e43eb39bcda5f8fdf41d566bc6799596177cd0.tar.bz2
nixlib-88e43eb39bcda5f8fdf41d566bc6799596177cd0.tar.lz
nixlib-88e43eb39bcda5f8fdf41d566bc6799596177cd0.tar.xz
nixlib-88e43eb39bcda5f8fdf41d566bc6799596177cd0.tar.zst
nixlib-88e43eb39bcda5f8fdf41d566bc6799596177cd0.zip
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.
Diffstat (limited to 'pkgs/os-specific/linux/powertop')
-rw-r--r--pkgs/os-specific/linux/powertop/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/powertop/default.nix b/pkgs/os-specific/linux/powertop/default.nix
index befe16f72f21..9e32cd70cfb7 100644
--- a/pkgs/os-specific/linux/powertop/default.nix
+++ b/pkgs/os-specific/linux/powertop/default.nix
@@ -10,6 +10,10 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ gettext libnl ncurses pciutils pkgconfig zlib ];
 
+  patchPhase = ''
+    substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe"
+  '';
+
   meta = {
     description = "Analyze power consumption on Intel-based laptops";
     license = stdenv.lib.licenses.gpl2;