Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions pkgs/by-name/yt/yt-dlp/package.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
lib,
python3Packages,
atomicparsley,
deno,
fetchFromGitHub,
ffmpeg-headless,
rtmpdump,
atomicparsley,
pandoc,
installShellFiles,
pandoc,
rtmpdump,
atomicparsleySupport ? true,
ffmpegSupport ? true,
javascriptSupport ? true,
rtmpSupport ? true,
withAlias ? false, # Provides bin/youtube-dl for backcompat
nix-update-script,
Expand All @@ -19,14 +21,14 @@ python3Packages.buildPythonApplication rec {
# The websites yt-dlp deals with are a very moving target. That means that
# downloads break constantly. Because of that, updates should always be backported
# to the latest stable release.
version = "2025.10.22";
version = "2025.11.12";
pyproject = true;

src = fetchFromGitHub {
owner = "yt-dlp";
repo = "yt-dlp";
tag = version;
hash = "sha256-jQaENEflaF9HzY/EiMXIHgUehAJ3nnDT9IbaN6bDcac=";
hash = "sha256-Em8FLcCizSfvucg+KPuJyhFZ5MJ8STTjSpqaTD5xeKI=";
};

postPatch = ''
Expand All @@ -53,6 +55,7 @@ python3Packages.buildPythonApplication rec {
requests
urllib3
websockets
yt-dlp-ejs # keep pinned version in sync!
];
curl-cffi = [ python3Packages.curl-cffi ];
secretstorage = with python3Packages; [
Expand Down Expand Up @@ -80,14 +83,15 @@ python3Packages.buildPythonApplication rec {

# Ensure these utilities are available in $PATH:
# - ffmpeg: post-processing & transcoding support
# - deno: required for full YouTube support (since 2025.11.12)
# - rtmpdump: download files over RTMP
# - atomicparsley: embedding thumbnails
makeWrapperArgs =
let
packagesToBinPath =
[ ]
++ lib.optional atomicparsleySupport atomicparsley
lib.optional atomicparsleySupport atomicparsley
++ lib.optional ffmpegSupport ffmpeg-headless
++ lib.optional javascriptSupport deno
++ lib.optional rtmpSupport rtmpdump;
in
lib.optionals (packagesToBinPath != [ ]) [
Expand All @@ -111,11 +115,13 @@ python3Packages.buildPythonApplication rec {
ln -s "$out/bin/yt-dlp" "$out/bin/youtube-dl"
'';

passthru.updateScript = nix-update-script { };
passthru = {
updateScript = nix-update-script { };
};

meta = {
changelog = "https://github.com/yt-dlp/yt-dlp/blob/${version}/Changelog.md";
description = "Command-line tool to download videos from YouTube.com and other sites (youtube-dl fork)";
description = "Feature-rich command-line audio/video downloader";
homepage = "https://github.com/yt-dlp/yt-dlp/";
license = lib.licenses.unlicense;
longDescription = ''
Expand Down
62 changes: 62 additions & 0 deletions pkgs/development/python-modules/yt-dlp-ejs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchNpmDeps,
hatch-vcs,
hatchling,
nodejs,
npmHooks,
}:

buildPythonPackage rec {
pname = "yt-dlp-ejs";
version = "0.3.1";
pyproject = true;

src = fetchFromGitHub {
owner = "yt-dlp";
repo = "ejs";
tag = version;
hash = "sha256-PoZ7qmrf8en254im2D7fWy9jYiaJwFpq6ZXZP9ouOOQ=";
};

postPatch = ''
# remove when upstream has a lock file we support https://github.com/yt-dlp/ejs/issues/29
cp ${./package-lock.json} package-lock.json

# we already ran npm install
substituteInPlace hatch_build.py \
--replace-fail 'subprocess.run(["npm", "install"], check=True, shell=requires_shell)' ""
'';

npmDeps = fetchNpmDeps {
inherit src postPatch;
hash = "sha256-2Xzetr2pb8J2w+ghfoTVP6oZTeVbHV7EcovwxElnUbA=";
};

build-system = [
hatch-vcs
hatchling
];

nativeBuildInputs = [
nodejs
npmHooks.npmConfigHook
];

meta = {
changelog = "https://github.com/yt-dlp/ejs/releases/tag/${version}";
description = "External JavaScript for yt-dlp supporting many runtimes";
homepage = "https://github.com/yt-dlp/ejs/";
license = with lib.licenses; [
unlicense
mit
isc
];
maintainers = with lib.maintainers; [
SuperSandro2000
FlameFlag
];
};
}
Loading
Loading