guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Add translate-shell.


From: Efraim Flashner
Subject: 01/01: gnu: Add translate-shell.
Date: Mon, 29 May 2017 06:25:58 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 0f3847bfd84bb52a7f6da52cfa358aded8570310
Author: Efraim Flashner <address@hidden>
Date:   Thu May 11 10:36:43 2017 +0300

    gnu: Add translate-shell.
    
    * gnu/packages/dictionaries.scm (translate-shell): New variable.
---
 gnu/packages/dictionaries.scm | 54 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 53 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 1e766d7..df12bf8 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <address@hidden>
-;;; Copyright © 2016 Efraim Flashner <address@hidden>
+;;; Copyright © 2016, 2017 Efraim Flashner <address@hidden>
 ;;; Copyright © 2016 Sou Bunnbu <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -25,6 +25,11 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages emacs)
+  #:use-module (gnu packages fribidi)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages readline)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages tcl))
@@ -200,3 +205,50 @@ work, such as sentence length and other readability 
measures.")
 It comes with a German-English dictionary with approximately 270,000 entries.")
     (home-page  "http://www-user.tu-chemnitz.de/~fri/ding/";)
     (license gpl2+)))
+
+(define-public translate-shell
+  (package
+    (name "translate-shell")
+    (version "0.9.6.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/soimort/"; name "/archive/v"
+                            version ".tar.gz"))
+        (sha256
+         (base32
+          "13rjq9v3ykk5c0i5daybpnqnyg09cbcgjzykx49h2h5hvspixvi5"))
+        (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure) ; no configure phase
+         (add-after 'install 'emacs-install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out   (assoc-ref outputs "out"))
+                    (dest  (string-append out "/share/emacs/site-lisp"))
+                    (emacs (string-append (assoc-ref inputs "emacs") 
"/bin/emacs")))
+               (install-file "google-translate-mode.el" dest)
+               (emacs-generate-autoloads ,name dest)))))
+       #:make-flags (list (string-append "PREFIX=" %output))
+       #:imported-modules (,@%gnu-build-system-modules (guix build 
emacs-utils))
+       #:modules ((guix build gnu-build-system)
+                  (guix build emacs-utils)
+                  (guix build utils))
+       #:test-target "test"))
+    (propagated-inputs
+     `(("curl" ,curl)
+       ("fribidi" ,fribidi)
+       ("rlwrap" ,rlwrap)))
+    (native-inputs
+     `(("emacs" ,emacs-minimal)
+       ("util-linux" ,util-linux))) ; hexdump, for the test
+    (home-page "https://www.soimort.org/translate-shell";)
+    (synopsis "Translations from the command line")
+    (description
+     "Translate Shell (formerly Google Translate CLI) is a command-line
+translator powered by Google Translate (default), Bing Translator,
+Yandex.Translate and Apertium.  It gives you easy access to one of these
+translation engines from your terminal.")
+    (license public-domain)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]