diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/wayland')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/wayland/default.nix | 24 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/wayland/protocols.nix | 12 |
2 files changed, 26 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/libraries/wayland/default.nix b/nixpkgs/pkgs/development/libraries/wayland/default.nix index 07671ddebddc..08741c29dd6d 100644 --- a/nixpkgs/pkgs/development/libraries/wayland/default.nix +++ b/nixpkgs/pkgs/development/libraries/wayland/default.nix @@ -1,11 +1,12 @@ { lib , stdenv , fetchurl +, fetchpatch , substituteAll , meson , pkg-config , ninja -, wayland +, wayland-scanner , expat , libxml2 , withLibraries ? stdenv.isLinux @@ -37,6 +38,11 @@ stdenv.mkDerivation rec { }; patches = [ + # Picked from upstream 'main' branch for Darwin support. + (fetchpatch { + url = "https://gitlab.freedesktop.org/wayland/wayland/-/commit/f452e41264387dee4fd737cbf1af58b34b53941b.patch"; + sha256 = "00mk32a01vgn31sm3wk4p8mfwvqv3xv02rxvdj1ygnzgb1ac62r7"; + }) (substituteAll { src = ./0001-add-placeholder-for-nm.patch; nm = "${stdenv.cc.targetPrefix}nm"; @@ -64,7 +70,7 @@ stdenv.mkDerivation rec { pkg-config ninja ] ++ lib.optionals isCross [ - wayland # For wayland-scanner during the build + wayland-scanner ] ++ lib.optionals withDocumentation [ (graphviz-nox.override { pango = null; }) # To avoid an infinite recursion doxygen @@ -85,6 +91,18 @@ stdenv.mkDerivation rec { docbook_xml_dtd_42 ]; + postFixup = '' + # The pkg-config file is required for cross-compilation: + mkdir -p $bin/lib/pkgconfig/ + cat <<EOF > $bin/lib/pkgconfig/wayland-scanner.pc + wayland_scanner=$bin/bin/wayland-scanner + + Name: Wayland Scanner + Description: Wayland scanner + Version: ${version} + EOF + ''; + meta = with lib; { description = "Core Wayland window system code and protocol"; longDescription = '' @@ -99,6 +117,8 @@ stdenv.mkDerivation rec { license = licenses.mit; # Expat version platforms = if withLibraries then platforms.linux else 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; diff --git a/nixpkgs/pkgs/development/libraries/wayland/protocols.nix b/nixpkgs/pkgs/development/libraries/wayland/protocols.nix index 23258aff3e93..8a2b05aa4dff 100644 --- a/nixpkgs/pkgs/development/libraries/wayland/protocols.nix +++ b/nixpkgs/pkgs/development/libraries/wayland/protocols.nix @@ -1,19 +1,15 @@ -{ lib, stdenv, fetchurl, pkg-config -, wayland -}: +{ lib, stdenv, fetchurl, wayland-scanner }: stdenv.mkDerivation rec { pname = "wayland-protocols"; - version = "1.20"; + version = "1.21"; src = fetchurl { url = "https://wayland.freedesktop.org/releases/${pname}-${version}.tar.xz"; - sha256 = "1rsdgvkkvxs3cjhpl6agvbkm53vm7k8rg127j9y2vn33m2hvg0lp"; + sha256 = "1rfdlkzz67qsb955zqb8jbw3m22pl6ppvrvfq8bqiqcb5n24b6dr"; }; - nativeBuildInputs = [ pkg-config ]; - - buildInputs = [ wayland ]; + nativeBuildInputs = [ wayland-scanner ]; meta = { description = "Wayland protocol extensions"; |