about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gspell
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-06-30 13:44:37 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-30 13:44:37 +0000
commit16f676d6bbd4f930b0017ccb20cebe5a29e17545 (patch)
tree0d554b4f16bdef502035b743457fc29ffcc5e7f7 /nixpkgs/pkgs/development/libraries/gspell
parente7caacc4c122b7641bb66a4c2595289347a4996c (diff)
parent3a8d7958a610cd3fec3a6f424480f91a1b259185 (diff)
downloadnixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.gz
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.bz2
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.lz
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.xz
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.zst
nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.zip
Merge commit '3a8d7958a610cd3fec3a6f424480f91a1b259185'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gspell')
-rw-r--r--nixpkgs/pkgs/development/libraries/gspell/0001-Darwin-build-fix.patch37
-rw-r--r--nixpkgs/pkgs/development/libraries/gspell/default.nix14
2 files changed, 50 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gspell/0001-Darwin-build-fix.patch b/nixpkgs/pkgs/development/libraries/gspell/0001-Darwin-build-fix.patch
new file mode 100644
index 000000000000..b2e71fe3aed1
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gspell/0001-Darwin-build-fix.patch
@@ -0,0 +1,37 @@
+From 2d6dd1c286eb57fbf968510318cafc94888b98de Mon Sep 17 00:00:00 2001
+From: OPNA2608 <christoph.neidahl@gmail.com>
+Date: Sun, 13 Jun 2021 21:56:03 +0200
+Subject: [PATCH] Darwin build fix
+
+---
+ gspell/Makefile.am | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/gspell/Makefile.am b/gspell/Makefile.am
+index 69ee421..7c58973 100644
+--- a/gspell/Makefile.am
++++ b/gspell/Makefile.am
+@@ -95,6 +95,7 @@ nodist_libgspell_core_la_SOURCES = \
+ 	$(BUILT_SOURCES)
+ 
+ libgspell_core_la_LIBADD =	\
++	$(GTK_MAC_LIBS)           \
+ 	$(CODE_COVERAGE_LIBS)
+ 
+ libgspell_core_la_CFLAGS =			\
+@@ -161,6 +162,12 @@ gspell_private_headers += \
+ gspell_private_c_files += \
+ 	gspell-osx.c
+ 
++libgspell_core_la_CFLAGS += \
++	-xobjective-c
++
++libgspell_core_la_LDFLAGS += \
++	-framework Cocoa
++
+ endif # OS_OSX
+ 
+ if HAVE_INTROSPECTION
+-- 
+2.29.3
+
diff --git a/nixpkgs/pkgs/development/libraries/gspell/default.nix b/nixpkgs/pkgs/development/libraries/gspell/default.nix
index f591246eaf81..be45a48090ff 100644
--- a/nixpkgs/pkgs/development/libraries/gspell/default.nix
+++ b/nixpkgs/pkgs/development/libraries/gspell/default.nix
@@ -2,6 +2,8 @@
 , fetchurl
 , pkg-config
 , libxml2
+, autoreconfHook
+, gtk-doc
 , glib
 , gtk3
 , enchant2
@@ -9,6 +11,7 @@
 , vala
 , gobject-introspection
 , gnome
+, gtk-mac-integration
 }:
 
 stdenv.mkDerivation rec {
@@ -23,17 +26,26 @@ stdenv.mkDerivation rec {
     sha256 = "1pdb4gbjrs8mk6r0ipw5vxyvzav1wvkjq46kiq53r3nyznfpdfyw";
   };
 
+  patches = [
+    # Extracted from: https://github.com/Homebrew/homebrew-core/blob/2a27fb86b08afc7ae6dff79cf64aafb8ecc93275/Formula/gspell.rb#L125-L149
+    ./0001-Darwin-build-fix.patch
+  ];
+
   nativeBuildInputs = [
     pkg-config
     vala
     gobject-introspection
     libxml2
+    autoreconfHook
+    gtk-doc
   ];
 
   buildInputs = [
     glib
     gtk3
     icu
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    gtk-mac-integration
   ];
 
   propagatedBuildInputs = [
@@ -53,6 +65,6 @@ stdenv.mkDerivation rec {
     homepage = "https://wiki.gnome.org/Projects/gspell";
     license = licenses.lgpl21Plus;
     maintainers = teams.gnome.members;
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }