1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 numpy,
6 pytestCheckHook,
7 pythonOlder,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "haversine";
13 version = "2.9.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "mapado";
20 repo = "haversine";
21 tag = "v${version}";
22 hash = "sha256-KqcDDQdAOnrmiq+kf8rLHy85rNnhatZTOzCCU91lOrU=";
23 };
24
25 nativeBuildInputs = [ setuptools ];
26
27 nativeCheckInputs = [
28 numpy
29 pytestCheckHook
30 ];
31
32 pythonImportsCheck = [ "haversine" ];
33
34 meta = with lib; {
35 description = "Python module the distance between 2 points on earth";
36 homepage = "https://github.com/mapado/haversine";
37 changelog = "https://github.com/mapado/haversine/blob/v${version}/CHANGELOG.md";
38 license = with licenses; [ mit ];
39 maintainers = with maintainers; [ fab ];
40 };
41}