From b7badc6be04b7faacddc9f5864d3f3b2d37e310a Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sun, 31 Jan 2016 21:40:05 +0100 Subject: powertop: call "xset" from $PATH Patch the source code to find "xset" in $PATH rather than expecting the hard-coded path "/usr/bin/xset" to work. I've decided *not* to hard-code a proper path like "${xset}/bin/xset", because that reference greatly increases the size of the powertop closure. Since "xset" is required only for --calibrate (and that even seems to work fine without it), it felt like an optional dependency is more appropriate in this case. Thanks to @heydojo locating the source code file that needs patching. Fixes https://github.com/NixOS/nixpkgs/issues/12662. --- pkgs/os-specific/linux/powertop/default.nix | 1 + 1 file changed, 1 insertion(+) (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 ef1dbf00b52c..59083a8b040e 100644 --- a/pkgs/os-specific/linux/powertop/default.nix +++ b/pkgs/os-specific/linux/powertop/default.nix @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe" + substituteInPlace src/calibrate/calibrate.cpp --replace "/usr/bin/xset" "xset" ''; meta = { -- cgit 1.4.1