diff --git a/pkgs/desktops/gnome-2/desktop/gtksourceview/default.nix b/pkgs/desktops/gnome-2/desktop/gtksourceview/default.nix index c69ee82fa265..7c9cd42a0e97 100644 --- a/pkgs/desktops/gnome-2/desktop/gtksourceview/default.nix +++ b/pkgs/desktops/gnome-2/desktop/gtksourceview/default.nix @@ -1,5 +1,8 @@ -{stdenv, fetchurl, pkgconfig, atk, cairo, glib, gtk, pango, - libxml2Python, perl, intltool, gettext}: +{stdenv, fetchpatch, fetchurl, autoreconfHook, pkgconfig, atk, cairo, glib +, gnome_common, gtk, pango +, libxml2Python, perl, intltool, gettext, gtk-mac-integration }: + +with stdenv.lib; stdenv.mkDerivation rec { name = "gtksourceview-${version}"; @@ -9,6 +12,29 @@ stdenv.mkDerivation rec { url = "mirror://gnome/sources/gtksourceview/2.10/${name}.tar.bz2"; sha256 = "c585773743b1df8a04b1be7f7d90eecdf22681490d6810be54c81a7ae152191e"; }; - buildInputs = [pkgconfig atk cairo glib gtk pango libxml2Python perl intltool - gettext]; + + patches = optionals stdenv.isDarwin [ + (fetchpatch { + name = "change-igemacintegration-to-gtkosxapplication.patch"; + url = "https://git.gnome.org/browse/gtksourceview/patch/?id=e88357c5f210a8796104505c090fb6a04c213902"; + sha256 = "0h5q79q9dqbg46zcyay71xn1pm4aji925gjd5j93v4wqn41wj5m7"; + }) + (fetchpatch { + name = "update-to-gtk-mac-integration-2.0-api.patch"; + url = "https://git.gnome.org/browse/gtksourceview/patch/?id=ab46e552e1d0dae73f72adac8d578e40bdadaf95"; + sha256 = "0qzrbv4hpa0v8qbmpi2vp575n13lkrvp3cgllwrd2pslw1v9q3aj"; + }) + ]; + + buildInputs = [ + pkgconfig atk cairo glib gtk + pango libxml2Python perl intltool + gettext + ] ++ optionals stdenv.isDarwin [ + autoreconfHook gnome_common gtk-mac-integration + ]; + + preConfigure = optionalString stdenv.isDarwin '' + intltoolize --force + ''; }