depot/third_party/nixpkgs/pkgs/development/python-modules/pyweatherflowrest/default.nix
Default email 646c172193 Project import generated by Copybara.
GitOrigin-RevId: c478eaf416411a7dedf773185b6d5bfc966a80ae
2021-12-21 10:18:32 +08:00

44 lines
918 B
Nix

{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
}:
buildPythonPackage rec {
pname = "pyweatherflowrest";
version = "0.1.21";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "briis";
repo = pname;
rev = "v${version}";
sha256 = "sha256-lW7mhjCYrPBsHL0plHZo6L3OwZFHAzBK2TtNVre5Lt8=";
};
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 ];
};
}