From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2eiD-0002MP-Ed for guix-patches@gnu.org; Sun, 01 Apr 2018 11:16:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f2eiA-0006Iu-88 for guix-patches@gnu.org; Sun, 01 Apr 2018 11:16:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:54767) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f2eiA-0006Im-4C for guix-patches@gnu.org; Sun, 01 Apr 2018 11:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f2ei9-0007Mq-Q5 for guix-patches@gnu.org; Sun, 01 Apr 2018 11:16:01 -0400 Subject: [bug#31017] [PATCH] gnu: Add subdl Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2ehR-0001xH-W2 for guix-patches@gnu.org; Sun, 01 Apr 2018 11:15:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f2ehO-0005aH-Pg for guix-patches@gnu.org; Sun, 01 Apr 2018 11:15:17 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:34394) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f2ehO-0005Zq-Ek for guix-patches@gnu.org; Sun, 01 Apr 2018 11:15:14 -0400 Received: by mail-pf0-x242.google.com with SMTP id q9so8017193pff.1 for ; Sun, 01 Apr 2018 08:15:14 -0700 (PDT) Received: from localhost.localdomain ([103.61.255.46]) by smtp.gmail.com with ESMTPSA id q15sm20182149pgv.49.2018.04.01.08.15.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Apr 2018 08:15:12 -0700 (PDT) From: Pierre Neidhardt Date: Sun, 1 Apr 2018 20:45:02 +0530 Message-Id: <20180401151502.26423-1-ambrevar@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31017@debbugs.gnu.org * 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