From 6f700a0b613fa886723f60c4726882d80ae293fd Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 10 Oct 2024 17:16:10 +0200 Subject: [PATCH] gnome-desktop: add withSystemd option Since 7f2a6f17fccf ("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. --- pkgs/development/libraries/gnome-desktop/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gnome-desktop/default.nix b/pkgs/development/libraries/gnome-desktop/default.nix index 381da5b8f9fd..d565b6ab79c4 100644 --- a/pkgs/development/libraries/gnome-desktop/default.nix +++ b/pkgs/development/libraries/gnome-desktop/default.nix @@ -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" ];