You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

91 lines
4.3 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages wordnet)
  19. #:use-module (guix packages)
  20. #:use-module (guix build-system gnu)
  21. #:use-module (guix licenses)
  22. #:use-module (guix download)
  23. #:use-module (gnu packages tcl))
  24. (define-public wordnet
  25. (package
  26. (name "wordnet")
  27. (version "3.0")
  28. (source (origin
  29. (method url-fetch)
  30. (uri (string-append "http://wordnetcode.princeton.edu/"
  31. version "/WordNet-"
  32. version ".tar.bz2"))
  33. (sha256
  34. (base32
  35. "08pgjvd2vvmqk3h641x63nxp7wqimb9r30889mkyfh2agc62sjbc"))))
  36. (build-system gnu-build-system)
  37. (arguments
  38. `(#:configure-flags (list (string-append "--with-tcl="
  39. (assoc-ref %build-inputs "tcl")
  40. "/lib")
  41. (string-append "--with-tk="
  42. (assoc-ref %build-inputs "tk")
  43. "/lib")
  44. ;; Provide the `result' field in `Tcl_Interp'.
  45. ;; See <https://bugs.gentoo.org/show_bug.cgi?id=452034>.
  46. "CFLAGS=-DUSE_INTERP_RESULT")
  47. #:phases (alist-cons-after
  48. 'install 'post-install
  49. (lambda* (#:key inputs outputs #:allow-other-keys)
  50. (let ((out (assoc-ref outputs "out"))
  51. (bin (assoc-ref outputs "tk"))
  52. (tk (assoc-ref inputs "tk"))
  53. (tkv ,(let ((v (package-version tk)))
  54. (string-take v (string-index-right v #\.)))))
  55. ;; Move `wishwn' and `wnb' to BIN.
  56. (for-each (lambda (prog)
  57. (let ((orig (string-append out "/bin/" prog))
  58. (dst (string-append bin "/bin/" prog))
  59. (dir (string-append tk "/lib/tk" tkv)))
  60. (mkdir-p (dirname dst))
  61. (copy-file orig dst)
  62. (delete-file orig)
  63. (wrap-program dst
  64. `("TK_LIBRARY" "" = (,dir))
  65. `("PATH" ":" prefix
  66. (,(string-append out
  67. "/bin"))))))
  68. '("wishwn" "wnb"))
  69. #t))
  70. %standard-phases)))
  71. (outputs '("out"
  72. "tk")) ; for the Tcl/Tk GUI
  73. (inputs `(("tk" ,tk)
  74. ("tcl" ,tcl)))
  75. (home-page "http://wordnet.princeton.edu/")
  76. (synopsis
  77. "WordNet, a lexical database for the English language")
  78. (description
  79. "WordNet® is a large lexical database of English. Nouns, verbs,
  80. adjectives and adverbs are grouped into sets of cognitive synonyms
  81. (synsets), each expressing a distinct concept. Synsets are interlinked by
  82. means of conceptual-semantic and lexical relations. The resulting network of
  83. meaningfully related words and concepts can be navigated with the browser.
  84. WordNet is also freely and publicly available for download. WordNet's
  85. structure makes it a useful tool for computational linguistics and natural
  86. language processing.")
  87. (license x11)))