depot/third_party/nixpkgs/pkgs/development/python-modules/youtube-transcript-api/default.nix
Default email d56f44df06 Project import generated by Copybara.
GitOrigin-RevId: bc4b9eef3ce3d5a90d8693e8367c9cbfc9fc1e13
2022-04-03 20:54:34 +02:00

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 ];
};
}