diff options
Diffstat (limited to 'pkgs/development/python-modules/pywaze/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pywaze/default.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pywaze/default.nix b/pkgs/development/python-modules/pywaze/default.nix new file mode 100644 index 000000000000..fbaa0e94ea87 --- /dev/null +++ b/pkgs/development/python-modules/pywaze/default.nix @@ -0,0 +1,56 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, hatchling +, httpx +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, respx +}: + +buildPythonPackage rec { + pname = "pywaze"; + version = "0.3.0"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "eifinger"; + repo = "pywaze"; + rev = "refs/tags/v${version}"; + hash = "sha256-z/6eSgERHKV/5vjbRWcyrxAMNDIHvM3GUoo3xf+AhNY="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--cov --cov-report term-missing --cov=src/pywaze " "" + ''; + + nativeBuildInputs = [ + hatchling + ]; + + propagatedBuildInputs = [ + httpx + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + respx + ]; + + pythonImportsCheck = [ + "pywaze" + ]; + + meta = with lib; { + description = "Module for calculating WAZE routes and travel times"; + homepage = "https://github.com/eifinger/pywaze"; + changelog = "https://github.com/eifinger/pywaze/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} |