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