nixpkgs/pkgs/os-specific/linux/pm-utils/default.nix
Matthew Justin Bauer 2eacddf0dc treewide: homepage URL fixes (#28475)
* pgadmin: use https homepage

* msn-pecan: move homepage to github

google code is now unavailable

* pidgin-latex: use https for homepage

* pidgin-opensteamworks: use github for homepage

google code is unavailable

* putty: use https for homepage

* ponylang: use https for homepage

* picolisp: use https for homepage

* phonon: use https for homepage

* pugixml: use https for homepage

* pioneer: use https for homepage

* packer: use https for homepage

* pokerth: usee https for homepage

* procps-ng: use https for homepage

* pycaml: use https for homepage

* proot: move homepage to .github.io

* pius: use https for homepage

* pdfread: use https for homepage

* postgresql: use https for homepage

* ponysay: move homepage to new site

* prometheus: use https for homepage

* powerdns: use https for homepage

* pm-utils: use https for homepage

* patchelf: move homepage to https

* tesseract: move homepage to github

* quodlibet: move homepage from google code

* jbrout: move homepage from google code

* eiskaltdcpp: move homepage to github

* nodejs: use https to homepage

* nix: use https for homepage

* pdf2djvu: move homepage from google code

* game-music-emu: move homepage from google code

* vacuum: move homepae from google code
2017-08-22 20:50:04 +02:00

56 lines
1.7 KiB
Nix

{ stdenv, fetchurl, coreutils, gnugrep, utillinux, kmod
, procps, kbd, dbus_tools }:
let
binPath = stdenv.lib.makeBinPath
[ coreutils gnugrep utillinux kmod procps kbd dbus_tools ];
sbinPath = stdenv.lib.makeSearchPathOutput "bin" "sbin"
[ procps ];
in
stdenv.mkDerivation rec {
name = "pm-utils-1.4.1";
src = fetchurl {
url = "http://pm-utils.freedesktop.org/releases/${name}.tar.gz";
sha256 = "02qc6zaf7ams6qcc470fwb6jvr4abv3lrlx16clqpn36501rkn4f";
};
configureFlags = "--sysconfdir=/etc";
preConfigure =
''
# Install the manpages (xmlto isn't really needed).
substituteInPlace man/Makefile.in --replace '@HAVE_XMLTO_TRUE@' ""
# 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)"
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 = https://pm-utils.freedesktop.org/wiki/;
description = "A small collection of scripts that handle suspend and resume on behalf of HAL";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
};
}