From 4d8adb49d5299a62c9168971036ac1417ac44fcb Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 17 Feb 2021 05:17:07 +0000 Subject: [PATCH 1/2] wayland: fix build on non-Linux The Wayland libraries themselves only build on Linux, but other platforms need wayland-scanner for cross-compiling to Linux. So for them, disable the libraries so only wayland-scanner is built. --- .../development/libraries/wayland/default.nix | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/wayland/default.nix b/pkgs/development/libraries/wayland/default.nix index fb7d1972c024..49a0356723c1 100644 --- a/pkgs/development/libraries/wayland/default.nix +++ b/pkgs/development/libraries/wayland/default.nix @@ -10,7 +10,8 @@ , libxml2 , wayland , expat ? null # Build wayland-scanner (currently cannot be disabled as of 1.7.0) -, withDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform +, withLibraries ? stdenv.isLinux +, withDocumentation ? withLibraries && stdenv.hostPlatform == stdenv.buildPlatform , graphviz-nox , doxygen , libxslt @@ -21,6 +22,9 @@ , docbook_xml_dtd_42 }: +# Documentation is only built when building libraries. +assert withDocumentation -> withLibraries; + # Require the optional to be enabled until upstream fixes or removes the configure flag assert expat != null; let @@ -45,7 +49,10 @@ stdenv.mkDerivation rec { outputs = [ "out" ] ++ lib.optionals withDocumentation [ "doc" "man" ]; separateDebugInfo = true; - mesonFlags = [ "-Ddocumentation=${lib.boolToString withDocumentation}" ]; + mesonFlags = [ + "-Dlibraries=${lib.boolToString withLibraries}" + "-Ddocumentation=${lib.boolToString withDocumentation}" + ]; postPatch = lib.optionalString withDocumentation '' patchShebangs doc/doxygen/gen-doxygen.py @@ -71,16 +78,17 @@ stdenv.mkDerivation rec { ]; buildInputs = [ - libffi expat libxml2 + ] ++ lib.optionals withLibraries [ + libffi ] ++ lib.optionals withDocumentation [ docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 ]; - meta = { + meta = with lib; { description = "Core Wayland window system code and protocol"; longDescription = '' Wayland is a project to define a protocol for a compositor to talk to its @@ -91,9 +99,9 @@ stdenv.mkDerivation rec { rendering). ''; homepage = "https://wayland.freedesktop.org/"; - license = lib.licenses.mit; # Expat version - platforms = lib.platforms.linux; - maintainers = with lib.maintainers; [ primeos codyopel ]; + license = licenses.mit; # Expat version + platforms = if withLibraries then platforms.linux else platforms.unix; + maintainers = with maintainers; [ primeos codyopel ]; }; passthru.version = version; From ae758ea389ca67b2b79158ece317eb689fdc1b1d Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 17 Feb 2021 05:21:53 +0000 Subject: [PATCH 2/2] wayland: add myself to maintainers --- pkgs/development/libraries/wayland/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/wayland/default.nix b/pkgs/development/libraries/wayland/default.nix index 49a0356723c1..99800bb2c549 100644 --- a/pkgs/development/libraries/wayland/default.nix +++ b/pkgs/development/libraries/wayland/default.nix @@ -101,7 +101,7 @@ stdenv.mkDerivation rec { homepage = "https://wayland.freedesktop.org/"; license = licenses.mit; # Expat version platforms = if withLibraries then platforms.linux else platforms.unix; - maintainers = with maintainers; [ primeos codyopel ]; + maintainers = with maintainers; [ primeos codyopel qyliss ]; }; passthru.version = version;