diff options
author | raingloom <raingloom@riseup.net> | 2022-08-13 15:53:01 +0200 |
---|---|---|
committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2022-08-07 02:00:07 +0200 |
commit | c2481b1bea56f2885110d5af0a6cff36a3d95933 (patch) | |
tree | c345f677a95c4ae95cc7936260e620dbc6e3f788 /gnu | |
parent | a6fb2d27608933f3dbf8d8543b424bac12552254 (diff) | |
download | guix-c2481b1bea56f2885110d5af0a6cff36a3d95933.tar.gz |
gnu: yt-dlp: Build from Git.
* gnu/packages/video.scm (yt-dlp)[source]: Use GIT-FETCH and GIT-FILE-NAME. Remove the snippet. [arguments]: Build the man page in the 'build-generated-files phase. [native-inputs]: Add pandoc. Co-authored-by: Tobias Geerinckx-Rice <me@tobias.gr>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/video.scm | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 4b438a08c8..1fec5da40d 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -143,6 +143,7 @@ #:use-module (gnu packages gnupg) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) + #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages iso-codes) @@ -2487,25 +2488,15 @@ YouTube.com and many more sites.") (package/inherit youtube-dl (name "yt-dlp") (version "2022.08.08") - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/yt-dlp/yt-dlp/" - "releases/download/" - version "/yt-dlp.tar.gz")) - (sha256 - (base32 - "0vrmdk3znncph3a4b1y83pxnzhkv1b210b0ncb5daghgsz0jwv1k")) - (snippet - #~(begin - ;; Delete the pre-generated files, except for the man page - ;; which requires 'pandoc' to build. - (for-each delete-file - (list "yt-dlp" - ;;pandoc is needed to generate - ;;"yt-dlp.1" - "completions/bash/yt-dlp" - "completions/fish/yt-dlp.fish" - "completions/zsh/_yt-dlp")))))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/yt-dlp/yt-dlp/") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "07qz1zdndlpki0asw35zk5hdjcwpl3n1g54nxg4yb1iykbyv7rll")))) (arguments (substitute-keyword-arguments (package-arguments youtube-dl) ((#:tests? _) #t) @@ -2519,8 +2510,11 @@ YouTube.com and many more sites.") (format #f "~a or '~a'" match (which "ffmpeg")))))) (replace 'build-generated-files (lambda _ - ;; Avoid the yt-dlp.1 target, which requires pandoc. - (invoke "make" "PYTHON=python" "yt-dlp" "completions"))) + (invoke "make" + "PYTHON=python" + "yt-dlp" + "yt-dlp.1" + "completions"))) (replace 'fix-the-data-directories (lambda* (#:key outputs #:allow-other-keys) (let ((prefix (assoc-ref outputs "out"))) @@ -2541,7 +2535,7 @@ YouTube.com and many more sites.") python-pycryptodomex python-websockets))) (native-inputs (modify-inputs (package-native-inputs youtube-dl) - (append python-pytest))) + (append pandoc python-pytest))) (description "yt-dlp is a small command-line program to download videos from YouTube.com and many more sites. It is a fork of youtube-dl with a |