From 88e43eb39bcda5f8fdf41d566bc6799596177cd0 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Wed, 8 Jul 2015 15:10:33 +0300 Subject: 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. --- pkgs/os-specific/linux/powertop/default.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkgs/os-specific/linux/powertop') 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; -- cgit 1.4.1