2019-05-09 03:06:00 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkgconfig
|
|
|
|
, libxslt
|
|
|
|
, docbook_xsl
|
|
|
|
, udev
|
|
|
|
, libgudev
|
|
|
|
, libusb1
|
2019-09-08 08:55:14 +00:00
|
|
|
, glib
|
2019-05-09 03:06:00 +00:00
|
|
|
, gobject-introspection
|
2019-09-08 08:55:14 +00:00
|
|
|
, gettext
|
|
|
|
, systemd
|
|
|
|
, useIMobileDevice ? true
|
|
|
|
, libimobiledevice
|
2012-08-21 12:34:04 +00:00
|
|
|
}:
|
2011-07-25 00:29:15 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-05-09 03:06:00 +00:00
|
|
|
pname = "upower";
|
2019-09-03 14:36:40 +00:00
|
|
|
version = "0.99.11";
|
2011-07-25 00:29:15 +00:00
|
|
|
|
2019-09-08 08:55:14 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
2011-07-25 00:29:15 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-09-03 14:36:40 +00:00
|
|
|
url = https://gitlab.freedesktop.org/upower/upower/uploads/93cfe7c8d66ed486001c4f3f55399b7a/upower-0.99.11.tar.xz;
|
|
|
|
sha256 = "1vxxvmz2cxb1qy6ibszaz5bskqdy9nd9fxspj9fv3gfmrjzzzdb4";
|
2011-07-25 00:29:15 +00:00
|
|
|
};
|
|
|
|
|
2019-05-09 03:06:00 +00:00
|
|
|
nativeBuildInputs = [
|
2019-09-08 08:55:14 +00:00
|
|
|
docbook_xsl
|
|
|
|
gettext
|
|
|
|
gobject-introspection
|
|
|
|
libxslt
|
2019-05-09 03:06:00 +00:00
|
|
|
pkgconfig
|
|
|
|
];
|
2011-08-26 14:57:48 +00:00
|
|
|
|
2019-05-09 03:06:00 +00:00
|
|
|
buildInputs = [
|
|
|
|
libgudev
|
|
|
|
libusb1
|
2019-09-08 08:55:14 +00:00
|
|
|
udev
|
|
|
|
systemd
|
2019-05-09 03:06:00 +00:00
|
|
|
]
|
2019-09-08 08:55:14 +00:00
|
|
|
++ stdenv.lib.optional useIMobileDevice libimobiledevice
|
2019-05-09 03:06:00 +00:00
|
|
|
;
|
2011-07-25 00:29:15 +00:00
|
|
|
|
2019-09-08 08:55:14 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
2019-05-09 03:06:00 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--localstatedir=/var"
|
2019-09-08 08:55:14 +00:00
|
|
|
"--with-backend=linux"
|
2019-09-03 16:38:57 +00:00
|
|
|
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
|
|
|
|
"--with-systemdutildir=${placeholder "out"}/lib/systemd"
|
|
|
|
"--with-udevrulesdir=${placeholder "out"}/lib/udev/rules.d"
|
2019-12-03 09:50:42 +00:00
|
|
|
"--sysconfdir=/etc"
|
2019-09-08 08:55:14 +00:00
|
|
|
];
|
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"
|
2019-12-03 09:50:42 +00:00
|
|
|
"sysconfdir=${placeholder "out"}/etc"
|
2019-05-09 03:06:00 +00:00
|
|
|
];
|
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
|
|
|
};
|
|
|
|
}
|