yt-dlp: 2025.10.22 -> 2025.11.12, add JS runtime#460892
yt-dlp: 2025.10.22 -> 2025.11.12, add JS runtime#460892SuperSandro2000 merged 3 commits intoNixOS:masterfrom
Conversation
|
I will take a look how to package yt-dlp-ejs probably later today or tomorrow. Please don't get into a panic, everything will be fine. |
Everything's good, I just wanted to help out as far as I get. The previous version of yt-dlp works fine so far. The current PR works, it just doesn't package the ejs part. Thanks for having a look, I don't think I can do that. |
This is now required for full YouTube extraction support. The upstream project recommends deno as JavaScript runtime for its complete sandbox support. See https://github.com/yt-dlp/yt-dlp/wiki/EJS for more info. Also disable the new javascript support in yt-dlp-light.
|
Without yt-dlp-ejs: With yt-dlp-ejs: I would call that success. 🎉 |
d67e8b1 to
da8c20c
Compare
|
Yeah, using npmfetchdeps and npmconfighook manually lets us build the ejs package. Maybe we can push upstream to provide a nodejs lockfile as well, as they ask for such feedback. @SuperSandro2000 do you want to weigh in there? Or we can somehow use the deno lockfile ourselves. Also, we might have to adapt the license:
|
|
I went ahead and changed the license. Maybe you want to squash the last two commits. I'm also not able to build yt-dlp-ejs (while building yt-dlp), apparently due to a missing package-lock.json. I repeated it on a second system with the same problem, just like ofborg here. |
I first pushed it without that file 😅 |
3cd449e to
1894706
Compare
This comment was marked as outdated.
This comment was marked as outdated.
|
I'd not be comfortable packaging this with a lockfile in-tree, can this wait for the new deno tooling so that it can use deno.lock? |
It can get packaged without yt-dlp-ejs (yt-dlp can download that itself), but this update is much desired by me, because youtube blocked every video format for me on old yt-dlp, so I really would love to see the new version in nixpkgs |
|
@VlaDexa You can use the PR code in your own config (if you have questions, ask on discourse.nixos.org, I won't discuss that here). But the main objection to adding a huge lockfile is that such lockfiles tend to bloat the nixpkgs tarballs and affect everyone, and puts an extra maintenance burden for every single update. @SuperSandro2000 I am also still getting the same error. |
See yt-dlp/ejs#29 for upstream solution tracking of this problem |
yt-dlp is a package which requires frequent and in time updates to be useful and also needs to be backported to stable. I already tested the current commits on stable and they work there. If adding deno tooling would only require 5 days to be merged, then I still calculate with multiple issues getting opened in that timeframe requesting an update for the package. I would like to resolve this before that is happening. #326003 seems to require lots of work and it does not look to me that it will be ready immediately and I do not want to pressure work when we may not truly need it. Lets look on how ejs uses the js eco system. They have pinned exact versions in their package.json file (https://github.com/yt-dlp/ejs/blob/main/package.json#L10-L13) which is great for us as the lock file can't change much about the relevant packages, no updates are possible there. Also they advertise npm in the build script (https://github.com/yt-dlp/ejs/blob/main/hatch_build.py#L21-L26) so it is at least partly supported. We don't have great deno or bun support (yet) in nixpkgs, so we are using the 3rd best choice we have but it is something upstream allows us. The patch we are applying us purely on us, as we replace npm install with the npm config hook. Also I am the maintainer of yt-dlp already and I am willing to also take the maintainership of that new python dependency as well as I see it to be very little work to maintain other than making sure to also update it when yt-dlp bumps its requirements.
We at least need rollup to build the bundle...
Leave that a problem for me to solve. I will likely add an update script with the next update.
Ahh, I think I forgot to re-add the postPatch to the fetcher and since I have the FOD already generated it stayed the same. |
c458089 to
661d5d5
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
My concern is primarily about bloat as mentioned above, as I've been working to remove lockfiles and large files in general from nixpkgs recently(see my recent PRs), so as long as this is strictly temporary, its fine. But I do not want a lockfile sticking around permanently, as that causes lockfile bloat that makes nixpkgs less accessible for everyone. |
This comment has been minimized.
This comment has been minimized.
661d5d5 to
7910f1a
Compare
|
7910f1a to
9937d91
Compare
|
(Still want to eyeball this at some point in the next ~15h, just posting here so it doesn’t look like I dropped it.) |
|
I would appreciate it if you could allocate some time for that so that we can merge this before people start to notice that we hadn't updated yet 😅 |
|
@winterqt I am going ahead and merging this one as many people are waiting for it and you didn't react in the last 3 days. The solution I proposed is not horrible but also not perfect and as soon as upstream switches lock files or we support demo, the vendored lock file is going to be dropped but making yt-dlp less useful in that timeframe is not reasonable due everyone eagerly awaiting this update. |
|
Successfully created backport PR for |
Why did you not move the ytdl-ejs to by-name? |
Want to new yt-dlp fixes - NixOS/nixpkgs#462410 - NixOS/nixpkgs#460892
I am reading this like I forgot a review comment in the thread, but I could not find any previous comment regarding this. We also have CI for this, so no new packages under |
Flake lock file updates:
• Updated input 'hyprland':
'github:hyprwm/Hyprland/64ee8f8a72d62069a6bef45ca05bef1d0d412e1f?narHash=sha256-KsMb0niSk2zxZcSWjIkgcDIGwoKZXDYXdw9lVKdgga8%3D' (2025-11-13)
→ 'github:hyprwm/Hyprland/43527d363472b52f17dd9f9f4f87ec25cbf8a399?narHash=sha256-s5FF0rQE6UIBAUfqk5ZqGedU3bhW0OvXfmz5lzJGurY%3D' (2025-11-13)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4?narHash=sha256-SlybxLZ1/e4T2lb1czEtWVzDCVSTvk9WLwGhmxFmBxI%3D' (2025-11-11)
→ 'github:NixOS/nixpkgs/c5ae371f1a6a7fd27823bc500d9390b38c05fa55?narHash=sha256-4PqRErxfe%2B2toFJFgcRKZ0UI9NSIOJa%2B7RXVtBhy4KE%3D' (2025-11-12)
• Updated input 'nixpkgs-patch-447721':
'NixOS/nixpkgs#447721'
→ 'NixOS/nixpkgs#447721'
• Updated input 'nixpkgs-patch-460892':
'NixOS/nixpkgs#460892'
→ 'NixOS/nixpkgs#460892'
• Updated input 'nixvim':
'github:nix-community/nixvim/84902b354fd0f122c40880b90dc8ac89d4d0daea?narHash=sha256-%2BT9oUulnXOQmy37GGOivHSvEyViA4gQ41mFZEPEDuOA%3D' (2025-11-11)
→ 'github:nix-community/nixvim/b51f31cef899e8f152384cda6097a5fde0e39ef3?narHash=sha256-R6wESh58QLCeoK1VQUO4sLcz60RNZde8klTqGgUXQkw%3D' (2025-11-14)
• Updated input 'nur':
'github:nix-community/NUR/ef14c89be0f2225a3d5c463bc5f4d28fe1538041?narHash=sha256-PR3iDAc0QwthI34hOIcvJFTn7tOr/zKONg309bteAm8%3D' (2025-11-13)
→ 'github:nix-community/NUR/3f88d4e8f330dd9f89937855ddd1168130cfaf7c?narHash=sha256-I08YV5fkB7csLog%2BtC4a79cp%2B55/NigfE39g6Ytzw90%3D' (2025-11-14)
• Updated input 'pre-commit-hooks':
'github:cachix/git-hooks.nix/c5c3147730384576196fb5da048a6e45dee10d56?narHash=sha256-QqS72GvguP56oKDNUckWUPNJHjsdeuXh5RyoKz0wJ%2BE%3D' (2025-11-11)
→ 'github:cachix/git-hooks.nix/84255025dee4c8701a99fbff65ac3c9095952f99?narHash=sha256-M%2B2QBQoC0lzkCdUQRXylR2RkcT6BCRfW3KDs%2Bc/IGLw%3D' (2025-11-13)
• Updated input 'sops-nix':
'github:Mic92/sops-nix/b80c966e70fa0615352c9596315678df1de75801?narHash=sha256-TCVNCn/GcKhwm%2BWlSJEZEPW4ISQdU9ICIU3lTiOLBYc%3D' (2025-11-13)
→ 'github:Mic92/sops-nix/a2bcd1c25c1d29e22756ccae094032ab4ada2268?narHash=sha256-A91a%2BK0Q9wfdPLwL06e/kbHeAWSzPYy2EGdTDsyfb%2Bs%3D' (2025-11-13)
Flake lock file updates:
• Updated input 'bcachefs-nixpkgs-patch-429126':
'NixOS/nixpkgs#429126'
→ 'NixOS/nixpkgs#429126'
• Updated input 'hyprland':
'github:hyprwm/Hyprland/edc311544a54a06ce4acb759b4d9a30853695452?narHash=sha256-jARAMSNHOZ5RNYlBZ2wlE2pdujedylA5QDBuaQs3Vrk%3D' (2025-11-18)
→ 'github:hyprwm/Hyprland/6a8d3069926dc8b442b0e6bc5b8d4099de5a3131?narHash=sha256-dXU0RoJsnm2nNM4nEW0cm95Zh77ywXL25pz/4IEphf0%3D' (2025-11-18)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/50a96edd8d0db6cc8db57dab6bb6d6ee1f3dc49a?narHash=sha256-Y7TDFPK4GlqrKrivOcsHG8xSGqQx3A6c%2Bi7novT85Uk%3D' (2025-11-16)
→ 'github:NixOS/nixpkgs/89c2b2330e733d6cdb5eae7b899326930c2c0648?narHash=sha256-Stk9ZYRkGrnnpyJ4eqt9eQtdFWRRIvMxpNRf4sIegnw%3D' (2025-11-17)
• Updated input 'nixpkgs-patch-460892':
'NixOS/nixpkgs#460892'
→ 'NixOS/nixpkgs#460892'
• Updated input 'nixvim':
'github:nix-community/nixvim/7a30e6cf259d8db84aefc626058c074bd995d482?narHash=sha256-FhgZD8pk3VE2SL0g4nCYKF0L6IO3uL110tfrBaZkdG0%3D' (2025-11-17)
→ 'github:nix-community/nixvim/7408b72662f2c6930448539638528b23c05ef17e?narHash=sha256-C8FfYP5D0bgoZrIqrGGMNozc8Way3qGx/U6tK/RBZQ8%3D' (2025-11-18)
• Updated input 'nur':
'github:nix-community/NUR/4c584dcedf9aa3394e9730e62693515a0e47674b?narHash=sha256-B1ua1UtkPuMwT8o4nOR7yNP5yz10usMcNnxwHpGtLck%3D' (2025-11-18)
→ 'github:nix-community/NUR/b2d3c8cb0007b4e3db6644f1ed868f6d910bb8dc?narHash=sha256-l08slm/Oo3e%2BrBzY%2BKqRyxKKOXf5bw7Z1PqYtcN84ZE%3D' (2025-11-18)
Want to new yt-dlp fixes - NixOS/nixpkgs#462410 - NixOS/nixpkgs#460892
This supersedes #460852. Context: #460852 (comment).
New docs: https://github.com/yt-dlp/yt-dlp/wiki/EJS and more details on the migration for packagers: yt-dlp/yt-dlp#15012.
For full YouTube support, we have to add a JavaScript engine. The upstream project prefers
denofor security reasons. Bun, node and QuickJS are also supported, but have to be enabled with a flag, hence we should also use deno by default.Furthermore, the yt-dlp-ejs project is required for extraction.
We may package this repo as well.I just tested getting this dynamic remote code with
--remote-components ejs:npmso far.Initial attempts to also package yt-dlp-ejs were not fruitful (we have to mix Python and JavaScript builders).Closes #455290
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.