diff options
Diffstat (limited to 'pkgs/development/libraries/gtk/2.x.nix')
-rw-r--r-- | pkgs/development/libraries/gtk/2.x.nix | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/pkgs/development/libraries/gtk/2.x.nix b/pkgs/development/libraries/gtk/2.x.nix index ed0900ee1a92..7d11b671b1b7 100644 --- a/pkgs/development/libraries/gtk/2.x.nix +++ b/pkgs/development/libraries/gtk/2.x.nix @@ -25,9 +25,9 @@ , testers , AppKit , Cocoa -, gdktarget ? if stdenv.isDarwin then "quartz" else "x11" -, cupsSupport ? config.gtk2.cups or stdenv.isLinux -, xineramaSupport ? stdenv.isLinux +, gdktarget ? if stdenv.hostPlatform.isDarwin then "quartz" else "x11" +, cupsSupport ? config.gtk2.cups or stdenv.hostPlatform.isLinux +, xineramaSupport ? stdenv.hostPlatform.isLinux }: let @@ -70,7 +70,7 @@ stdenv.mkDerivation (finalAttrs: { url = "https://gitlab.gnome.org/GNOME/gtk/-/commit/3bbf0b6176d42836d23c36a6ac410e807ec0a7a7.patch"; hash = "sha256-mstOPk9NNpUwScrdEbvGhmAv8jlds3SBdj53T0q33vM="; }) - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ./patches/2.0-gnome_bugzilla_557780_306776_freeciv_darwin.patch ./patches/2.0-darwin-x11.patch # Fixes an incompatible function pointer conversion and implicit int errors with clang 16. @@ -83,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: { gdk-pixbuf glib pango - ] ++ lib.optionals (stdenv.isLinux || stdenv.isDarwin) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) [ libXcomposite libXcursor libXi @@ -91,14 +91,14 @@ stdenv.mkDerivation (finalAttrs: { libXrender ] ++ lib.optional xineramaSupport libXinerama ++ lib.optional cupsSupport cups - ++ lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ libXdamage AppKit Cocoa ]; preConfigure = - lib.optionalString (stdenv.isDarwin + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") "MACOSX_DEPLOYMENT_TARGET=10.16"; @@ -107,7 +107,7 @@ stdenv.mkDerivation (finalAttrs: { "--sysconfdir=/etc" "--with-gdktarget=${gdktarget}" "--with-xinput=yes" - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "--disable-glibtest" "--disable-introspection" "--disable-visibility" @@ -116,6 +116,13 @@ stdenv.mkDerivation (finalAttrs: { "ac_cv_path_GDK_PIXBUF_CSOURCE=${buildPackages.gdk-pixbuf.dev}/bin/gdk-pixbuf-csource" ]; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=implicit-int" + "-Wno-error=incompatible-pointer-types" + ]; + }; + enableParallelBuilding = true; installFlags = [ |