From 1f81984293c72b63d5ee2d2d2e9e36e1116238bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 18 Jun 2013 23:42:25 +0200 Subject: [PATCH] non-Linux: more adjustments Also reordered stuff in all-packages.nix. --- pkgs/development/libraries/dbus/default.nix | 2 +- pkgs/development/libraries/glib/default.nix | 4 ++-- pkgs/development/libraries/gtk+/2.x.nix | 17 +++++++++-------- pkgs/development/libraries/gtk+/3.x.nix | 4 ++-- pkgs/development/libraries/poppler/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 10 ++++------ 6 files changed, 20 insertions(+), 21 deletions(-) diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 4418e6a2ebca..d50a0076e62a 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, autoconf, automake, libtool , expat, systemd, glib, dbus_glib, python -, libX11, libICE, libSM, useX11 ? true }: +, libX11, libICE, libSM, useX11 ? stdenv.isLinux }: let version = "1.6.12"; # 1.7.* isn't recommended, even for gnome 3.8 diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 747a18f04ccc..7469b07ce866 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -33,11 +33,11 @@ stdenv.mkDerivation (rec { }; # configure script looks for d-bus but it is only needed for tests - buildInputs = [ libelf ] ++ libiconvOrEmpty; + buildInputs = [ libelf ]; nativeBuildInputs = [ perl pkgconfig gettext python ]; - propagatedBuildInputs = [ pcre zlib libffi ]; + propagatedBuildInputs = [ pcre zlib libffi ] ++ libiconvOrEmpty; configureFlags = "--with-pcre=system --disable-fam"; diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix index 1cd85ae2aa58..c7dc45aa462c 100644 --- a/pkgs/development/libraries/gtk+/2.x.nix +++ b/pkgs/development/libraries/gtk+/2.x.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, gettext, glib, atk, pango, cairo, perl, xlibs -, gdk_pixbuf, libintlOrEmpty -, xineramaSupport ? true +, gdk_pixbuf, libintlOrEmpty, x11 +, xineramaSupport ? stdenv.isLinux , cupsSupport ? true, cups ? null }: @@ -21,13 +21,14 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ perl pkgconfig gettext ]; - propagatedBuildInputs = with xlibs; - [ glib cairo pango gdk_pixbuf atk - libXrandr libXrender libXcomposite libXi libXcursor - ] + propagatedBuildInputs = with xlibs; with stdenv.lib; + [ glib cairo pango gdk_pixbuf atk ] + ++ optionals stdenv.isLinux + [ libXrandr libXrender libXcomposite libXi libXcursor ] + ++ optional stdenv.isDarwin x11 ++ libintlOrEmpty - ++ stdenv.lib.optional xineramaSupport libXinerama - ++ stdenv.lib.optionals cupsSupport [ cups ]; + ++ optional xineramaSupport libXinerama + ++ optionals cupsSupport [ cups ]; configureFlags = "--with-xinput=yes"; diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix index 796b36f821cd..8abc602c0a1f 100644 --- a/pkgs/development/libraries/gtk+/3.x.nix +++ b/pkgs/development/libraries/gtk+/3.x.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, pkgconfig, gettext , expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, xlibs -, xineramaSupport ? true -, cupsSupport ? true, cups ? null +, xineramaSupport ? stdenv.isLinux +, cupsSupport ? stdenv.isLinux, cups ? null }: assert xineramaSupport -> xlibs.libXinerama != null; diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix index a871c0ab0d72..7c392832406a 100644 --- a/pkgs/development/libraries/poppler/default.nix +++ b/pkgs/development/libraries/poppler/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchgit, pkgconfig, cmake, libiconvOrEmpty +{ stdenv, fetchurl, fetchgit, pkgconfig, cmake, libiconvOrEmpty, libintlOrEmpty , zlib, curl, cairo, freetype, fontconfig, lcms2, libjpeg, openjpeg , qt4Support ? false, qt4 ? null }: @@ -28,7 +28,7 @@ let propagatedBuildInputs = [ zlib cairo freetype fontconfig libjpeg lcms2 curl openjpeg ]; - nativeBuildInputs = [ pkgconfig cmake ] ++ libiconvOrEmpty; + nativeBuildInputs = [ pkgconfig cmake ] ++ libiconvOrEmpty ++ libintlOrEmpty; cmakeFlags = "-DENABLE_XPDF_HEADERS=ON -DENABLE_LIBCURL=ON -DENABLE_ZLIB=ON"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f016b3e2816d..4de632bb3bf5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4114,15 +4114,13 @@ let atk = callPackage ../development/libraries/atk { }; atkmm = callPackage ../development/libraries/atkmm { }; + pixman = callPackage ../development/libraries/pixman { }; + cairo = callPackage ../development/libraries/cairo { glSupport = lib.elem system lib.platforms.mesaPlatforms; }; - - pixman = callPackage ../development/libraries/pixman { }; - - cairomm = callPackage ../development/libraries/cairomm { }; - cairo_1_12_2 = callPackage ../development/libraries/cairo/1.12.2.nix { }; + cairomm = callPackage ../development/libraries/cairomm { }; pango = callPackage ../development/libraries/pango { }; pangomm = callPackage ../development/libraries/pangomm/2.28.x.nix { }; @@ -4132,7 +4130,7 @@ let gdk_pixbuf = callPackage ../development/libraries/gdk-pixbuf { }; gtk2 = callPackage ../development/libraries/gtk+/2.x.nix { - cupsSupport = config.gtk2.cups or true; + cupsSupport = config.gtk2.cups or stdenv.isLinux; }; gtk3 = lowPrio (callPackage ../development/libraries/gtk+/3.x.nix {