summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/bilibili-api-python
diff options
context:
space:
mode:
authorMoraxyc <i@qaq.li>2024-05-26 00:39:51 +0800
committerMoraxyc <i@qaq.li>2024-05-26 08:40:27 +0800
commit46d0b37373766fd16896bae06f7306b18c2ec626 (patch)
tree73a04c29e17da89bd55b2615f42cfd104eee08a0 /pkgs/development/python-modules/bilibili-api-python
parentpython3Packages.qrcode-terminal: init at 0.8 (diff)
downloadnixpkgs-46d0b37373766fd16896bae06f7306b18c2ec626.tar.gz
python3Packages.bilibili-api-python: init at 16.2.0
Diffstat (limited to 'pkgs/development/python-modules/bilibili-api-python')
-rw-r--r--pkgs/development/python-modules/bilibili-api-python/default.nix76
1 files changed, 76 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/bilibili-api-python/default.nix b/pkgs/development/python-modules/bilibili-api-python/default.nix
new file mode 100644
index 000000000000..259c912438c4
--- /dev/null
+++ b/pkgs/development/python-modules/bilibili-api-python/default.nix
@@ -0,0 +1,76 @@
+{
+ aiohttp,
+ apscheduler,
+ beautifulsoup4,
+ brotli,
+ buildPythonPackage,
+ colorama,
+ fetchPypi,
+ httpx,
+ lib,
+ lxml,
+ pillow,
+ pycryptodomex,
+ pyyaml,
+ qrcode,
+ qrcode-terminal,
+ requests,
+ rsa,
+ setuptools,
+ setuptools-scm,
+ tqdm,
+ yarl,
+}:
+buildPythonPackage rec {
+ pname = "bilibili-api-python";
+ version = "16.2.0";
+ pyproject = true;
+
+ src = fetchPypi {
+ inherit pname version;
+ hash = "sha256-ecv9lzp2L13seBosahgnglaZP8YZCD/13nlTPP8LCs0=";
+ };
+
+ postPatch = ''
+ # The upstream uses requirements.txt, which overly strict version constraints.
+ substituteInPlace requirements.txt \
+ --replace-fail "~=" ">="
+ '';
+
+ build-system = [
+ setuptools-scm
+ setuptools
+ ];
+
+ dependencies = [
+ aiohttp
+ beautifulsoup4
+ colorama
+ lxml
+ pyyaml
+ brotli
+ httpx
+ qrcode
+ requests
+ apscheduler
+ rsa
+ pillow
+ tqdm
+ yarl
+ pycryptodomex
+ qrcode-terminal
+ ];
+
+ # tests require network
+ doCheck = false;
+
+ pythonImportsCheck = [ "bilibili_api" ];
+
+ meta = {
+ changelog = "https://github.com/Nemo2011/bilibili-api/releases/tag/${version}";
+ description = "A python module providing convenient integration for various Bilibili API along with some additional common features";
+ homepage = "https://nemo2011.github.io/bilibili-api";
+ license = lib.licenses.gpl3Plus;
+ maintainers = with lib.maintainers; [ moraxyc ];
+ };
+}