Unverified Commit 9937d910 authored by Sandro Jäckel's avatar Sandro Jäckel
Browse files

yt-dlp-ejs: init at 0.3.1

parent 5ec4b3fc
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
{
  lib,
  python3Packages,
  atomicparsley,
  deno,
  fetchFromGitHub,
  ffmpeg-headless,
  rtmpdump,
  deno,
  atomicparsley,
  pandoc,
  installShellFiles,
  pandoc,
  rtmpdump,
  atomicparsleySupport ? true,
  ffmpegSupport ? true,
  javascriptSupport ? true,
@@ -55,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; [
@@ -114,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 = ''
+62 −0
Original line number Diff line number Diff line
{
  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
    ];
  };
}
+3186 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Diff line number Diff line
@@ -20658,6 +20658,8 @@ self: super: with self; {
  yt-dlp-dearrow = callPackage ../development/python-modules/yt-dlp-dearrow { };
  yt-dlp-ejs = callPackage ../development/python-modules/yt-dlp-ejs { };
  yt-dlp-light = toPythonModule (pkgs.yt-dlp-light.override { python3Packages = self; });
  yte = callPackage ../development/python-modules/yte { };