nixpkgs/pkgs/development/python-modules/youtube-transcript-api/default.nix

45 lines
864 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, requests
, mock
, httpretty
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "youtube-transcript-api";
version = "0.4.4";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "jdepoix";
repo = pname;
rev = "v${version}";
hash = "sha256-RNPWTgAOwS+tXGLQYyIyka36xS1E1499OAP84aT6m3A=";
};
propagatedBuildInputs = [
requests
];
checkInputs = [
mock
httpretty
pytestCheckHook
];
pythonImportsCheck = [
"youtube_transcript_api"
];
meta = with lib; {
description = "Python API which allows you to get the transcripts/subtitles for a given YouTube video";
homepage = "https://github.com/jdepoix/youtube-transcript-api";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}