aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2019-06-17 03:02:34 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2019-06-17 03:04:31 +0200
commit58637415bedb8a91d916ab6ed6f318f7b7023c00 (patch)
tree87357bc2d44bd7a8e9272e2f15ded938d575a1fc /gnu
parenta157fb2723597e82a6bcaa90bc35531fe595859e (diff)
downloadguix-58637415bedb8a91d916ab6ed6f318f7b7023c00.tar
guix-58637415bedb8a91d916ab6ed6f318f7b7023c00.tar.gz
gnu: youtube-viewer: Refer to youtube-dl.
* gnu/packages/video.scm (youtube-viewer)[inputs]: Add youtube-dl. [arguments]: Add ‘refer-to-inputs’ phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/video.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index d1fdd12177..760c057ac0 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1627,7 +1627,10 @@ audio, images) from the Web. It can use either mpv or vlc for playback.")
("perl-libwww" ,perl-libwww)
("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
("perl-mozilla-ca" ,perl-mozilla-ca)
- ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
+ ("perl-unicode-linebreak" ,perl-unicode-linebreak)
+
+ ;; Some videos play without youtube-dl, but others silently fail to.
+ ("youtube-dl" ,youtube-dl)))
(arguments
`(#:modules ((guix build perl-build-system)
(guix build utils)
@@ -1635,6 +1638,13 @@ audio, images) from the Web. It can use either mpv or vlc for playback.")
#:module-build-flags '("--gtk")
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'refer-to-inputs
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "lib/WWW/YoutubeViewer.pm"
+ (("'youtube-dl'")
+ (format #f "'~a/bin/youtube-dl'"
+ (assoc-ref inputs "youtube-dl"))))
+ #t))
(add-after 'install 'install-desktop
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))