mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
51 lines
879 B
Nix
51 lines
879 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, geojson
|
|
, pysocks
|
|
, pythonOlder
|
|
, requests
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyowm";
|
|
version = "3.3.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "csparpa";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-cSOhm3aDksLBChZzgw1gjUjLQkElR2/xGFMOb9K9RME=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
geojson
|
|
pysocks
|
|
requests
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
# Run only tests which don't require network access
|
|
pytestFlagsArray = [
|
|
"tests/unit"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"pyowm"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python wrapper around the OpenWeatherMap web API";
|
|
homepage = "https://pyowm.readthedocs.io/";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|