diff options
Diffstat (limited to 'pkgs/development/python-modules/net2grid/default.nix')
-rw-r--r-- | pkgs/development/python-modules/net2grid/default.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/net2grid/default.nix b/pkgs/development/python-modules/net2grid/default.nix new file mode 100644 index 0000000000000..05b5321a69cfa --- /dev/null +++ b/pkgs/development/python-modules/net2grid/default.nix @@ -0,0 +1,58 @@ +{ lib +, aiohttp +, aresponses +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, yarl +}: + +buildPythonPackage rec { + pname = "net2grid"; + version = "3.0.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "klaasnicolaas"; + repo = "python-net2grid"; + rev = "v${version}"; + hash = "sha256-nT9qMv4Zr7SjNwHRN3HRR11yl+Oue8VVCfJr2n1D02Q="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + yarl + ]; + + checkInputs = [ + aresponses + pytest-asyncio + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '"0.0.0"' '"${version}"' \ + --replace 'addopts = "--cov"' "" + ''; + + pythonImportsCheck = [ + "net2grid" + ]; + + meta = with lib; { + description = "Module for interacting with NET2GRID devices"; + homepage = "https://github.com/klaasnicolaas/python-net2grid"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |