commit 490e904ba44fb32053e5a19469e36c72a2ca6781
parent 46b70c85f9344532dc023968cf5d851f422ad96f
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Fri, 16 Aug 2024 02:15:08 +0400
Add pycouchdb
Diffstat:
2 files changed, 47 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -107,6 +107,7 @@ lib.makeScope newScope (
};
portolan = callPackage ./development/python-modules/portolan { };
pyarrow_ops = callPackage ./development/python-modules/pyarrow_ops { };
+ pycouchdb = callPackage ./development/python-modules/pycouchdb { };
pymbtiles = callPackage ./development/python-modules/pymbtiles { };
pytest-docker-fixtures = callPackage ./development/python-modules/pytest-docker-fixtures { };
pytest-mp = callPackage ./development/python-modules/pytest-mp { };
diff --git a/pkgs/development/python-modules/pycouchdb/default.nix b/pkgs/development/python-modules/pycouchdb/default.nix
@@ -0,0 +1,46 @@
+{
+ lib,
+ python3Packages,
+ fetchFromGitHub,
+}:
+
+python3Packages.buildPythonPackage rec {
+ pname = "pycouchdb";
+ version = "1.16.0";
+ pyproject = true;
+ disabled = python3Packages.pythonOlder "3.8";
+
+ src = fetchFromGitHub {
+ owner = "histrio";
+ repo = "py-couchdb";
+ rev = "v${version}";
+ hash = "sha256-jcDES8PC02F5eel2KThYZFXKzUm70UqktG521lt+Dj0=";
+ };
+
+ postPatch = ''
+ substituteInPlace pyproject.toml \
+ --replace-fail "poetry.masonry" "poetry.core.masonry" \
+ --replace-fail "poetry>=" "poetry-core>="
+ '';
+
+ build-system = with python3Packages; [ poetry-core ];
+
+ dependencies = with python3Packages; [
+ requests
+ chardet
+ ];
+
+ doCheck = false;
+
+ nativeCheckInputs = with python3Packages; [
+ pytestCheckHook
+ responses
+ ];
+
+ meta = {
+ description = "Modern pure python CouchDB Client";
+ homepage = "https://github.com/histrio/py-couchdb";
+ license = lib.licenses.bsd3;
+ maintainers = [ lib.maintainers.sikmir ];
+ };
+}