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>2011-07-25 00:28:18 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2011-07-25 00:28:18 +0000
commit93f36bf9ce92eb0a7f656045c1a379329c91f2ff (patch)
tree02cf7af41717b7403ec5ca26fedb7b7769a636c2 /pkgs/os-specific/linux/pm-utils
parent174886639cb291f76cfeb0295c4329924da5fa33 (diff)
downloadnixpkgs-93f36bf9ce92eb0a7f656045c1a379329c91f2ff.tar
nixpkgs-93f36bf9ce92eb0a7f656045c1a379329c91f2ff.tar.gz
nixpkgs-93f36bf9ce92eb0a7f656045c1a379329c91f2ff.tar.bz2
nixpkgs-93f36bf9ce92eb0a7f656045c1a379329c91f2ff.tar.lz
nixpkgs-93f36bf9ce92eb0a7f656045c1a379329c91f2ff.tar.xz
nixpkgs-93f36bf9ce92eb0a7f656045c1a379329c91f2ff.tar.zst
nixpkgs-93f36bf9ce92eb0a7f656045c1a379329c91f2ff.zip
* pm-utils updated to 1.4.1. Also put all runtime dependencies in its
  $PATH (because upower is called by dbus which doesn't allow setting
  the $PATH).

svn path=/nixpkgs/branches/kde-4.7/; revision=27928
Diffstat (limited to 'pkgs/os-specific/linux/pm-utils')
-rw-r--r--pkgs/os-specific/linux/pm-utils/default.nix23
1 files changed, 18 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/pm-utils/default.nix b/pkgs/os-specific/linux/pm-utils/default.nix
index b58555ba19f..56fa5eed195 100644
--- a/pkgs/os-specific/linux/pm-utils/default.nix
+++ b/pkgs/os-specific/linux/pm-utils/default.nix
@@ -1,11 +1,22 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, coreutils, gnugrep, utillinux, module_init_tools
+, procps, kbd }:
+
+let
+
+  binPath = stdenv.lib.makeSearchPath "bin"
+    [ coreutils gnugrep utillinux module_init_tools procps kbd ];
+
+  sbinPath = stdenv.lib.makeSearchPath "sbin"
+    [ procps ];
+    
+in 
 
 stdenv.mkDerivation rec {
-  name = "pm-utils-1.3.0";
+  name = "pm-utils-1.4.1";
 
   src = fetchurl {
     url = "http://pm-utils.freedesktop.org/releases/${name}.tar.gz";
-    md5 = "37d71f8adbb409442212a85a080d324d";
+    sha256 = "02qc6zaf7ams6qcc470fwb6jvr4abv3lrlx16clqpn36501rkn4f";
   };
 
   configureFlags = "--sysconfdir=/etc";
@@ -15,9 +26,11 @@ stdenv.mkDerivation rec {
       # Install the manpages (xmlto isn't really needed).
       substituteInPlace man/Makefile.in --replace '@HAVE_XMLTO_TRUE@' ""
 
-      # Don't screw up the PATH.
-      substituteInPlace pm/pm-functions.in --replace '/sbin:/usr/sbin:/bin:/usr/bin' '$PATH'
+      # Set the PATH properly.
+      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)"
     '';