2011-07-25 02:28:18 +02:00
|
|
|
{ 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
|
2009-09-25 23:43:25 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2011-07-25 02:28:18 +02:00
|
|
|
name = "pm-utils-1.4.1";
|
2009-09-25 23:43:25 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://pm-utils.freedesktop.org/releases/${name}.tar.gz";
|
2011-07-25 02:28:18 +02:00
|
|
|
sha256 = "02qc6zaf7ams6qcc470fwb6jvr4abv3lrlx16clqpn36501rkn4f";
|
2009-09-25 23:43:25 +02:00
|
|
|
};
|
|
|
|
|
2009-09-26 19:09:51 +02:00
|
|
|
configureFlags = "--sysconfdir=/etc";
|
|
|
|
|
2009-09-25 23:43:25 +02:00
|
|
|
preConfigure =
|
|
|
|
''
|
|
|
|
# Install the manpages (xmlto isn't really needed).
|
|
|
|
substituteInPlace man/Makefile.in --replace '@HAVE_XMLTO_TRUE@' ""
|
|
|
|
|
2011-07-25 02:28:18 +02:00
|
|
|
# Set the PATH properly.
|
|
|
|
substituteInPlace pm/pm-functions.in --replace '/sbin:/usr/sbin:/bin:/usr/bin' '$PATH:${binPath}:${sbinPath}'
|
2009-09-26 19:09:51 +02:00
|
|
|
|
2011-07-25 02:28:18 +02:00
|
|
|
substituteInPlace src/pm-action.in --replace 'tr ' '${coreutils}/bin/tr '
|
|
|
|
|
2009-09-26 19:09:51 +02:00
|
|
|
substituteInPlace pm/sleep.d/00logging --replace /bin/uname "$(type -P uname)"
|
2009-09-25 23:43:25 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://pm-utils.freedesktop.org/wiki/;
|
|
|
|
description = "A small collection of scripts that handle suspend and resume on behalf of HAL";
|
|
|
|
license = "GPLv2";
|
|
|
|
};
|
|
|
|
}
|