2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2019-05-09 05:06:00 +02:00
|
|
|
, fetchurl
|
2021-01-19 07:50:56 +01:00
|
|
|
, pkg-config
|
2019-05-09 05:06:00 +02:00
|
|
|
, 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 {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "https://gitlab.freedesktop.org/upower/upower/uploads/93cfe7c8d66ed486001c4f3f55399b7a/upower-0.99.11.tar.xz";
|
2019-09-03 16:36:40 +02:00
|
|
|
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
|
2021-01-19 07:50:56 +01:00
|
|
|
pkg-config
|
2019-05-09 05:06:00 +02:00
|
|
|
];
|
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
|
|
|
]
|
2021-01-15 15:45:37 +01:00
|
|
|
++ 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
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02: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
|
|
|
};
|
|
|
|
}
|