2019-05-09 05:06:00 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkgconfig
|
|
|
|
, dbus-glib
|
|
|
|
, intltool
|
|
|
|
, libxslt
|
|
|
|
, docbook_xsl
|
|
|
|
, udev
|
|
|
|
, libgudev
|
|
|
|
, libusb1
|
|
|
|
, gobject-introspection
|
|
|
|
, useSystemd ? true, systemd
|
2012-08-21 14:34:04 +02:00
|
|
|
}:
|
2011-07-25 02:29:15 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-05-09 05:06:00 +02:00
|
|
|
pname = "upower";
|
|
|
|
version = "0.99.10";
|
2011-07-25 02:29:15 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-05-09 05:06:00 +02:00
|
|
|
url = https://gitlab.freedesktop.org/upower/upower/uploads/c438511024b9bc5a904f8775cfc8e4c4/upower-0.99.10.tar.xz;
|
|
|
|
sha256 = "17d2bclv5fgma2y3g8bsn9pdvspn1zrzismzdnzfivc0f2wm28k4";
|
2011-07-25 02:29:15 +02:00
|
|
|
};
|
|
|
|
|
2019-05-09 05:06:00 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
];
|
2011-08-26 16:57:48 +02:00
|
|
|
|
2019-05-09 05:06:00 +02:00
|
|
|
buildInputs = [
|
|
|
|
dbus-glib
|
|
|
|
intltool
|
|
|
|
libxslt
|
|
|
|
docbook_xsl
|
|
|
|
udev
|
|
|
|
libgudev
|
|
|
|
libusb1
|
|
|
|
gobject-introspection
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optional useSystemd systemd
|
|
|
|
;
|
2011-07-25 02:29:15 +02:00
|
|
|
|
2019-05-09 05:06:00 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--with-backend=linux"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optional useSystemd [
|
|
|
|
"--with-systemdsystemunitdir=${placeholder ''out''}/etc/systemd/system"
|
|
|
|
"--with-systemdutildir=${placeholder ''out''}/lib/systemd"
|
|
|
|
"--with-udevrulesdir=${placeholder ''out''}/lib/udev/rules.d"
|
|
|
|
]
|
|
|
|
;
|
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"
|
|
|
|
];
|
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
|
|
|
};
|
|
|
|
}
|