diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyweatherflowrest/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pyweatherflowrest/default.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyweatherflowrest/default.nix b/nixpkgs/pkgs/development/python-modules/pyweatherflowrest/default.nix new file mode 100644 index 000000000000..32a5c5d8abc3 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pyweatherflowrest/default.nix @@ -0,0 +1,44 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pyweatherflowrest"; + version = "1.0.7"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "briis"; + repo = pname; + rev = "v${version}"; + sha256 = "17zas565jqvp0qrs8l589rm4f9xpyynhqk8lrqcx089w3rv0hh2p"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--cov=pyweatherflowrest --cov-append" "" + ''; + + # Module has no tests. test.py is a demo script + doCheck = false; + + pythonImportsCheck = [ + "pyweatherflowrest" + ]; + + meta = with lib; { + description = "Python module to get data from WeatherFlow Weather Stations"; + homepage = "https://github.com/briis/pyweatherflowrest"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |