From a7459efbbb0f21128f74431d1aec79ba75a72ecb Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 12 Feb 2025 18:24:08 +0100 Subject: [PATCH] flatpak: fix building with with{DocbookDocs,GtkDoc} = false --- pkgs/by-name/fl/flatpak/package.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/fl/flatpak/package.nix b/pkgs/by-name/fl/flatpak/package.nix index 5faed617b625..9ed63fdb8905 100644 --- a/pkgs/by-name/fl/flatpak/package.nix +++ b/pkgs/by-name/fl/flatpak/package.nix @@ -59,8 +59,8 @@ zstd, withAutoSideloading ? false, withDocbookDocs ? true, - withGtkDoc ? stdenv.buildPlatform.canExecute stdenv.hostPlatform, - withMan ? true, + withGtkDoc ? withDocbookDocs && stdenv.buildPlatform.canExecute stdenv.hostPlatform, + withMan ? withDocbookDocs, withSELinuxModule ? false, withSystemd ? true, }: @@ -75,10 +75,12 @@ stdenv.mkDerivation (finalAttrs: { "out" "dev" ] - ++ lib.optionals (withDocbookDocs || withGtkDoc) [ - "devdoc" + ++ lib.optionals withDocbookDocs [ "doc" ] + ++ lib.optionals withGtkDoc [ + "devdoc" + ] ++ lib.optional finalAttrs.doCheck "installedTests" ++ lib.optional withMan "man"; @@ -196,6 +198,8 @@ stdenv.mkDerivation (finalAttrs: { (lib.mesonBool "auto_sideloading" withAutoSideloading) (lib.mesonBool "installed_tests" finalAttrs.finalPackage.doCheck) (lib.mesonBool "tests" finalAttrs.finalPackage.doCheck) + (lib.mesonEnable "docbook_docs" withDocbookDocs) + (lib.mesonEnable "gtkdoc" withGtkDoc) (lib.mesonEnable "man" withMan) (lib.mesonEnable "selinux_module" withSELinuxModule) (lib.mesonOption "dbus_config_dir" (placeholder "out" + "/share/dbus-1/system.d"))