* bug#26876: [Patch]: Add translate-shell
@ 2017-05-11 7:40 Efraim Flashner
2017-06-25 8:05 ` Efraim Flashner
0 siblings, 1 reply; 2+ messages in thread
From: Efraim Flashner @ 2017-05-11 7:40 UTC (permalink / raw)
To: 26876
[-- Attachment #1.1: Type: text/plain, Size: 515 bytes --]
I've been using this package for months in my private tree.
two things:
I don't know if I need to explicitly add curl as an input
I don't know if I did the emacs thing correctly; I don't use emacs and
I'm not sure how to test it. I tried to do it by copying what some other
packages have done.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #1.2: 0001-gnu-Add-translate-shell.patch --]
[-- Type: text/plain, Size: 3744 bytes --]
From f0f4b6d10d960b1775a7cf19e94c4fa110475726 Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Thu, 11 May 2017 10:36:43 +0300
Subject: [PATCH] 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 1e766d73b..df12bf8a3 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 <ludo@gnu.org>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
;;;
;;; 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)))
--
2.13.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#26876: [Patch]: Add translate-shell
2017-05-11 7:40 bug#26876: [Patch]: Add translate-shell Efraim Flashner
@ 2017-06-25 8:05 ` Efraim Flashner
0 siblings, 0 replies; 2+ messages in thread
From: Efraim Flashner @ 2017-06-25 8:05 UTC (permalink / raw)
To: 26876-done
[-- Attachment #1: Type: text/plain, Size: 231 bytes --]
Patch committed.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-25 8:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 7:40 bug#26876: [Patch]: Add translate-shell Efraim Flashner
2017-06-25 8:05 ` Efraim Flashner
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).