nixpkgs/pkgs/os-specific/linux/upower/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

72 lines
1.4 KiB
Nix

{ lib, stdenv
, fetchurl
, pkg-config
, libxslt
, docbook_xsl
, udev
, libgudev
, libusb1
, glib
, gobject-introspection
, gettext
, systemd
, useIMobileDevice ? true
, libimobiledevice
}:
stdenv.mkDerivation {
pname = "upower";
version = "0.99.11";
outputs = [ "out" "dev" ];
src = fetchurl {
url = "https://gitlab.freedesktop.org/upower/upower/uploads/93cfe7c8d66ed486001c4f3f55399b7a/upower-0.99.11.tar.xz";
sha256 = "1vxxvmz2cxb1qy6ibszaz5bskqdy9nd9fxspj9fv3gfmrjzzzdb4";
};
nativeBuildInputs = [
docbook_xsl
gettext
gobject-introspection
libxslt
pkg-config
];
buildInputs = [
libgudev
libusb1
udev
systemd
]
++ lib.optional useIMobileDevice libimobiledevice
;
propagatedBuildInputs = [
glib
];
configureFlags = [
"--localstatedir=/var"
"--with-backend=linux"
"--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
"--with-systemdutildir=${placeholder "out"}/lib/systemd"
"--with-udevrulesdir=${placeholder "out"}/lib/udev/rules.d"
"--sysconfdir=/etc"
];
doCheck = false; # fails with "env: './linux/integration-test': No such file or directory"
installFlags = [
"historydir=$(TMPDIR)/foo"
"sysconfdir=${placeholder "out"}/etc"
];
meta = with lib; {
homepage = "https://upower.freedesktop.org/";
description = "A D-Bus service for power management";
platforms = platforms.linux;
license = licenses.gpl2Plus;
};
}