1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, h3 5, numba 6, numpy 7, poetry-core 8, pytestCheckHook 9, pythonOlder 10}: 11 12buildPythonPackage rec { 13 pname = "timezonefinder"; 14 version = "6.0.2"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.8"; 18 19 src = fetchFromGitHub { 20 owner = "jannikmi"; 21 repo = pname; 22 rev = version; 23 hash = "sha256-jquaA/+alSRUaa2wXQ6YoDR4EY9OlZCAdcxS5TR0CAU="; 24 }; 25 26 nativeBuildInputs = [ 27 poetry-core 28 ]; 29 30 propagatedBuildInputs = [ 31 h3 32 numpy 33 ]; 34 35 checkInputs = [ 36 numba 37 pytestCheckHook 38 ]; 39 40 postPatch = '' 41 substituteInPlace pyproject.toml \ 42 --replace 'numpy = "^1.22"' 'numpy = "*"' 43 ''; 44 45 pythonImportsCheck = [ 46 "timezonefinder" 47 ]; 48 49 preCheck = '' 50 # Some tests need the CLI on the PATH 51 export PATH=$out/bin:$PATH 52 ''; 53 54 meta = with lib; { 55 description = "Module for finding the timezone of any point on earth (coordinates) offline"; 56 homepage = "https://github.com/MrMinimal64/timezonefinder"; 57 license = licenses.mit; 58 maintainers = with maintainers; [ fab ]; 59 }; 60}