all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <ambrevar@gmail.com>
To: 31017@debbugs.gnu.org
Subject: [bug#31017] [PATCH] gnu: Add subdl
Date: Sun,  1 Apr 2018 20:45:02 +0530	[thread overview]
Message-ID: <20180401151502.26423-1-ambrevar@gmail.com> (raw)

* gnu/packages/video.scm (subdl): New variable.
---
 gnu/packages/video.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 3937c52c0..fe1badee9 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -56,6 +56,7 @@
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (guix build-system waf)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages audio)
@@ -2821,3 +2822,41 @@ changed.  Or in other words, it can detect motion.")
 
     ;; Some files say "version 2" and others "version 2 or later".
     (license license:gpl2)))
+
+(define-public subdl
+  (let
+      ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
+       (revision "1"))
+    (package
+      (name "subdl")
+      (version (string-append "1.0.3-" revision "." (string-take commit 7)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/alexanderwink/subdl.git")
+                      (commit commit)))
+                (sha256 (base32 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
+      (build-system trivial-build-system)
+      (arguments
+       `(#:modules ((guix build utils))
+         #:builder (begin
+                     (use-modules (guix build utils))
+                     (let* ((out (assoc-ref %outputs "out"))
+                            (bin (string-append out "/bin"))
+                            (source (assoc-ref %build-inputs "source"))
+                            (python (assoc-ref %build-inputs "python")))
+                       (mkdir-p bin)
+                       (with-directory-excursion bin
+                         (copy-file (string-append source "/subdl") "subdl")
+                         (patch-shebang "subdl"
+                                        (list (string-append python "/bin")))
+                         (chmod "subdl" #o555))))))
+      (inputs `(("python" ,python)))
+      (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
+      (description
+       "Subdl is a command-line tool for downloading subtitles from opensubtitles.org.
+By default, it will search for English subtitles, display the results,
+download the highest-rated result in the requested language and save it to the
+appropriate filename.")
+      (license license:gpl3+)
+      (home-page "https://github.com/alexanderwink/subdl"))))
-- 
2.16.3

             reply	other threads:[~2018-04-01 15:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-01 15:15 Pierre Neidhardt [this message]
2018-04-01 15:24 ` [bug#31017] [PATCH] gnu: Add subdl Peter Neidhardt
2018-04-02 21:02 ` Leo Famulari
2018-04-03  4:19   ` Pierre Neidhardt
2018-04-04 11:43     ` Ludovic Courtès
2018-04-05  6:30     ` bug#31017: " Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180401151502.26423-1-ambrevar@gmail.com \
    --to=ambrevar@gmail.com \
    --cc=31017@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.