diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/wayland/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/wayland/default.nix | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/libraries/wayland/default.nix b/nixpkgs/pkgs/development/libraries/wayland/default.nix index c9d0a7ad3b7c..fbed7a3b5206 100644 --- a/nixpkgs/pkgs/development/libraries/wayland/default.nix +++ b/nixpkgs/pkgs/development/libraries/wayland/default.nix @@ -8,8 +8,10 @@ , wayland-scanner , expat , libxml2 -, withLibraries ? stdenv.isLinux +, withLibraries ? stdenv.isLinux || stdenv.isDarwin +, withTests ? stdenv.isLinux , libffi +, epoll-shim , withDocumentation ? withLibraries && stdenv.hostPlatform == stdenv.buildPlatform , graphviz-nox , doxygen @@ -24,18 +26,25 @@ # Documentation is only built when building libraries. assert withDocumentation -> withLibraries; +# Tests are only built when building libraries. +assert withTests -> withLibraries; + let isCross = stdenv.buildPlatform != stdenv.hostPlatform; in stdenv.mkDerivation rec { pname = "wayland"; - version = "1.21.0"; + version = "1.22.0"; src = fetchurl { url = "https://gitlab.freedesktop.org/wayland/wayland/-/releases/${version}/downloads/${pname}-${version}.tar.xz"; - sha256 = "1b0ixya9bfw5c9jx8mzlr7yqnlyvd3jv5z8wln9scdv8q5zlvikd"; + hash = "sha256-FUCvHqaYpHHC2OnSiDMsfg/TYMjx0Sk267fny8JCWEI="; }; + patches = [ + ./darwin.patch + ]; + postPatch = lib.optionalString withDocumentation '' patchShebangs doc/doxygen/gen-doxygen.py '' + lib.optionalString stdenv.hostPlatform.isStatic '' @@ -48,8 +57,9 @@ stdenv.mkDerivation rec { separateDebugInfo = true; mesonFlags = [ - "-Dlibraries=${lib.boolToString withLibraries}" "-Ddocumentation=${lib.boolToString withDocumentation}" + "-Dlibraries=${lib.boolToString withLibraries}" + "-Dtests=${lib.boolToString withTests}" ]; depsBuildBuild = [ @@ -77,6 +87,8 @@ stdenv.mkDerivation rec { libxml2 ] ++ lib.optionals withLibraries [ libffi + ] ++ lib.optionals (withLibraries && !stdenv.hostPlatform.isLinux) [ + epoll-shim ] ++ lib.optionals withDocumentation [ docbook_xsl docbook_xml_dtd_45 @@ -95,6 +107,8 @@ stdenv.mkDerivation rec { EOF ''; + passthru = { inherit withLibraries; }; + meta = with lib; { description = "Core Wayland window system code and protocol"; longDescription = '' @@ -107,11 +121,7 @@ stdenv.mkDerivation rec { ''; homepage = "https://wayland.freedesktop.org/"; license = licenses.mit; # Expat version - platforms = if withLibraries then platforms.linux else platforms.unix; + platforms = platforms.unix; maintainers = with maintainers; [ primeos codyopel qyliss ]; - # big sur doesn't support gcc stdenv and wayland doesn't build with clang - broken = stdenv.isDarwin; }; - - passthru.version = version; } |