1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cffi, 6 flatbuffers, 7 h3, 8 numba, 9 numpy, 10 poetry-core, 11 pytestCheckHook, 12 setuptools, 13}: 14 15buildPythonPackage rec { 16 pname = "timezonefinder"; 17 version = "8.0.0"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "jannikmi"; 22 repo = "timezonefinder"; 23 tag = version; 24 hash = "sha256-AvuNsIpJBZymlJe4HLPEmHfxN1jhqPmrEgRPb3W+B3E="; 25 }; 26 27 build-system = [ 28 poetry-core 29 setuptools 30 ]; 31 32 nativeBuildInputs = [ cffi ]; 33 34 dependencies = [ 35 cffi 36 flatbuffers 37 h3 38 numpy 39 ]; 40 41 nativeCheckInputs = [ 42 numba 43 pytestCheckHook 44 ]; 45 46 pythonImportsCheck = [ "timezonefinder" ]; 47 48 preCheck = '' 49 # Some tests need the CLI on the PATH 50 export PATH=$out/bin:$PATH 51 ''; 52 53 disabledTestPaths = [ 54 # Don't test the archive content 55 "tests/test_package_contents.py" 56 "tests/test_integration.py" 57 # Don't test the example 58 "tests/test_example_scripts.py" 59 # Tests require clang extension 60 "tests/utils_test.py" 61 ]; 62 63 meta = with lib; { 64 description = "Module for finding the timezone of any point on earth (coordinates) offline"; 65 homepage = "https://github.com/MrMinimal64/timezonefinder"; 66 changelog = "https://github.com/jannikmi/timezonefinder/blob/${src.tag}/CHANGELOG.rst"; 67 license = licenses.mit; 68 maintainers = with maintainers; [ fab ]; 69 mainProgram = "timezonefinder"; 70 }; 71}