From fbb114107d7fae6c0488cc7cc30d4786fc1dd9c6 Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Mon, 26 Nov 2018 07:12:45 +0000 Subject: wayland: fix cross-build --- pkgs/development/libraries/wayland/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'pkgs/development/libraries/wayland') diff --git a/pkgs/development/libraries/wayland/default.nix b/pkgs/development/libraries/wayland/default.nix index 866b1232aef52..c694cc7b44522 100644 --- a/pkgs/development/libraries/wayland/default.nix +++ b/pkgs/development/libraries/wayland/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, pkgconfig -, libffi, libxml2 +, libffi, libxml2, wayland , expat ? null # Build wayland-scanner (currently cannot be disabled as of 1.7.0) }: @@ -15,9 +15,18 @@ stdenv.mkDerivation rec { sha256 = "1xajhxad43izq9f7sbww1hlg42nayijy8xnp21kgpk09c6sw4wjf"; }; - configureFlags = [ "--with-scanner" "--disable-documentation" ]; - - nativeBuildInputs = [ pkgconfig ]; + configureFlags = [ + "--disable-documentation" + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + "--with-host-scanner" + ]; + + nativeBuildInputs = [ + pkgconfig + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + # for wayland-scanner during build + wayland + ]; buildInputs = [ libffi /* docbook_xsl doxygen graphviz libxslt xmlto */ expat libxml2 ]; -- cgit 1.4.1