diff --git a/pkgs/development/python-modules/gios/default.nix b/pkgs/development/python-modules/gios/default.nix new file mode 100644 index 000000000000..71aae7b66ad9 --- /dev/null +++ b/pkgs/development/python-modules/gios/default.nix @@ -0,0 +1,55 @@ +{ lib +, aiohttp +, aioresponses +, buildPythonPackage +, fetchFromGitHub +, pytest-asyncio +, pytest-error-for-skips +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "gios"; + version = "1.0.1"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "bieniu"; + repo = pname; + rev = version; + sha256 = "031z5j1j961pcw8s4ajj5z2xn2jxb2hyfn3x3bxbaagwl9a5qkvn"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + aioresponses + pytest-asyncio + pytest-error-for-skips + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "--cov --cov-report term-missing " "" + substituteInPlace setup.py \ + --replace "pytest-runner" "" + ''; + + disabledTests = [ + # Test requires network access + "test_invalid_station_id" + ]; + + pythonImportsCheck = [ "gios" ]; + + meta = with lib; { + description = "Python client for getting air quality data from GIOS"; + homepage = "https://github.com/bieniu/gios"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c59c142713ae..bda7bf671851 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2786,6 +2786,8 @@ in { gin-config = callPackage ../development/python-modules/gin-config { }; + gios = callPackage ../development/python-modules/gios { }; + gipc = callPackage ../development/python-modules/gipc { }; git-annex-adapter =