2019-05-09 03:06:00 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkgconfig
|
|
|
|
, dbus-glib
|
|
|
|
, intltool
|
|
|
|
, libxslt
|
|
|
|
, docbook_xsl
|
|
|
|
, udev
|
|
|
|
, libgudev
|
|
|
|
, libusb1
|
|
|
|
, gobject-introspection
|
|
|
|
, useSystemd ? true, systemd
|
2012-08-21 12:34:04 +00:00
|
|
|
}:
|
2011-07-25 00:29:15 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-05-09 03:06:00 +00:00
|
|
|
pname = "upower";
|
|
|
|
version = "0.99.10";
|
2011-07-25 00:29:15 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-05-09 03:06:00 +00:00
|
|
|
url = https://gitlab.freedesktop.org/upower/upower/uploads/c438511024b9bc5a904f8775cfc8e4c4/upower-0.99.10.tar.xz;
|
|
|
|
sha256 = "17d2bclv5fgma2y3g8bsn9pdvspn1zrzismzdnzfivc0f2wm28k4";
|
2011-07-25 00:29:15 +00:00
|
|
|
};
|
|
|
|
|
2019-05-09 03:06:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
];
|
2011-08-26 14:57:48 +00:00
|
|
|
|
2019-05-09 03:06:00 +00:00
|
|
|
buildInputs = [
|
|
|
|
dbus-glib
|
|
|
|
intltool
|
|
|
|
libxslt
|
|
|
|
docbook_xsl
|
|
|
|
udev
|
|
|
|
libgudev
|
|
|
|
libusb1
|
|
|
|
gobject-introspection
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optional useSystemd systemd
|
|
|
|
;
|
2011-07-25 00:29:15 +00:00
|
|
|
|
2019-05-09 03:06:00 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-backend=linux"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optional useSystemd [
|
|
|
|
"--with-systemdsystemunitdir=${placeholder ''out''}/etc/systemd/system"
|
|
|
|
"--with-systemdutildir=${placeholder ''out''}/lib/systemd"
|
|
|
|
"--with-udevrulesdir=${placeholder ''out''}/lib/udev/rules.d"
|
|
|
|
]
|
|
|
|
;
|
2013-09-12 08:44:04 +00:00
|
|
|
|
2018-04-25 03:20:18 +00:00
|
|
|
doCheck = false; # fails with "env: './linux/integration-test': No such file or directory"
|
|
|
|
|
2019-05-09 03:06:00 +00:00
|
|
|
installFlags = [
|
|
|
|
"historydir=$(TMPDIR)/foo"
|
|
|
|
];
|
2011-07-25 00:29:15 +00:00
|
|
|
|
2019-05-09 03:06:00 +00:00
|
|
|
meta = with stdenv.lib; {
|
2018-01-05 19:42:46 +00:00
|
|
|
homepage = https://upower.freedesktop.org/;
|
2011-07-25 00:29:15 +00:00
|
|
|
description = "A D-Bus service for power management";
|
2019-05-09 03:06:00 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2Plus;
|
2011-07-25 00:29:15 +00:00
|
|
|
};
|
|
|
|
}
|