43 lines
830 B
Nix
Raw Normal View History

2021-02-25 10:05:10 +01:00
{ lib
, buildPythonPackage
2021-02-25 10:14:23 +01:00
, fetchFromGitHub
2021-02-25 10:05:10 +01:00
, geojson
, pysocks
2021-02-25 10:14:23 +01:00
, pythonOlder
, requests
, pytestCheckHook
2021-02-25 10:05:10 +01:00
}:
2018-05-07 12:35:40 +02:00
buildPythonPackage rec {
pname = "pyowm";
2021-02-25 10:05:10 +01:00
version = "3.2.0";
disabled = pythonOlder "3.7";
2021-02-25 10:14:23 +01:00
src = fetchFromGitHub {
owner = "csparpa";
repo = pname;
rev = version;
sha256 = "0sq8rxcgdiayl5gy4qhkvvsdq1d93sbzn0nfg8f1vr8qxh8qkfq4";
2018-05-07 12:35:40 +02:00
};
2021-02-25 10:05:10 +01:00
propagatedBuildInputs = [
geojson
pysocks
requests
];
2018-05-07 12:35:40 +02:00
2021-02-25 10:14:23 +01:00
checkInputs = [ pytestCheckHook ];
# Run only tests which don't require network access
pytestFlagsArray = [ "tests/unit" ];
2018-06-22 11:48:21 +02:00
2021-02-25 10:14:23 +01:00
pythonImportsCheck = [ "pyowm" ];
2018-06-22 11:48:21 +02:00
2018-05-07 12:35:40 +02:00
meta = with lib; {
2021-02-25 10:05:10 +01:00
description = "Python wrapper around the OpenWeatherMap web API";
homepage = "https://pyowm.readthedocs.io/";
2018-05-07 12:35:40 +02:00
license = licenses.mit;
2021-02-25 10:14:23 +01:00
maintainers = with maintainers; [ fab ];
2018-05-07 12:35:40 +02:00
};
}