summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2017-12-23 21:18:46 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2017-12-23 23:57:59 +0100
commit5e84eab06b987d2edf8205e54faee1fa93dcd01a (patch)
treebb7c59795dc9df2e7bb06bfcfdc9926c05120cb3
parent817e91bca91079afa27e1ae2686f0989b530ae7d (diff)
downloadpatches-5e84eab06b987d2edf8205e54faee1fa93dcd01a.tar
patches-5e84eab06b987d2edf8205e54faee1fa93dcd01a.tar.gz
gnu: you-get: Explicitly invoke input ffmpeg.
The ‘ffmpeg’ input was never actually used. * gnu/packages/video.scm (you-get)[arguments]: Add ‘qualify-input-references’ phase.
-rw-r--r--gnu/packages/video.scm20
1 files changed, 17 insertions, 3 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 40606d862c..42abe30fba 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1257,10 +1257,24 @@ other site that youtube-dl supports.")
(base32
"0cdbh5w0chw3dlrwizm91l6sgkkzy7p6h0072dai4xbw5zgld31k"))))
(build-system python-build-system)
- (arguments
- '(#:tests? #f)) ; no tests
(inputs
- `(("ffmpeg" ,ffmpeg)))
+ `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'qualify-input-references
+ ;; Explicitly invoke the input ffmpeg, instead of whichever one
+ ;; happens to be in the user's $PATH at run time.
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
+ "/bin/ffmpeg")))
+ (substitute* "src/you_get/processor/ffmpeg.py"
+ ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
+ ;; same string is also used when sniffing ffmpeg's output.
+ (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
+ (string-append prefix "'" ffmpeg "'")))
+ #t))))
+ #:tests? #f)) ; XXX some tests need Internet access
(synopsis "Download videos, audio, or images from Web sites")
(description
"You-Get is a command-line utility to download media contents (videos,