| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 |
|
| 35 | (define-module (gnu packages aspell)
|
| 36 | #:use-module (guix packages)
|
| 37 | #:use-module (guix download)
|
| 38 | #:use-module (guix gexp)
|
| 39 | #:use-module (guix git-download)
|
| 40 | #:use-module (guix build-system cmake)
|
| 41 | #:use-module (guix build-system gnu)
|
| 42 | #:use-module (guix licenses)
|
| 43 | #:use-module (guix utils)
|
| 44 | #:use-module (gnu packages)
|
| 45 | #:use-module (gnu packages base)
|
| 46 | #:use-module (gnu packages bison)
|
| 47 | #:use-module (gnu packages compression)
|
| 48 | #:use-module (gnu packages ncurses)
|
| 49 | #:use-module (gnu packages perl)
|
| 50 | #:use-module (ice-9 match))
|
| 51 |
|
| 52 | (define-public aspell
|
| 53 | (package
|
| 54 | (name "aspell")
|
| 55 | (version "0.60.8.2")
|
| 56 | (source
|
| 57 | (origin
|
| 58 | (method url-fetch)
|
| 59 | (uri (string-append "mirror://gnu/aspell/aspell-"
|
| 60 | version ".tar.gz"))
|
| 61 | (sha256
|
| 62 | (base32
|
| 63 | "06b9szgm9cj1zh58r7sbl5fbi3vi9fs7b1as4ir8y176x9ilizjp"))
|
| 64 | (patches (search-patches "aspell-default-dict-dir.patch"))))
|
| 65 | (build-system gnu-build-system)
|
| 66 | (arguments
|
| 67 | `(#:phases
|
| 68 | (modify-phases %standard-phases
|
| 69 | (add-before 'build 'set-filter-path
|
| 70 | (lambda* (#:key outputs #:allow-other-keys)
|
| 71 | |
| 72 | |
| 73 | |
| 74 | (let* ((out (assoc-ref outputs "out"))
|
| 75 | (libdir (string-append out "/lib/aspell-"
|
| 76 | ,(version-major+minor version))))
|
| 77 | (substitute* "common/config.cpp"
|
| 78 | (("\"filter-path(.*)DICT_DIR" _ middle)
|
| 79 | (string-append "\"filter-path" middle
|
| 80 | "\"" libdir "\"")))))))))
|
| 81 | (native-inputs (list perl))
|
| 82 |
|
| 83 | (native-search-paths
|
| 84 | |
| 85 | |
| 86 | (list (search-path-specification
|
| 87 | (variable "ASPELL_DICT_DIR")
|
| 88 | (separator #f)
|
| 89 | (files '("lib/aspell")))))
|
| 90 |
|
| 91 | (home-page "http://aspell.net/")
|
| 92 | (synopsis "Spell checker")
|
| 93 | (description
|
| 94 | "Aspell is a spell-checker which can be used either as a library or as
|
| 95 | a standalone program. Notable features of Aspell include its full support of
|
| 96 | documents written in the UTF-8 encoding and its ability to use multiple
|
| 97 | dictionaries, including personal ones.")
|
| 98 | (license lgpl2.1+)))
|
| 99 |
|
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 |
|
| 108 | (define* (aspell-dictionary dict-name full-name
|
| 109 | #:key version sha256 (prefix "aspell6-"))
|
| 110 | (package
|
| 111 | (name (string-append
|
| 112 | "aspell-dict-"
|
| 113 | |
| 114 | |
| 115 | (string-map (match-lambda
|
| 116 | (#\_ #\-)
|
| 117 | (chr chr))
|
| 118 | (string-downcase dict-name))))
|
| 119 | (version version)
|
| 120 | (source (origin
|
| 121 | (method url-fetch)
|
| 122 | (uri (string-append "mirror://gnu/aspell/dict/" dict-name
|
| 123 | "/" prefix dict-name "-"
|
| 124 | version ".tar.bz2"))
|
| 125 | (hash (content-hash sha256))))
|
| 126 | (build-system gnu-build-system)
|
| 127 | (arguments
|
| 128 | `(#:phases
|
| 129 | (modify-phases %standard-phases
|
| 130 | (replace 'configure
|
| 131 | (lambda* (#:key outputs #:allow-other-keys)
|
| 132 | (let ((out (assoc-ref outputs "out")))
|
| 133 | (invoke "./configure")))))
|
| 134 | #:make-flags
|
| 135 | (let ((out (assoc-ref %outputs "out")))
|
| 136 | (list (string-append "dictdir=" out "/lib/aspell")
|
| 137 | (string-append "datadir=" out "/lib/aspell")))
|
| 138 | #:tests? #f))
|
| 139 | (native-inputs (list aspell which))
|
| 140 | (synopsis (string-append full-name " dictionary for GNU Aspell")) |
| 141 | (description
|
| 142 | "This package provides a dictionary for the GNU Aspell spell checker.")
|
| 143 | (license gpl2+)
|
| 144 | (properties
|
| 145 | |
| 146 | |
| 147 | `((upstream-name . ,(string-append prefix dict-name))
|
| 148 | (ftp-directory . ,(string-append "/aspell/dict/" dict-name))))
|
| 149 | (home-page "http://aspell.net/")))
|
| 150 |
|
| 151 |
|
| 152 | (define-public aspell-dict-ar
|
| 153 | (aspell-dictionary "ar" "Arabic"
|
| 154 | #:version "1.2-0"
|
| 155 | #:prefix "aspell6-"
|
| 156 | #:sha256
|
| 157 | (base32
|
| 158 | "1avw40bp8yi5bnkq64ihm2rldgw34lk89yz281q9bmndh95a47h4")))
|
| 159 |
|
| 160 | (define-public aspell-dict-be
|
| 161 | (aspell-dictionary "be" "Belarusian"
|
| 162 | #:version "0.01"
|
| 163 | #:prefix "aspell5-"
|
| 164 | #:sha256
|
| 165 | (base32
|
| 166 | "1svls9p7rsfi3hs0afh0cssj006qb4v1ik2yzqgj8hm10c6as2sm")))
|
| 167 |
|
| 168 | (define-public aspell-dict-bg
|
| 169 | (aspell-dictionary "bg" "Bulgarian"
|
| 170 | #:version "4.1-0"
|
| 171 | #:prefix "aspell6-"
|
| 172 | #:sha256
|
| 173 | (base32
|
| 174 | "1alacmgpfk0yrgq83y23d16fhav1bxmb98kg8d2a5r9bvh2h0mvl")))
|
| 175 |
|
| 176 | (define-public aspell-dict-bn
|
| 177 | (aspell-dictionary "bn" "Bengali"
|
| 178 | #:version "0.01.1-1"
|
| 179 | #:sha256
|
| 180 | (base32
|
| 181 | "1nc02jd67iggirwxnhdvlvaqm0xfyks35c4psszzj3dhzv29qgxh")))
|
| 182 |
|
| 183 | (define-public aspell-dict-ca
|
| 184 | (let ((version "2.5.0")
|
| 185 | (sha256
|
| 186 | (base32 "0kbi8fi7a1bys31kfqrlh332gyik0cfdmxgl7n15sa9c305rkgwq")))
|
| 187 | (package
|
| 188 | (inherit (aspell-dictionary "ca" "Catalan"
|
| 189 | #:version version
|
| 190 | #:sha256 sha256))
|
| 191 | (source
|
| 192 | (origin
|
| 193 | (method url-fetch)
|
| 194 | (uri (string-append "https://www.softcatala.org/pub/softcatala/aspell/"
|
| 195 | version "/aspell6-ca-" version ".tar.bz2"))
|
| 196 | (hash (content-hash sha256))))
|
| 197 | (home-page "https://www.softcatala.org/pub/softcatala/aspell/"))))
|
| 198 |
|
| 199 | (define-public aspell-dict-cs
|
| 200 | (aspell-dictionary "cs" "Czech"
|
| 201 | #:version "20040614-1"
|
| 202 | #:sha256
|
| 203 | (base32
|
| 204 | "0rihj4hsw96pd9casvmpvw3r8040pfa28p1h73x4vyn20zwr3h01")))
|
| 205 |
|
| 206 | (define-public aspell-dict-de
|
| 207 | (aspell-dictionary "de" "German"
|
| 208 | #:version "20161207-7-0"
|
| 209 | #:sha256
|
| 210 | (base32
|
| 211 | "0wamclvp66xfmv5wff96v6gdlnfv4y8lx3f8wvxyzm5imwgms4n2")))
|
| 212 |
|
| 213 | (define-public aspell-dict-da
|
| 214 | (aspell-dictionary "da" "Danish"
|
| 215 | #:version "1.6.36-11-0"
|
| 216 | #:sha256
|
| 217 | (base32
|
| 218 | "1xz2haayvwlxgss9jf1x2311a1ixbk75q2vgfprjhibsmb7cpinv")))
|
| 219 |
|
| 220 | (define-public aspell-dict-el
|
| 221 | (aspell-dictionary "el" "Greek"
|
| 222 | #:version "0.08-0"
|
| 223 | #:prefix "aspell6-"
|
| 224 | #:sha256
|
| 225 | (base32
|
| 226 | "1ljcc30zg2v2h3w5h5jr5im41mw8jbsgvvhdd2cii2yzi8d0zxja")))
|
| 227 |
|
| 228 | (define-public aspell-dict-en
|
| 229 | (aspell-dictionary "en" "English"
|
| 230 | #:version "2020.12.07-0"
|
| 231 | #:sha256
|
| 232 | (base32
|
| 233 | "1cwzqkm8gr1w51rpckwlvb43sb0b5nbwy7s8ns5vi250515773sc")))
|
| 234 |
|
| 235 | (define-public aspell-dict-eo
|
| 236 | (aspell-dictionary "eo" "Esperanto"
|
| 237 | #:version "2.1.20000225a-2"
|
| 238 | #:sha256
|
| 239 | (base32
|
| 240 | "09vf0mbiicbmyb4bwb7v7lgpabnylg0wy7m3hlhl5rjdda6x3lj1")))
|
| 241 |
|
| 242 | (define-public aspell-dict-es
|
| 243 | (aspell-dictionary "es" "Spanish"
|
| 244 | #:version "1.11-2"
|
| 245 | #:sha256
|
| 246 | (base32
|
| 247 | "1k5g328ac1hdpp6fsg57d8md6i0aqcwlszp3gbmp5706wyhpydmd")))
|
| 248 |
|
| 249 | (define-public aspell-dict-fi
|
| 250 | (aspell-dictionary "fi" "Finnish"
|
| 251 | #:version "0.7-0"
|
| 252 | #:prefix "aspell6-"
|
| 253 | #:sha256
|
| 254 | (base32
|
| 255 | "07d5s08ba4dd89cmwy9icc01i6fjdykxlb9ravmhdrhi8mxz1mzq")))
|
| 256 |
|
| 257 | (define-public aspell-dict-fr
|
| 258 | (aspell-dictionary "fr" "French"
|
| 259 | #:version "0.50-3"
|
| 260 | #:prefix "aspell-"
|
| 261 | #:sha256
|
| 262 | (base32
|
| 263 | "14ffy9mn5jqqpp437kannc3559bfdrpk7r36ljkzjalxa53i0hpr")))
|
| 264 |
|
| 265 | (define-public aspell-dict-grc
|
| 266 | (aspell-dictionary "grc" "Ancient Greek"
|
| 267 | #:version "0.02-0"
|
| 268 | #:sha256
|
| 269 | (base32
|
| 270 | "1zxr8958v37v260fkqd4pg37ns5h5kyqm54hn1hg70wq5cz8h512")))
|
| 271 |
|
| 272 | (define-public aspell-dict-he
|
| 273 | (aspell-dictionary "he" "Hebrew"
|
| 274 | #:version "1.0-0"
|
| 275 | #:sha256
|
| 276 | (base32
|
| 277 | "13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn")))
|
| 278 |
|
| 279 | (define-public aspell-dict-hi
|
| 280 | (aspell-dictionary "hi" "Hindi"
|
| 281 | #:version "0.02-0"
|
| 282 | #:prefix "aspell6-"
|
| 283 | #:sha256
|
| 284 | (base32
|
| 285 | "0drs374qz4419zx1lf2k281ydxf2750jk5ailafj1x0ncz27h1ys")))
|
| 286 |
|
| 287 | (define-public aspell-dict-it
|
| 288 | (let ((version "2.4-20070901-0")
|
| 289 | (sha256
|
| 290 | (base32 "0d6ypii3jblprpibazb6ypady536jz62rwxlss1x1raq07rhvvqn")))
|
| 291 | (package
|
| 292 | (inherit (aspell-dictionary "it" "Italian"
|
| 293 | #:version version
|
| 294 | #:sha256 sha256))
|
| 295 |
|
| 296 | |
| 297 | |
| 298 | (source
|
| 299 | (origin
|
| 300 | (method url-fetch)
|
| 301 | (uri (string-append "mirror://sourceforge/linguistico/"
|
| 302 | "Dizionario%20italiano%20per%20Aspell/" version "/"
|
| 303 | "aspell6-it-" version ".tar.bz2"))
|
| 304 | (hash (content-hash sha256))))
|
| 305 | (home-page
|
| 306 | "https://linguistico.sourceforge.net/pages/dizionario_italiano.html"))))
|
| 307 |
|
| 308 | (define-public aspell-dict-mi
|
| 309 | (aspell-dictionary "mi" "Maori"
|
| 310 | #:version "0.50-0"
|
| 311 | #:prefix "aspell-"
|
| 312 | #:sha256
|
| 313 | (base32
|
| 314 | "12bxplpd348yx8d2q8qvahi9dlp7qf28qmanzhziwc7np8rixvmy")))
|
| 315 |
|
| 316 | (define-public aspell-dict-nl
|
| 317 | (aspell-dictionary "nl" "Dutch"
|
| 318 | #:version "0.50-2"
|
| 319 | #:prefix "aspell-"
|
| 320 | #:sha256
|
| 321 | (base32
|
| 322 | "0ffb87yjsh211hllpc4b9khqqrblial4pzi1h9r3v465z1yhn3j4")))
|
| 323 |
|
| 324 | (define-public aspell-dict-nn
|
| 325 | (aspell-dictionary "nn" "Norwegian Nynorsk"
|
| 326 | #:version "0.50.1-1"
|
| 327 | #:prefix "aspell-"
|
| 328 | #:sha256
|
| 329 | (base32
|
| 330 | "0w2k5l5rbqpliripgqwiqixz5ghnjf7i9ggbrc4ly4vy1ia10rmc")))
|
| 331 |
|
| 332 | (define-public aspell-dict-nb
|
| 333 | (aspell-dictionary "nb" "Norwegian Bokmål"
|
| 334 | #:version "0.50-2"
|
| 335 | #:prefix "aspell-"
|
| 336 | #:sha256
|
| 337 | (base32
|
| 338 | "1xvns7dwx2sc0msldj7r2hv0426913rg3dpnkxlrvnsyrxzjpbpc")))
|
| 339 |
|
| 340 | (define-public aspell-dict-pl
|
| 341 | (aspell-dictionary "pl" "Polish"
|
| 342 | #:version "0.51-0"
|
| 343 | #:prefix "aspell-"
|
| 344 | #:sha256
|
| 345 | (base32
|
| 346 | "1a3ccji6k5gys7l3ilr2lh5pzxgzb7ipc5vb737svl6nqgdy8757")))
|
| 347 |
|
| 348 | (define-public aspell-dict-pt-br
|
| 349 | (aspell-dictionary "pt_BR" "Brazilian Portuguese"
|
| 350 | #:version "20131030-12-0"
|
| 351 | #:sha256
|
| 352 | (base32
|
| 353 | "1xqlpk21s93c6blkdnpk7l62q9fxjvzdv2x86chl8p2x1gdrj3gb")))
|
| 354 |
|
| 355 | (define-public aspell-dict-pt-pt
|
| 356 | (aspell-dictionary "pt_PT" "Portuguese"
|
| 357 | #:version "20190329-1-0"
|
| 358 | #:sha256
|
| 359 | (base32
|
| 360 | "0ld0d0ily4jqifjfsxfv4shbicz6ymm2gk56fq9gbzra1j4qnw75")))
|
| 361 |
|
| 362 | (define-public aspell-dict-ru
|
| 363 | (aspell-dictionary "ru" "Russian"
|
| 364 | #:version "0.99f7-1"
|
| 365 | #:sha256
|
| 366 | (base32
|
| 367 | "0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw")))
|
| 368 |
|
| 369 | (define-public aspell-dict-sl
|
| 370 | (aspell-dictionary "sl" "Slovenian"
|
| 371 | #:version "0.50-0"
|
| 372 | #:prefix "aspell-"
|
| 373 | #:sha256
|
| 374 | (base32
|
| 375 | "1l9kc5g35flq8kw9jhn2n0bjb4sipjs4qkqzgggs438kywkx2rp5")))
|
| 376 |
|
| 377 | (define-public aspell-dict-sv
|
| 378 | (aspell-dictionary "sv" "Swedish"
|
| 379 | #:version "0.51-0"
|
| 380 | #:prefix "aspell-"
|
| 381 | #:sha256
|
| 382 | (base32
|
| 383 | "02jwkjhr32kvyibnyzgx3smbnm576jwdzg3avdf6zxwckhy5fw4v")))
|
| 384 |
|
| 385 | (define-public aspell-dict-uk
|
| 386 | (aspell-dictionary "uk" "Ukrainian"
|
| 387 | #:version "1.4.0-0"
|
| 388 | #:sha256
|
| 389 | (base32
|
| 390 | "137i4njvnslab6l4s291s11xijr5jsy75lbdph32f9y183lagy9m")))
|
| 391 |
|
| 392 | (define-public aspell-dict-ro
|
| 393 | (aspell-dictionary "ro" "Romanian"
|
| 394 | #:version "3.3-2"
|
| 395 | #:prefix "aspell5-"
|
| 396 | #:sha256
|
| 397 | (base32
|
| 398 | "0gb8j9iy1acdl11jq76idgc2lbc1rq3w04favn8cyh55d1v8phsk")))
|
| 399 |
|
| 400 | (define-public ispell
|
| 401 | (package
|
| 402 | (name "ispell")
|
| 403 | (version "3.4.06")
|
| 404 | (source
|
| 405 | (origin
|
| 406 | (method url-fetch)
|
| 407 | (uri (string-append "https://www.cs.hmc.edu/~geoff/tars/ispell-"
|
| 408 | version ".tar.gz"))
|
| 409 | (sha256
|
| 410 | (base32 "19pbhg3pbnykkk9hla2kfhfanm7wcdja2qria365l1y8shridj8p"))))
|
| 411 | (build-system gnu-build-system)
|
| 412 | (arguments
|
| 413 | `(#:parallel-build? #f
|
| 414 | #:tests? #f |
| 415 | #:phases
|
| 416 | (modify-phases %standard-phases
|
| 417 | (replace 'configure
|
| 418 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 419 | |
| 420 | (let* ((grep (assoc-ref inputs "grep"))
|
| 421 | (out (assoc-ref outputs "out")))
|
| 422 | (call-with-output-file "local.h"
|
| 423 | (lambda (port)
|
| 424 | (format port "#define MINIMENU~%")
|
| 425 | (format port "#define USG~%")
|
| 426 | (format port "#define HAS_RENAME~%")
|
| 427 | (format port "#define CC \"gcc\"~%")
|
| 428 | (format port "#define POUNDBANG \"#!~a\"~%" (which "sh"))
|
| 429 | (format port "#define EGREPCMD \"~a/bin/grep -Ei\"~%" grep)
|
| 430 | (format port "#define BINDIR \"~a/bin\"~%" out)
|
| 431 | (format port "#define LIBDIR \"~a/lib/ispell\"~%" out)
|
| 432 | (format port "#define MAN1DIR \"~a/share/man/man1\"~%" out)
|
| 433 | (format port "#define MAN45DIR \"~a/share/man/man5\"~%" out)))))))))
|
| 434 | (inputs
|
| 435 | (list grep ncurses))
|
| 436 | (native-inputs
|
| 437 | (list bison))
|
| 438 | (synopsis "Interactive spell-checking tool for Unix")
|
| 439 | (description "Ispell is an interactive spell-checking tool supporting many
|
| 440 | European languages.")
|
| 441 | (home-page "https://www.cs.hmc.edu/~geoff/ispell.html")
|
| 442 | (license bsd-3)))
|
| 443 |
|
| 444 | |
| 445 | |
| 446 | (define-public ispell-for-linphone
|
| 447 | (let ((commit "05574fe160222c3d0b6283c1433c9b087271fad1")
|
| 448 | (revision "0"))
|
| 449 | (package
|
| 450 | (inherit ispell)
|
| 451 | (name "ispell-for-linphone")
|
| 452 | |
| 453 | |
| 454 | (version (git-version "3.4.05" revision commit))
|
| 455 | (source (origin
|
| 456 | (method git-fetch)
|
| 457 | (uri (git-reference
|
| 458 | (url "https://gitlab.linphone.org/BC/public/external/ispell")
|
| 459 | (commit commit)))
|
| 460 | (file-name (git-file-name name version))
|
| 461 | (sha256
|
| 462 | (base32
|
| 463 | "0shwbms6y0i18n2qnvjlbwfmzk5rydlp7wbf4dl1rn74r244p132"))
|
| 464 | (patches (search-patches "ispell-for-linphone-cmake.patch"))))
|
| 465 | (build-system cmake-build-system)
|
| 466 | (arguments
|
| 467 | (substitute-keyword-arguments arguments
|
| 468 | ((#:modules _ ''())
|
| 469 | '((guix build cmake-build-system)
|
| 470 | (guix build utils)
|
| 471 | (srfi srfi-26)))
|
| 472 | ((#:phases phases '%standard-phases)
|
| 473 | #~(modify-phases #$phases
|
| 474 | (add-before 'configure 'really-configure
|
| 475 | (assoc-ref %standard-phases 'configure))
|
| 476 | (add-after 'configure 'install-headers
|
| 477 | (lambda _
|
| 478 | (let ((include-dir (string-append #$output "/include/ISpell")))
|
| 479 | (with-directory-excursion "../source"
|
| 480 | (for-each (cut install-file <> include-dir)
|
| 481 | '("config.h" "defhash.h" "ispell.h"
|
| 482 | "libispell.h" "local.h")))))))))))))
|
| 483 |
|
| 484 | (define-public spell
|
| 485 | (package
|
| 486 | (name "spell")
|
| 487 | (version "1.1")
|
| 488 | (source
|
| 489 | (origin
|
| 490 | (method url-fetch)
|
| 491 | (uri (string-append "mirror://gnu/spell/spell-" version ".tar.gz"))
|
| 492 | (sha256
|
| 493 | (base32 "0i4pqbhzkv5y4c2j7ajx713jykxsnn4dqdcqfvzn04xkgra47hkw"))))
|
| 494 | (build-system gnu-build-system)
|
| 495 | (arguments
|
| 496 | (list #:phases
|
| 497 | #~(modify-phases %standard-phases
|
| 498 | (add-after 'unpack 'patch-commands
|
| 499 | (lambda* (#:key inputs #:allow-other-keys)
|
| 500 | (substitute* "spell.c"
|
| 501 | (("aspell")
|
| 502 | (search-input-file inputs "bin/aspell"))
|
| 503 | (("ispell_prog = \"ispell\"")
|
| 504 | (format #f "ispell_prog = ~s"
|
| 505 | (search-input-file inputs "bin/ispell")))))))))
|
| 506 | (inputs (list aspell ispell))
|
| 507 | (synopsis "Spell checking")
|
| 508 | (description
|
| 509 | "Spell is a command-line spell-checking program. It reads through
|
| 510 | a text input and prints each misspelled word on a line of its own. It is
|
| 511 | implemented as a wrapper for GNU aspell or ispell.")
|
| 512 | (home-page "https://savannah.gnu.org/projects/spell/")
|
| 513 | (license gpl3+)))
|