Skip to content
Snippets Groups Projects
Unverified Commit 7194b638 authored by Tobias Geerinckx-Rice's avatar Tobias Geerinckx-Rice
Browse files

gnu: youtube-dl: Refer to ffmpeg.

Addresses <https://issues.guix.gnu.org/43418>.

* gnu/packages/video.scm (youtube-dl)[inputs]: Add ffmpeg.
[arguments]: Fall back to input ffmpeg instead of searching $PATH.
parent 5674ea45
No related branches found
No related tags found
No related merge requests found
...@@ -2184,6 +2184,16 @@ (define-public youtube-dl ...@@ -2184,6 +2184,16 @@ (define-public youtube-dl
;; 'youtube-dl.bash-completion'. ;; 'youtube-dl.bash-completion'.
`(#:tests? #f ; Many tests fail. The test suite can be run with pytest. `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
#:phases (modify-phases %standard-phases #:phases (modify-phases %standard-phases
(add-after 'unpack 'default-to-the-ffmpeg-input
(lambda _
;; See <https://issues.guix.gnu.org/43418#5>.
;; ffmpeg is big but required to request free formats
;; from, e.g., YouTube so pull it in unconditionally.
;; Continue respecting the --ffmpeg-location argument.
(substitute* "youtube_dl/postprocessor/ffmpeg.py"
(("\\.get\\('ffmpeg_location'\\)" match)
(format #f "~a or '~a'" match (which "ffmpeg"))))
#t))
(add-before 'install 'fix-the-data-directories (add-before 'install 'fix-the-data-directories
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((prefix (assoc-ref outputs "out"))) (let ((prefix (assoc-ref outputs "out")))
...@@ -2207,6 +2217,8 @@ (define-public youtube-dl ...@@ -2207,6 +2217,8 @@ (define-public youtube-dl
(copy-file "youtube-dl.zsh" (copy-file "youtube-dl.zsh"
(string-append zsh "/_youtube-dl")) (string-append zsh "/_youtube-dl"))
#t)))))) #t))))))
(inputs
`(("ffmpeg" ,ffmpeg)))
(synopsis "Download videos from YouTube.com and other sites") (synopsis "Download videos from YouTube.com and other sites")
(description (description
"Youtube-dl is a small command-line program to download videos from "Youtube-dl is a small command-line program to download videos from
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment