2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-01-20 10:41:00 +00:00
|
|
|
, cffi
|
2022-07-14 12:49:19 +00:00
|
|
|
, h3
|
2020-04-24 23:36:52 +00:00
|
|
|
, numba
|
|
|
|
, numpy
|
2022-07-14 12:49:19 +00:00
|
|
|
, poetry-core
|
2020-09-25 04:45:31 +00:00
|
|
|
, pytestCheckHook
|
2022-07-14 12:49:19 +00:00
|
|
|
, pythonOlder
|
2023-01-20 10:41:00 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "timezonefinder";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "6.1.9";
|
2022-07-14 12:49:19 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jannikmi";
|
|
|
|
repo = pname;
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-A5s1npvgJGp6SvIqoXGRmFN3iE0pqMUl1ZTi07ix5b0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
nativeBuildInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
cffi
|
2022-07-14 12:49:19 +00:00
|
|
|
poetry-core
|
2023-01-20 10:41:00 +00:00
|
|
|
setuptools
|
2022-07-14 12:49:19 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
cffi
|
2022-07-14 12:49:19 +00:00
|
|
|
h3
|
2020-04-24 23:36:52 +00:00
|
|
|
numpy
|
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
checkInputs = [
|
|
|
|
numba
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'numpy = "^1.22"' 'numpy = "*"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"timezonefinder"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# Some tests need the CLI on the PATH
|
|
|
|
export PATH=$out/bin:$PATH
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/jannikmi/timezonefinder/blob/${version}/CHANGELOG.rst";
|
2022-07-14 12:49:19 +00:00
|
|
|
description = "Module for finding the timezone of any point on earth (coordinates) offline";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/MrMinimal64/timezonefinder";
|
|
|
|
license = licenses.mit;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|