diff options
Diffstat (limited to 'pkgs/development/python-modules/python-myq/default.nix')
-rw-r--r-- | pkgs/development/python-modules/python-myq/default.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-myq/default.nix b/pkgs/development/python-modules/python-myq/default.nix new file mode 100644 index 00000000000..88248abde3a --- /dev/null +++ b/pkgs/development/python-modules/python-myq/default.nix @@ -0,0 +1,54 @@ +{ lib +, aiohttp +, beautifulsoup4 +, buildPythonPackage +, fetchFromGitHub +, pkce +, poetry-core +, pythonOlder +}: + +buildPythonPackage rec { + pname = "python-myq"; + version = "3.1.13"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "Python-MyQ"; + repo = "Python-MyQ"; + rev = "refs/tags/v${version}"; + hash = "sha256-kW03swRXZdkh45I/up/FIxv0WGBRqTlDt1X71Ow/hrg="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "poetry-core==1.6.1" "poetry-core" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + beautifulsoup4 + pkce + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ + "pymyq" + ]; + + meta = with lib; { + description = "Python wrapper for MyQ API"; + homepage = "https://github.com/Python-MyQ/Python-MyQ"; + changelog = "https://github.com/Python-MyQ/Python-MyQ/releases/tag/v${version}"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |