2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, numpy
|
|
|
|
, pytestCheckHook
|
2022-10-21 18:38:19 +00:00
|
|
|
, pythonOlder
|
2024-01-25 14:12:00 +00:00
|
|
|
, setuptools
|
2021-02-05 17:12:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "haversine";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "2.8.1";
|
|
|
|
pyproject = true;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mapado";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "haversine";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-MKOg2awpamupvuXstiH7VoIY4ax+hy2h2cFXDFKJ2mA=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
numpy
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"haversine"
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module the distance between 2 points on earth";
|
|
|
|
homepage = "https://github.com/mapado/haversine";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/mapado/haversine/blob/v${version}/CHANGELOG.md";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|