2019-05-09 05:06:00 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkgconfig
|
|
|
|
, libxslt
|
|
|
|
, docbook_xsl
|
|
|
|
, udev
|
|
|
|
, libgudev
|
|
|
|
, libusb1
|
2019-09-08 10:55:14 +02:00
|
|
|
, glib
|
2019-05-09 05:06:00 +02:00
|
|
|
, gobject-introspection
|
2019-09-08 10:55:14 +02:00
|
|
|
, gettext
|
|
|
|
, systemd
|
|
|
|
, useIMobileDevice ? true
|
|
|
|
, libimobiledevice
|
2012-08-21 14:34:04 +02:00
|
|
|
}:
|
2011-07-25 02:29:15 +02:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-05-09 05:06:00 +02:00
|
|
|
pname = "upower";
|
2019-09-03 16:36:40 +02:00
|
|
|
version = "0.99.11";
|
2011-07-25 02:29:15 +02:00
|
|
|
|
2019-09-08 10:55:14 +02:00
|
|
|
outputs = [ "out" "dev" ];
|
2011-07-25 02:29:15 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-09-03 16:36:40 +02:00
|
|
|
url = https://gitlab.freedesktop.org/upower/upower/uploads/93cfe7c8d66ed486001c4f3f55399b7a/upower-0.99.11.tar.xz;
|
|
|
|
sha256 = "1vxxvmz2cxb1qy6ibszaz5bskqdy9nd9fxspj9fv3gfmrjzzzdb4";
|
2011-07-25 02:29:15 +02:00
|
|
|
};
|
|
|
|
|
2019-05-09 05:06:00 +02:00
|
|
|
nativeBuildInputs = [
|
2019-09-08 10:55:14 +02:00
|
|
|
docbook_xsl
|
|
|
|
gettext
|
|
|
|
gobject-introspection
|
|
|
|
libxslt
|
2019-05-09 05:06:00 +02:00
|
|
|
pkgconfig
|
|
|
|
];
|
2011-08-26 16:57:48 +02:00
|
|
|
|
2019-05-09 05:06:00 +02:00
|
|
|
buildInputs = [
|
|
|
|
libgudev
|
|
|
|
libusb1
|
2019-09-08 10:55:14 +02:00
|
|
|
udev
|
|
|
|
systemd
|
2019-05-09 05:06:00 +02:00
|
|
|
]
|
2019-09-08 10:55:14 +02:00
|
|
|
++ stdenv.lib.optional useIMobileDevice libimobiledevice
|
2019-05-09 05:06:00 +02:00
|
|
|
;
|
2011-07-25 02:29:15 +02:00
|
|
|
|
2019-09-08 10:55:14 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
2019-05-09 05:06:00 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--localstatedir=/var"
|
2019-09-08 10:55:14 +02:00
|
|
|
"--with-backend=linux"
|
2019-09-03 18:38:57 +02: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 10:50:42 +01:00
|
|
|
"--sysconfdir=/etc"
|
2019-09-08 10:55:14 +02:00
|
|
|
];
|
2013-09-12 10:44:04 +02:00
|
|
|
|
2018-04-25 05:20:18 +02:00
|
|
|
doCheck = false; # fails with "env: './linux/integration-test': No such file or directory"
|
|
|
|
|
2019-05-09 05:06:00 +02:00
|
|
|
installFlags = [
|
|
|
|
"historydir=$(TMPDIR)/foo"
|
2019-12-03 10:50:42 +01:00
|
|
|
"sysconfdir=${placeholder "out"}/etc"
|
2019-05-09 05:06:00 +02:00
|
|
|
];
|
2011-07-25 02:29:15 +02:00
|
|
|
|
2019-05-09 05:06:00 +02:00
|
|
|
meta = with stdenv.lib; {
|
2018-01-05 20:42:46 +01:00
|
|
|
homepage = https://upower.freedesktop.org/;
|
2011-07-25 02:29:15 +02:00
|
|
|
description = "A D-Bus service for power management";
|
2019-05-09 05:06:00 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2Plus;
|
2011-07-25 02:29:15 +02:00
|
|
|
};
|
|
|
|
}
|