From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UJwUHeqxZmFnywAAgWs5BA (envelope-from ) for ; Wed, 13 Oct 2021 12:16:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id qMOtGOqxZmHvSQAAbx9fmQ (envelope-from ) for ; Wed, 13 Oct 2021 10:16:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C8A2283D9 for ; Wed, 13 Oct 2021 12:16:09 +0200 (CEST) Received: from localhost ([::1]:60444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mabIu-0005Wh-Rw for larch@yhetil.org; Wed, 13 Oct 2021 06:16:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mabIo-0005VQ-3D for guix-patches@gnu.org; Wed, 13 Oct 2021 06:16:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46925) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mabIn-000278-RB for guix-patches@gnu.org; Wed, 13 Oct 2021 06:16:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mabIn-0008It-NQ for guix-patches@gnu.org; Wed, 13 Oct 2021 06:16:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51179] [PATCH] gnu: Add yt-dlp. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 13 Oct 2021 10:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51179 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Robin Templeton , 51179@debbugs.gnu.org Received: via spool by 51179-submit@debbugs.gnu.org id=B51179.163412015631907 (code B ref 51179); Wed, 13 Oct 2021 10:16:01 +0000 Received: (at 51179) by debbugs.gnu.org; 13 Oct 2021 10:15:56 +0000 Received: from localhost ([127.0.0.1]:58471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mabId-0008IU-7r for submit@debbugs.gnu.org; Wed, 13 Oct 2021 06:15:56 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mabIZ-0008IF-Cy for 51179@debbugs.gnu.org; Wed, 13 Oct 2021 06:15:49 -0400 Received: by mail-wr1-f65.google.com with SMTP id t2so6508352wrb.8 for <51179@debbugs.gnu.org>; Wed, 13 Oct 2021 03:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=LixeefSJ+rykGL10YWOYXdR2Du1lcdBZc4cYARW3pis=; b=kslA2lYIf9t2jXOS2yp3LXjj1PhWOs7SdBwwo1KVgfIui4RMocl7fjr44wX6Q1KW66 SvSeMVsLelF4J/YAgmh/TEiRzq+eC6qx4gkTWOK6e/+zwa2js9cz063cIOymwd8+AN7M +5EGeb9r94AkrPwyJxwoqZN+0sV1nibyeUtqE7B8TtoFZgfb1Bf7o8PRitaVTnLey+83 pT5X7XU39S6z77tKJwFKiaKQe6NZ+QB3yOQN05nKYk8ph1N/+OfssFrvBhvZXtW4Q78P wjBCh2CyOnYB9B3yriCmfj+SGU0n7AlkZno0AUVukIjuIVDeDCO11Tfs1jnmszgPcAal 9Rqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=LixeefSJ+rykGL10YWOYXdR2Du1lcdBZc4cYARW3pis=; b=OCInbHupE9Q5+sp345nD6b9zEQAkFlzGXB9qa0BvTGgJVXEB02ZOeGoDskIkJHYQ89 JMiYzmcx3z06HhdelHUuLaJ2pua6yb/v2L+S/n0ZU788I5lRxNzafiutX7Xw9zz1OA/A 9bVnEKps4hMHO4pimg210HlwHDoVjsrGNrHkiXx8ekW7PljKH4wnz4iGfZ1Qa5PENXK0 9R+VseYDLqGSn0bt7UI+9XmjRopcR0xpjrjHRBmJITfQLqdM3jkuljTX3vkuZPOwXCWb EIlM2ti2hKLxQwnoZH/nUl4z8eSBDNLQNmoqr8ty2d/m45NL7wL+MmDMzgeBvWM/jg9C UKqg== X-Gm-Message-State: AOAM530Y4FIuPAUJM3qMPwdmnkNPsO0PCPizUInpMI/G80sc8vHGeLRH /D7yFf2dNj8l1tsibUk+qLSydDveEx8= X-Google-Smtp-Source: ABdhPJzhjvBJmv0bXy7nHv8DCHRMzNvfA3s3LcSuxW/ERmX3BN6hlygZyCS3FflEO1hEmZivMjFEzg== X-Received: by 2002:a5d:6245:: with SMTP id m5mr38955003wrv.148.1634120141471; Wed, 13 Oct 2021 03:15:41 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id d2sm14052386wrc.32.2021.10.13.03.15.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 03:15:41 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Wed, 13 Oct 2021 12:15:39 +0200 In-Reply-To: <87pms9mf7a.fsf@terpri.org> References: <87pms9mf7a.fsf@terpri.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634120169; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=LixeefSJ+rykGL10YWOYXdR2Du1lcdBZc4cYARW3pis=; b=cQlFAlmT65aIAhSzD20W8J6xWJpDw8aVzaxI7lp3lvTFihM6MvPBt1mWu4iGDvCY0KZg21 rxiXhCLMWjpH0akFopv1Yzd770rJ+1RwqOCWNiX0HRPOC2fPIKyUcmIZeW32i8rL/L5gXj H83lDUaJjqQQczYSb3VzrByCfgGVPWtoOoqEPRoxjdG5S3jyy1+TW/qor/U24VVTBTqDx7 jKi1lQ2GkkY/sE29ntF1stTULrdMeZpHZX7txMAG6wt+D9fMwYHxhZUIxns3EW2V5xblKS MX9F4PPZuySrNcRGNu3fFjZswSj4hU4BIZzJXHtpxjIZXVBhrtD3KWx5qgEchA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634120169; a=rsa-sha256; cv=none; b=Oko+bge8ZO7vNOFWhuMaNt1BaNjDPbJ98iLr65vlMkZ/2Ixy6QLJ2PSChlhEoYWyaMBg1b hZISGMCTSD/V1oqLT87aLAmYx63C9iuM47itXeWNk988qyz8CUU199t1ZADb7cPrOgeWdt vdOyziV5E1TUshjn3A4U4s2kv+ExRPFJ2BzyckdA/2OUSOz+liz/qB1P2k+6+flqKzY8KC tEhyvnxi6y1dngPLWyxvo5sc3sZdkornkRjaDZaKGzpFtOr8A8KF5dkAxlMYRMPtEECqjo DDE5Uf2n4AOZ81VGMqXIt6qnb9osDhswcd2vwpyXvwNDFMoIcifWnSy/2bgfgw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=kslA2lYI; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.71 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=kslA2lYI; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C8A2283D9 X-Spam-Score: -1.71 X-Migadu-Scanner: scn1.migadu.com X-TUID: lLu9Ac2LCz8f Hi Robin, Am Mittwoch, den 13.10.2021, 05:44 -0400 schrieb Robin Templeton: > * gnu/packages/video.scm (yt-dlp): New variable. > > Suggested-by: bdju > --- > gnu/packages/video.scm | 71 > ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 71 insertions(+) > > diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm > index fcac369f60..1aceac25eb 100644 > --- a/gnu/packages/video.scm > +++ b/gnu/packages/video.scm > @@ -2360,6 +2360,77 @@ YouTube.com and many more sites.") > (home-page "https://yt-dl.org") > (license license:public-domain))) > > +(define-public yt-dlp > + (package > + (name "yt-dlp") > + (version "2021.10.10") I think yt-dlp can (and ought to) inherit from youtube-dl, which might simplify some of the below. > + (source (origin > + (method url-fetch) > + (uri (string-append "https://github.com/yt-dlp/yt-dlp/ > " > + "releases/download/" > + version "/yt-dlp.tar.gz")) > + (sha256 > + (base32 > + "1ywld4qhvsik970gbac1h3kvxb74r7150m5axq9r5nffdw5sz3v > d")) > + (snippet > + '(begin > + ;; Delete the pre-generated files, except for the > man page > + ;; which requires 'pandoc' to build. > + (for-each delete-file '("yt-dlp" > + ;;pandoc is needed to > generate > + ;;"yt-dlp.1" > + "completions/bash/yt-dlp" > + "completions/fish/yt- > dlp.fish" > + "completions/zsh/_yt- > dlp")) > + #t)))) Is this the same as for youtube-dl? If not, we might want to give pandoc as native-input. That will increase build times, but it ought not to increase closure size. > + (build-system python-build-system) > + (arguments > + ;; The problem here is that the directory for the man page and > completion > + ;; files is relative, and for some reason, setup.py uses the > + ;; auto-detected sys.prefix instead of the user-defined " > --prefix=FOO". > + ;; So, we need pass the prefix directly. > + `(#:tests? #f ; Many tests fail. The test suite can be run with > pytest. > + #:phases (modify-phases %standard-phases > + (add-after 'unpack 'default-to-the-ffmpeg-input > + (lambda _ > + ;; See ;. > + ;; 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* "yt_dlp/postprocessor/ffmpeg.py" > + (("\\.get\\('ffmpeg_location'\\)" match) > + (format #f "~a or '~a'" match (which > "ffmpeg")))) > + #t)) > + (add-before 'build 'build-generated-files > + (lambda _ > + ;; Avoid the make targets that require pandoc. > + (invoke "make" > + "PYTHON=python" > + "yt-dlp" > + ;;"youtube-dl.1" ; needs pandoc > + "completions"))) > + (add-before 'install 'fix-the-data-directories > + (lambda* (#:key outputs #:allow-other-keys) > + (let ((prefix (assoc-ref outputs "out"))) > + (substitute* "setup.py" > + (("'etc/") > + (string-append "'" prefix "/etc/")) > + (("'share/") > + (string-append "'" prefix "/share/"))) > + #t)))))) Horizontal space is at a premium and you can save some. > + (native-inputs > + `(("zip" ,zip))) > + (inputs > + `(("ffmpeg" ,ffmpeg))) > + (synopsis "Download videos from YouTube.com and other sites") > + (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 > +focus on adding new features while keeping up-to-date with the > +original project.") > + (home-page "https://github.com/yt-dlp/yt-dlp") > + (license license:public-domain))) Otherwise LGTM, but haven't tested. Regards, Liliana