Commit 6f700a0b authored by Alyssa Ross's avatar Alyssa Ross
Browse files

gnome-desktop: add withSystemd option

Since 7f2a6f17 ("xdg-desktop-portal-gtk: Enable all default
portals unconditionally"), building gnome-desktop 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.
parent 744ab7a5
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -18,11 +18,13 @@
, wayland
, libseccomp
, systemd
, udev
, bubblewrap
, gobject-introspection
, gtk-doc
, docbook-xsl-nons
, gsettings-desktop-schemas
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
}:

stdenv.mkDerivation rec {
@@ -64,11 +66,13 @@ stdenv.mkDerivation rec {
    gtk3
    gtk4
    glib
  ] ++ lib.optionals withSystemd [
    systemd
  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
    bubblewrap
    wayland
    libseccomp
    systemd
    udev
  ];

  propagatedBuildInputs = [
@@ -78,8 +82,8 @@ stdenv.mkDerivation rec {
  mesonFlags = [
    "-Dgtk_doc=true"
    "-Ddesktop_docs=false"
    (lib.mesonEnable "systemd" withSystemd)
  ] ++ lib.optionals (!stdenv.hostPlatform.isLinux) [
    "-Dsystemd=disabled"
    "-Dudev=disabled"
  ];