pyzotero-cli

This commit is contained in:
2026-02-06 16:06:50 +01:00
parent e74b485510
commit 387330c227
4 changed files with 85 additions and 1 deletions

View File

@@ -3,5 +3,5 @@ let
packages = import ../pkgs { pkgs = prev; };
in
{
inherit (packages) example-a example-b;
inherit (packages) example-a example-b pyzotero pyzotero-cli;
}

View File

@@ -3,6 +3,10 @@ let
self = {
example-a = pkgs.callPackage ./example-a { };
example-b = pkgs.callPackage ./example-b { };
pyzotero = pkgs.callPackage ./pyzotero { };
pyzotero-cli = pkgs.callPackage ./pyzotero-cli {
pyzotero = self.pyzotero;
};
};
in
self // { default = self.example-a; }

View File

@@ -0,0 +1,42 @@
{
lib,
python3Packages,
fetchPypi,
pyzotero,
}:
python3Packages.buildPythonApplication rec {
pname = "pyzotero-cli";
version = "0.1.6";
pyproject = true;
src = fetchPypi {
pname = "pyzotero_cli";
inherit version;
hash = "sha256-qQdH4takRxu20bgYuOKgzn65fEplKP0GqVaD3PLH+5w=";
};
build-system = with python3Packages; [
setuptools
];
dependencies = [
pyzotero
] ++ (with python3Packages; [
click
pyyaml
tabulate
python-dotenv
pytest
]);
pythonImportsCheck = [ "pyzotero_cli" ];
meta = {
description = "CLI wrapper for pyzotero - use Zotero from the command line";
homepage = "https://github.com/chriscarrollsmith/pyzotero-cli";
license = lib.licenses.mit;
platforms = lib.platforms.all;
mainProgram = "zot";
};
}

38
pkgs/pyzotero/default.nix Normal file
View File

@@ -0,0 +1,38 @@
{
lib,
python3Packages,
fetchPypi,
}:
python3Packages.buildPythonPackage rec {
pname = "pyzotero";
version = "1.6.11";
pyproject = true;
src = fetchPypi {
pname = "pyzotero";
inherit version;
hash = "sha256-l3P6k4+IrTFX2BJblBjpvY8nIzldDR8DT3QaQ+BzV3Q=";
};
build-system = with python3Packages; [
setuptools
setuptools-scm
];
dependencies = with python3Packages; [
feedparser
bibtexparser
pytz
httpx
];
pythonImportsCheck = [ "pyzotero" ];
meta = {
description = "Python API client for the Zotero API";
homepage = "https://github.com/urschrei/pyzotero";
license = lib.licenses.blueOak100;
platforms = lib.platforms.all;
};
}