gnu: Add cl-ana.statistical-learning.
[jackhill/guix/guix.git] / gnu / packages / dictionaries.scm
index 039ec45..1aa54d9 100644 (file)
@@ -2,10 +2,11 @@
 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
-;;; Copyright © 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -176,8 +177,7 @@ work, such as sentence length and other readability measures.")
          (delete 'configure)
          (delete 'build)
          (delete 'check)
-         (replace
-             'install
+         (replace 'install
            (lambda _
              (let ((bindir (string-append
                             (assoc-ref %outputs "out") "/bin"))
@@ -209,8 +209,7 @@ work, such as sentence length and other readability measures.")
                   (string-append "DEFLIBDIR=\"" libdir "\"")))
                (install-file "ding.desktop" sharedir)
                (install-file "ding.png" sharedir)
-               (zero?
-                (system* "./install.sh"))))))))
+               (invoke "./install.sh")))))))
     (synopsis "Dictionary lookup program with a German-English dictionary")
     (description "Ding is a dictionary lookup program for the X window system.
 It comes with a German-English dictionary with approximately 270,000 entries.")
@@ -220,18 +219,18 @@ It comes with a German-English dictionary with approximately 270,000 entries.")
 (define-public grammalecte
   (package
     (name "grammalecte")
-    (version "0.6.5")
+    (version "1.6.0")
     (source
      (origin
        (method url-fetch/zipbomb)
-       (uri (string-append "https://www.dicollecte.org/grammalecte/zip/"
+       (uri (string-append "https://grammalecte.net/grammalecte/zip/"
                            "Grammalecte-fr-v" version ".zip"))
        (sha256
         (base32
-         "11byjs3ggdhia5f4vyfqfvbbczsfqimll98h98g7hlsrm7vrifb0"))))
+         "0kz13gx2hd23xd6bfr4z73lh18slj3vbvs2xcb7qvhramxjqzqcn"))))
     (build-system python-build-system)
     (home-page "https://grammalecte.net")
-    (synopsis  "French spelling and grammar checker")
+    (synopsis "French spelling and grammar checker")
     (description "Grammalecte is a grammar checker dedicated to the French
 language, derived from Lightproof.
 
@@ -247,21 +246,40 @@ and a Python library.")
 (define-public translate-shell
   (package
     (name "translate-shell")
-    (version "0.9.6.8")
+    (version "0.9.6.11")
     (source
       (origin
-        (method url-fetch)
-        (uri (string-append "https://github.com/soimort/" name "/archive/v"
-                            version ".tar.gz"))
+        (method git-fetch)
+        (uri (git-reference
+               (url"https://github.com/soimort/translate-shell.git")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
         (sha256
-         (base32
-          "17yc2kwk8957wwxyih0jmsai720ai2yqyvmrqrglcncqg6zdbz9w"))
-        (file-name (string-append name "-" version ".tar.gz"))))
+         (base32 "137fz3ahzf65hfqcs4k7hhrmfjlhlw7wr3gfsvk88bnyqkyw44sm"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (delete 'configure)            ; no configure phase
+         (delete 'configure)            ; no configure script
+         (add-after 'unpack 'remove-unnecessary-file
+           ;; This file gets generated during the build phase.
+           (lambda _
+             (delete-file "translate")
+             #t))
+         (add-after 'install 'wrap-binary
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out     (assoc-ref outputs "out"))
+                    (bin     (string-append out "/bin/trans"))
+                    (curl    (assoc-ref inputs "curl"))
+                    (fribidi (assoc-ref inputs "fribidi"))
+                    (rlwrap  (assoc-ref inputs "rlwrap")))
+               (wrap-program bin
+                             `("PATH" ":" prefix
+                               (,(string-append out "/bin:"
+                                                curl "/bin:"
+                                                fribidi "/bin:"
+                                                rlwrap "/bin")))))
+             #t))
          (add-after 'install 'emacs-install
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out   (assoc-ref outputs "out"))
@@ -277,7 +295,7 @@ and a Python library.")
                   (guix build emacs-utils)
                   (guix build utils))
        #:test-target "test"))
-    (propagated-inputs
+    (inputs
      `(("curl" ,curl)
        ("fribidi" ,fribidi)
        ("rlwrap" ,rlwrap)))
@@ -354,7 +372,7 @@ word (e.g. cats) into its lemma \"cat\" and the grammatical information
        ("flex" ,flex)
        ("pkg-config" ,pkg-config)
        ;; python is only required for running the test suite
-       ("python-minimal" ,python-minimal)))
+       ("python" ,python)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases