diff --git a/pkgs/development/python-modules/aiosyncthing/default.nix b/pkgs/development/python-modules/aiosyncthing/default.nix new file mode 100644 index 00000000000..553876a48cf --- /dev/null +++ b/pkgs/development/python-modules/aiosyncthing/default.nix @@ -0,0 +1,45 @@ +{ lib +, aiohttp +, aioresponses +, buildPythonPackage +, fetchFromGitHub +, expects +, pytest-asyncio +, pytest-mock +, pytestCheckHook +, yarl +}: + +buildPythonPackage rec { + pname = "aiosyncthing"; + version = "0.5.1"; + + src = fetchFromGitHub { + owner = "zhulik"; + repo = pname; + rev = "v${version}"; + sha256 = "0704qbg3jy80vaw3bcvhy988s1qs3fahpfwkja71fy70bh0vc860"; + }; + + propagatedBuildInputs = [ + aiohttp + yarl + ]; + + checkInputs = [ + aioresponses + expects + pytestCheckHook + pytest-asyncio + pytest-mock + ]; + + pythonImportsCheck = [ "aiosyncthing" ]; + + meta = with lib; { + description = "Python client for the Syncthing REST API"; + homepage = "https://github.com/zhulik/aiosyncthing"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/expects/default.nix b/pkgs/development/python-modules/expects/default.nix new file mode 100644 index 00000000000..093bdc27bf8 --- /dev/null +++ b/pkgs/development/python-modules/expects/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +}: + +buildPythonPackage rec { + pname = "expects"; + version = "0.9.0"; + + src = fetchFromGitHub { + owner = "jaimegildesagredo"; + repo = pname; + rev = "v${version}"; + sha256 = "0mk1mhh8n9ly820krkhazn1w96f10vmgh21y2wr44sn8vwr4ngyy"; + }; + + # mamba is used as test runner. Not available and should not be used as + # it's just another unmaintained test runner. + doCheck = false; + pythonImportsCheck = [ "expects" ]; + + meta = with lib; { + description = "Expressive and extensible TDD/BDD assertion library for Python"; + homepage = "https://expects.readthedocs.io/"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 150132f0b2c..f5383714a7d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -341,6 +341,8 @@ in { aioswitcher = callPackage ../development/python-modules/aioswitcher { }; + aiosyncthing = callPackage ../development/python-modules/aiosyncthing { }; + aiounifi = callPackage ../development/python-modules/aiounifi { }; aiounittest = callPackage ../development/python-modules/aiounittest { }; @@ -2261,6 +2263,8 @@ in { exifread = callPackage ../development/python-modules/exifread { }; + expects = callPackage ../development/python-modules/expects { }; + expiringdict = callPackage ../development/python-modules/expiringdict { }; exrex = callPackage ../development/python-modules/exrex { };