summary refs log tree commit diff
path: root/pkgs/os-specific/linux/pm-utils
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-01-24 12:49:27 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-01-24 12:51:59 +0100
commited0fde7eb58bc18260a2913a68a70a9070c0f911 (patch)
tree86edc1be778c7d929929ec74cee3b7423bd590ec /pkgs/os-specific/linux/pm-utils
parent7db0642961e01333f60bc4d9cbb3126e9f3731ab (diff)
downloadnixpkgs-ed0fde7eb58bc18260a2913a68a70a9070c0f911.tar
nixpkgs-ed0fde7eb58bc18260a2913a68a70a9070c0f911.tar.gz
nixpkgs-ed0fde7eb58bc18260a2913a68a70a9070c0f911.tar.bz2
nixpkgs-ed0fde7eb58bc18260a2913a68a70a9070c0f911.tar.lz
nixpkgs-ed0fde7eb58bc18260a2913a68a70a9070c0f911.tar.xz
nixpkgs-ed0fde7eb58bc18260a2913a68a70a9070c0f911.tar.zst
nixpkgs-ed0fde7eb58bc18260a2913a68a70a9070c0f911.zip
pm-utils: Remove some powersave hooks
In particular, this should unbreak nix.readOnlyStore.
Diffstat (limited to 'pkgs/os-specific/linux/pm-utils')
-rw-r--r--pkgs/os-specific/linux/pm-utils/default.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/pm-utils/default.nix b/pkgs/os-specific/linux/pm-utils/default.nix
index f20cadabc53..2b1bfcca41b 100644
--- a/pkgs/os-specific/linux/pm-utils/default.nix
+++ b/pkgs/os-specific/linux/pm-utils/default.nix
@@ -8,8 +8,8 @@ let
 
   sbinPath = stdenv.lib.makeSearchPath "sbin"
     [ procps ];
-    
-in 
+
+in
 
 stdenv.mkDerivation rec {
   name = "pm-utils-1.4.1";
@@ -30,12 +30,22 @@ stdenv.mkDerivation rec {
       substituteInPlace pm/pm-functions.in --replace '/sbin:/usr/sbin:/bin:/usr/bin' '$PATH:${binPath}:${sbinPath}'
 
       substituteInPlace src/pm-action.in --replace 'tr ' '${coreutils}/bin/tr '
-      
+
       substituteInPlace pm/sleep.d/00logging --replace /bin/uname "$(type -P uname)"
 
       substituteInPlace pm/sleep.d/90clock --replace /sbin/hwclock hwclock
     '';
 
+  postInstall =
+    ''
+      # Remove some hooks that have doubtful usefulness.  See
+      # http://zinc.canonical.com/~cking/power-benchmarking/pm-utils-results/results.txt.
+      # In particular, journal-commit breaks things if you have
+      # read-only bind mounts, since it ends up remounting the
+      # underlying filesystem read-only.
+      rm $out/lib/pm-utils/power.d/{journal-commit,readahead}
+    '';
+
   meta = {
     homepage = http://pm-utils.freedesktop.org/wiki/;
     description = "A small collection of scripts that handle suspend and resume on behalf of HAL";