about summary refs log tree commit diff
path: root/pkgs/development/libraries/gtkspell
diff options
context:
space:
mode:
authorBobby Rong <rjl931189261@126.com>2023-01-17 12:42:51 +0800
committerBobby Rong <rjl931189261@126.com>2023-01-17 12:55:45 +0800
commit802c7a0cafcef59b45b7fd7c2ebd960816245347 (patch)
tree95b3ef362492ede98c6986e437c46a08db40a14d /pkgs/development/libraries/gtkspell
parent2cae716942d95798fc21f31f1ec6eb91393d029f (diff)
gtkspell2: Build with enchant2
We want to remove enchant1 when possible.
Diffstat (limited to 'pkgs/development/libraries/gtkspell')
-rw-r--r--pkgs/development/libraries/gtkspell/default.nix38
1 files changed, 35 insertions, 3 deletions
diff --git a/pkgs/development/libraries/gtkspell/default.nix b/pkgs/development/libraries/gtkspell/default.nix
index 6f48ba4e26687..9c5c2b614fa27 100644
--- a/pkgs/development/libraries/gtkspell/default.nix
+++ b/pkgs/development/libraries/gtkspell/default.nix
@@ -1,4 +1,16 @@
-{lib, stdenv, fetchurl, gtk2, aspell, pkg-config, enchant, intltool}:
+{ stdenv
+, lib
+, fetchurl
+, fetchpatch
+, autoreconfHook
+, docbook_xsl
+, gtk-doc
+, intltool
+, pkg-config
+, aspell
+, enchant
+, gtk2
+}:
 
 stdenv.mkDerivation rec {
   pname = "gtkspell";
@@ -9,8 +21,28 @@ stdenv.mkDerivation rec {
     sha256 = "00hdv28bp72kg1mq2jdz1sdw2b8mb9iclsp7jdqwpck705bdriwg";
   };
 
-  nativeBuildInputs = [ pkg-config intltool ];
-  buildInputs = [aspell gtk2 enchant];
+  patches = [
+    # Build with enchant 2
+    # https://github.com/archlinux/svntogit-packages/tree/packages/gtkspell/trunk
+    (fetchpatch {
+      url = "https://github.com/archlinux/svntogit-packages/raw/17fb30b5196db378c18e7c115f28e97b962b95ff/trunk/enchant-2.diff";
+      sha256 = "0d9409bnapwzwhnfpz3dvl6qalskqa4lzmhrmciazsypbw3ry5rf";
+    })
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    docbook_xsl
+    gtk-doc
+    intltool
+    pkg-config
+  ];
+
+  buildInputs = [
+    aspell
+    enchant
+    gtk2
+  ];
 
   meta = with lib; {
     description = "Word-processor-style highlighting and replacement of misspelled words";