gspell: Enable building on Darwin

OPNA2608 967beef6 301a1bd8

+50 -1
+37
pkgs/development/libraries/gspell/0001-Darwin-build-fix.patch
···
··· 1 + From 2d6dd1c286eb57fbf968510318cafc94888b98de Mon Sep 17 00:00:00 2001 2 + From: OPNA2608 <christoph.neidahl@gmail.com> 3 + Date: Sun, 13 Jun 2021 21:56:03 +0200 4 + Subject: [PATCH] Darwin build fix 5 + 6 + --- 7 + gspell/Makefile.am | 7 +++++++ 8 + 1 file changed, 7 insertions(+) 9 + 10 + diff --git a/gspell/Makefile.am b/gspell/Makefile.am 11 + index 69ee421..7c58973 100644 12 + --- a/gspell/Makefile.am 13 + +++ b/gspell/Makefile.am 14 + @@ -95,6 +95,7 @@ nodist_libgspell_core_la_SOURCES = \ 15 + $(BUILT_SOURCES) 16 + 17 + libgspell_core_la_LIBADD = \ 18 + + $(GTK_MAC_LIBS) \ 19 + $(CODE_COVERAGE_LIBS) 20 + 21 + libgspell_core_la_CFLAGS = \ 22 + @@ -161,6 +162,12 @@ gspell_private_headers += \ 23 + gspell_private_c_files += \ 24 + gspell-osx.c 25 + 26 + +libgspell_core_la_CFLAGS += \ 27 + + -xobjective-c 28 + + 29 + +libgspell_core_la_LDFLAGS += \ 30 + + -framework Cocoa 31 + + 32 + endif # OS_OSX 33 + 34 + if HAVE_INTROSPECTION 35 + -- 36 + 2.29.3 37 +
+13 -1
pkgs/development/libraries/gspell/default.nix
··· 2 , fetchurl 3 , pkg-config 4 , libxml2 5 , glib 6 , gtk3 7 , enchant2 ··· 9 , vala 10 , gobject-introspection 11 , gnome 12 }: 13 14 stdenv.mkDerivation rec { ··· 23 sha256 = "1pdb4gbjrs8mk6r0ipw5vxyvzav1wvkjq46kiq53r3nyznfpdfyw"; 24 }; 25 26 nativeBuildInputs = [ 27 pkg-config 28 vala 29 gobject-introspection 30 libxml2 31 ]; 32 33 buildInputs = [ 34 glib 35 gtk3 36 icu 37 ]; 38 39 propagatedBuildInputs = [ ··· 53 homepage = "https://wiki.gnome.org/Projects/gspell"; 54 license = licenses.lgpl21Plus; 55 maintainers = teams.gnome.members; 56 - platforms = platforms.linux; 57 }; 58 }
··· 2 , fetchurl 3 , pkg-config 4 , libxml2 5 + , autoreconfHook 6 + , gtk-doc 7 , glib 8 , gtk3 9 , enchant2 ··· 11 , vala 12 , gobject-introspection 13 , gnome 14 + , gtk-mac-integration 15 }: 16 17 stdenv.mkDerivation rec { ··· 26 sha256 = "1pdb4gbjrs8mk6r0ipw5vxyvzav1wvkjq46kiq53r3nyznfpdfyw"; 27 }; 28 29 + patches = [ 30 + # Extracted from: https://github.com/Homebrew/homebrew-core/blob/2a27fb86b08afc7ae6dff79cf64aafb8ecc93275/Formula/gspell.rb#L125-L149 31 + ./0001-Darwin-build-fix.patch 32 + ]; 33 + 34 nativeBuildInputs = [ 35 pkg-config 36 vala 37 gobject-introspection 38 libxml2 39 + autoreconfHook 40 + gtk-doc 41 ]; 42 43 buildInputs = [ 44 glib 45 gtk3 46 icu 47 + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ 48 + gtk-mac-integration 49 ]; 50 51 propagatedBuildInputs = [ ··· 65 homepage = "https://wiki.gnome.org/Projects/gspell"; 66 license = licenses.lgpl21Plus; 67 maintainers = teams.gnome.members; 68 + platforms = platforms.unix; 69 }; 70 }