Commit 9704a4f8 authored by Alyssa Ross's avatar Alyssa Ross
Browse files

upower: add withSystemd option

Since 7f2a6f17 ("xdg-desktop-portal-gtk: Enable all default
portals unconditionally"), building upower is necessary to build
xdg-desktop-portal-gtk, but it wasn't possible for systems that can't
use systemd.

I've called the option "withSystemd" as it's the most common name for
this kind of option in Nixpkgs, and it's consistent with the package's
"withIntrospection" argument (though not "useIMobileDevice").
parent e7a5d9ec
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
, libusb1
, glib
, gettext
, systemd
, nixosTests
, useIMobileDevice ? true
, libimobiledevice
@@ -26,6 +25,8 @@
, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
, buildPackages
, gobject-introspection
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
, systemd
}:

assert withDocs -> withIntrospection;
@@ -82,7 +83,6 @@ stdenv.mkDerivation (finalAttrs: {
    libgudev
    libusb1
    udev
    systemd
  ] ++ lib.optionals withIntrospection [
    # Duplicate from nativeCheckInputs until https://github.com/NixOS/nixpkgs/issues/161570 is solved
    umockdev
@@ -94,6 +94,8 @@ stdenv.mkDerivation (finalAttrs: {
      pp.pygobject3
      pp.packaging
    ]))
  ] ++ lib.optionals withSystemd [
    systemd
  ] ++ lib.optionals useIMobileDevice [
    libimobiledevice
  ];