| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 |
|
| 23 | (define-module (gnu packages enchant)
|
| 24 | #:use-module (gnu packages)
|
| 25 | #:use-module (gnu packages aspell)
|
| 26 | #:use-module (gnu packages boost)
|
| 27 | #:use-module (gnu packages check)
|
| 28 | #:use-module (gnu packages glib)
|
| 29 | #:use-module (gnu packages groff)
|
| 30 | #:use-module (gnu packages hunspell)
|
| 31 | #:use-module (gnu packages icu4c)
|
| 32 | #:use-module (gnu packages man)
|
| 33 | #:use-module (gnu packages perl)
|
| 34 | #:use-module (gnu packages pkg-config)
|
| 35 | #:use-module (gnu packages python-build)
|
| 36 | #:use-module (gnu packages version-control)
|
| 37 | #:use-module (guix gexp)
|
| 38 | #:use-module (guix packages)
|
| 39 | #:use-module (guix git-download)
|
| 40 | #:use-module (guix download)
|
| 41 | #:use-module (guix build-system cmake)
|
| 42 | #:use-module (guix build-system gnu)
|
| 43 | #:use-module (guix build-system pyproject)
|
| 44 | #:use-module (guix licenses)
|
| 45 | #:use-module (srfi srfi-1))
|
| 46 |
|
| 47 | (define-public nuspell
|
| 48 | (package
|
| 49 | (name "nuspell")
|
| 50 | (version "5.1.4")
|
| 51 | (source
|
| 52 | (origin
|
| 53 | (method git-fetch)
|
| 54 | (uri
|
| 55 | (git-reference
|
| 56 | (url "https://github.com/nuspell/nuspell")
|
| 57 | (commit (string-append "v" version))))
|
| 58 | (file-name (git-file-name name version))
|
| 59 | (sha256
|
| 60 | (base32 "05j1hmczy6v9dyxp77vxhgyl7y5hff3v45vlp86gyh7m9lgqpmra"))))
|
| 61 | (build-system cmake-build-system)
|
| 62 | (arguments
|
| 63 | (if (%current-target-system)
|
| 64 | (list #:configure-flags #~(list "-DBUILD_TESTING=OFF"))
|
| 65 | '()))
|
| 66 | (native-inputs (list catch2-3.5 pkg-config))
|
| 67 | (propagated-inputs (list icu4c))
|
| 68 | (native-search-paths (list (search-path-specification
|
| 69 | (variable "DICPATH")
|
| 70 | (files '("share/hunspell")))))
|
| 71 | (synopsis "Fast and safe spellchecking C++ library")
|
| 72 | (description "Nuspell is a fast and safe spelling checker software
|
| 73 | program. It is designed for languages with rich morphology and complex word
|
| 74 | compounding. Nuspell is written in modern C++ and it supports Hunspell
|
| 75 | dictionaries.")
|
| 76 | (home-page "https://nuspell.github.io/")
|
| 77 | (license lgpl3+)))
|
| 78 |
|
| 79 | (define-public enchant
|
| 80 | (package
|
| 81 | (name "enchant")
|
| 82 | (version "2.6.9")
|
| 83 | (source (origin
|
| 84 | (method url-fetch)
|
| 85 | (uri (string-append "https://github.com/AbiWord/enchant/releases"
|
| 86 | "/download/v" version "/enchant-"
|
| 87 | version ".tar.gz"))
|
| 88 | (sha256
|
| 89 | (base32
|
| 90 | "0szzxx0bvkdgahlzdbrmnngf1dzbsrpcf8psl2rl72mkr46s39fr"))))
|
| 91 | (build-system gnu-build-system)
|
| 92 | (arguments
|
| 93 | (list
|
| 94 | #:configure-flags
|
| 95 | #~(list"--disable-static"
|
| 96 | |
| 97 | "--enable-relocatable")))
|
| 98 | (inputs
|
| 99 | (list aspell hunspell nuspell))
|
| 100 | (propagated-inputs
|
| 101 | |
| 102 | (list glib))
|
| 103 | (native-inputs
|
| 104 | (list `(,glib "bin") groff pkg-config unittest-cpp))
|
| 105 | (synopsis "Multi-backend spell-checking library wrapper")
|
| 106 | (description
|
| 107 | "Enchant is a library---and command-line program---that wraps a number of
|
| 108 | different spelling libraries and programs with a consistent interface. By
|
| 109 | using Enchant, you can use a wide range of spelling libraries, including some
|
| 110 | specialized for particular languages, without needing to program to each
|
| 111 | library's interface. If it's not convenient to call a C library, you can
|
| 112 | access most of Enchant's functionality via the @command{enchant} program,
|
| 113 | which communicates over a pipe, like Ispell, and is indeed
|
| 114 | Ispell-compatible.")
|
| 115 | (home-page "https://abiword.github.io/enchant/")
|
| 116 | (license lgpl2.1+)))
|
| 117 |
|
| 118 | |
| 119 | |
| 120 | |
| 121 | (define-public enchant-1.6
|
| 122 | (package
|
| 123 | (inherit enchant)
|
| 124 | (version "1.6.0")
|
| 125 | (arguments
|
| 126 | (list #:configure-flags
|
| 127 | #~(list
|
| 128 | |
| 129 | (string-append
|
| 130 | "CFLAGS=-g -O2"
|
| 131 | " -Wno-error=incompatible-pointer-types")
|
| 132 | "--disable-static")))
|
| 133 | (native-inputs (alist-delete "unittest-cpp"
|
| 134 | (package-native-inputs enchant)))
|
| 135 | (source (origin
|
| 136 | (method url-fetch)
|
| 137 | (uri (string-append "http://www.abisource.com/downloads/enchant/"
|
| 138 | version "/enchant-" version ".tar.gz"))
|
| 139 | (sha256
|
| 140 | (base32
|
| 141 | "0zq9yw1xzk8k9s6x83n1f9srzcwdavzazn3haln4nhp9wxxrxb1g"))))))
|
| 142 |
|
| 143 | (define-public python-pyenchant
|
| 144 | (package
|
| 145 | (name "python-pyenchant")
|
| 146 | (version "2.0.0")
|
| 147 | (source (origin
|
| 148 | (method url-fetch)
|
| 149 | (uri (pypi-uri "pyenchant" version))
|
| 150 | (sha256
|
| 151 | (base32
|
| 152 | "1872ckgdip8nj9rnh167m0gsj5754qfg2hjxzsl1s06f5akwscgw"))))
|
| 153 | (build-system pyproject-build-system)
|
| 154 | (arguments
|
| 155 | `(#:tests? #f; FIXME: Dictionary for language 'en_US' could not be found
|
| 156 | #:phases
|
| 157 | (modify-phases %standard-phases
|
| 158 | (add-before 'build 'setlib
|
| 159 | (lambda* (#:key inputs #:allow-other-keys)
|
| 160 | (substitute* "enchant/_enchant.py"
|
| 161 | (("/opt/local/lib/libenchant.dylib\"")
|
| 162 | (string-append "/opt/local/lib/libenchant.dylib\"\n"
|
| 163 | " yield \"" (assoc-ref inputs "enchant")
|
| 164 | "/lib/libenchant-2.so\""))))))))
|
| 165 | (inputs
|
| 166 | (list enchant))
|
| 167 | (native-inputs
|
| 168 | (list python-setuptools python-wheel))
|
| 169 | (home-page "https://github.com/pyenchant/pyenchant")
|
| 170 | (synopsis "Spellchecking library for Python")
|
| 171 | (description "PyEnchant is a spellchecking library for Python, based on the
|
| 172 | Enchant library. PyEnchant combines all the functionality of the underlying
|
| 173 | Enchant library with the flexibility of Python. It also provides some
|
| 174 | higher-level functionality than is available in the C API.")
|
| 175 | (license lgpl2.1+)))
|