2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cffi,
|
|
|
|
h3,
|
|
|
|
numba,
|
|
|
|
numpy,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "timezonefinder";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "6.5.0";
|
2024-02-07 01:22:34 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jannikmi";
|
2024-02-07 01:22:34 +00:00
|
|
|
repo = "timezonefinder";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-V5g1zTdXWeJba71/eUGQbF9XOhMQuzivtGkqGD4OHMY=";
|
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
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-07-14 12:49:19 +00:00
|
|
|
numba
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "timezonefinder" ];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "timezonefinder";
|
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
|
|
|
};
|
|
|
|
}
|