2019-05-09 04:06:00 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkgconfig
|
|
|
|
, libxslt
|
|
|
|
, docbook_xsl
|
|
|
|
, udev
|
|
|
|
, libgudev
|
|
|
|
, libusb1
|
2019-09-08 09:55:14 +01:00
|
|
|
, glib
|
2019-05-09 04:06:00 +01:00
|
|
|
, gobject-introspection
|
2019-09-08 09:55:14 +01:00
|
|
|
, gettext
|
|
|
|
, systemd
|
|
|
|
, useIMobileDevice ? true
|
|
|
|
, libimobiledevice
|
2012-08-21 13:34:04 +01:00
|
|
|
}:
|
2011-07-25 01:29:15 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
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
|
|
|
|
2019-09-08 09:55:14 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
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 = [
|
2019-09-08 09:55:14 +01:00
|
|
|
docbook_xsl
|
|
|
|
gettext
|
|
|
|
gobject-introspection
|
|
|
|
libxslt
|
2019-05-09 04:06:00 +01:00
|
|
|
pkgconfig
|
|
|
|
];
|
2011-08-26 15:57:48 +01:00
|
|
|
|
2019-05-09 04:06:00 +01:00
|
|
|
buildInputs = [
|
|
|
|
libgudev
|
|
|
|
libusb1
|
2019-09-08 09:55:14 +01:00
|
|
|
udev
|
|
|
|
systemd
|
2019-05-09 04:06:00 +01:00
|
|
|
]
|
2019-09-08 09:55:14 +01:00
|
|
|
++ stdenv.lib.optional useIMobileDevice libimobiledevice
|
2019-05-09 04:06:00 +01:00
|
|
|
;
|
2011-07-25 01:29:15 +01:00
|
|
|
|
2019-09-08 09:55:14 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
2019-05-09 04:06:00 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--localstatedir=/var"
|
2019-09-08 09:55:14 +01:00
|
|
|
"--with-backend=linux"
|
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-09-08 09:55:14 +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
|
|
|
};
|
|
|
|
}
|