From 9eb0301eb24883e49e3264b7bf6c574c165b033b Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 21 May 2018 17:08:43 -0500 Subject: [PATCH 1/2] freeciv: enable on darwin --- pkgs/games/freeciv/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix index a1c1aa9b671..ee93d162396 100644 --- a/pkgs/games/freeciv/default.nix +++ b/pkgs/games/freeciv/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, bzip2, pkgconfig, curl, lzma, gettext +{ stdenv, fetchurl, zlib, bzip2, pkgconfig, curl, lzma, gettext, libiconv , sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype, fluidsynth , gtkClient ? false, gtk2 , server ? true, readline @@ -22,7 +22,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ zlib bzip2 curl lzma gettext ] + buildInputs = [ zlib bzip2 curl lzma gettext libiconv ] ++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ] ++ optionals gtkClient [ gtk2 ] ++ optional server readline @@ -50,6 +50,6 @@ stdenv.mkDerivation { license = licenses.gpl2; maintainers = with maintainers; [ pierron ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } From 9b8b29f17518ff64c128d04d3fda37da99301877 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 20 May 2018 23:45:56 -0500 Subject: [PATCH 2/2] gtk2: fix GNOME bug #557780 URL: https://gitlab.gnome.org/GNOME/gtk/issues/303 This patch will fix the assertion generated at startup for freeciv on macOS. Conditionally applied on Darwin. Gdk:ERROR:gdkimage-quartz.c:250:_gdk_image_new_for_depth: assertion failed: (depth == 24 || depth == 32) --- pkgs/development/libraries/gtk+/2.x.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix index d35e47f312f..d87cf25e690 100644 --- a/pkgs/development/libraries/gtk+/2.x.nix +++ b/pkgs/development/libraries/gtk+/2.x.nix @@ -4,6 +4,7 @@ , cupsSupport ? true, cups ? null , gdktarget ? "x11" , AppKit, Cocoa +, fetchpatch }: assert xineramaSupport -> xorg.libXinerama != null; @@ -28,7 +29,13 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ setupHook perl pkgconfig gettext gobjectIntrospection ]; - patches = [ ./2.0-immodules.cache.patch ./gtk2-theme-paths.patch ]; + patches = [ + ./2.0-immodules.cache.patch + ./gtk2-theme-paths.patch + ] ++ optional stdenv.isDarwin (fetchpatch { + url = https://bug557780.bugzilla-attachments.gnome.org/attachment.cgi?id=306776; + sha256 = "0sp8f1r5c4j2nlnbqgv7s7nxa4cfwigvm033hvhb1ld652pjag4r"; + }); propagatedBuildInputs = with xorg; [ glib cairo pango gdk_pixbuf atk ]