From 6b1fd2a49b2dc23faf2ffbf768a2bc4e014dffcd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 22 Jan 2024 09:50:01 +0100 Subject: [PATCH] python311Packages.anysqlite: init at 0.0.5 Sqlite3 for asyncio and trio https://github.com/karpetrosyan/anysqlite --- .../python-modules/anysqlite/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/anysqlite/default.nix diff --git a/pkgs/development/python-modules/anysqlite/default.nix b/pkgs/development/python-modules/anysqlite/default.nix new file mode 100644 index 000000000000..bf6cb41a7916 --- /dev/null +++ b/pkgs/development/python-modules/anysqlite/default.nix @@ -0,0 +1,51 @@ +{ lib +, anyio +, buildPythonPackage +, fetchFromGitHub +, hatch-fancy-pypi-readme +, hatchling +, pytestCheckHook +, pythonOlder +, trio +}: + +buildPythonPackage rec { + pname = "anysqlite"; + version = "0.0.5"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "karpetrosyan"; + repo = "anysqlite"; + rev = "refs/tags/v${version}"; + hash = "sha256-6kNN6kjkMHVNneMq/8zQxqMIXUxH/+eWLX8XhoHqFRU="; + }; + + nativeBuildInputs = [ + hatch-fancy-pypi-readme + hatchling + ]; + + propagatedBuildInputs = [ + anyio + ]; + + nativeCheckInputs = [ + pytestCheckHook + trio + ]; + + pythonImportsCheck = [ + "anysqlite" + ]; + + meta = with lib; { + description = "Sqlite3 for asyncio and trio"; + homepage = "https://github.com/karpetrosyan/anysqlite"; + changelog = "https://github.com/karpetrosyan/anysqlite/blob/${version}/CHANGELOG.md"; + license = licenses.bsd3; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6375fac04d61..3b0bafbaae09 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -607,6 +607,8 @@ self: super: with self; { anyqt = callPackage ../development/python-modules/anyqt { }; + anysqlite = callPackage ../development/python-modules/anysqlite { }; + anytree = callPackage ../development/python-modules/anytree { inherit (pkgs) graphviz; };