about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2020-03-30 16:42:55 -0400
committerGriffin Smith <root@gws.fyi>2020-03-30 16:42:55 -0400
commit84f720d9a40aae4307ab40c877864f975012b2f9 (patch)
tree916cc4a47d412b2e2e8b5553346f9cb4c83d2896
parent8b018a3fd4510a455b503debc3d4047ecb4779dd (diff)
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.
-rw-r--r--pkgs/development/libraries/cairo/default.nix4
1 files changed, 2 insertions, 2 deletions
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.