From 84f720d9a40aae4307ab40c877864f975012b2f9 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Mon, 30 Mar 2020 16:42:55 -0400 Subject: cairo: pass --disable-xlib to config if no x11 It appears that cairo's configure script, at least on MacOS but perhaps elsewhere, unconditionally enables xlib support, even if the library isn't present, which breaks the build on MacOS always (since x11 is disabled by default now). This explicitly passes `--disable-x11` if x11Support is set to false, which fixes the build for me. --- pkgs/development/libraries/cairo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development/libraries/cairo') diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index 80f8f9498d7c5..4f02cb057fa97 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -61,7 +61,7 @@ in stdenv.mkDerivation rec { ++ optional glSupport libGL ; # TODO: maybe liblzo but what would it be for here? - configureFlags = if stdenv.isDarwin then [ + configureFlags = (if stdenv.isDarwin then [ "--disable-dependency-tracking" "--enable-quartz" "--enable-quartz-font" @@ -71,7 +71,7 @@ in stdenv.mkDerivation rec { ++ optional xcbSupport "--enable-xcb" ++ optional glSupport "--enable-gl" ++ optional pdfSupport "--enable-pdf" - ); + )) ++ optional (!x11Support) "--disable-xlib"; preConfigure = # On FreeBSD, `-ldl' doesn't exist. -- cgit 1.4.1