2024-05-22 16:01:06 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
arrow,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
pythonOlder,
|
|
|
|
pytestCheckHook,
|
2021-12-12 12:30:58 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-datemath";
|
|
|
|
version = "1.5.5";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nickmaccarthy";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-03-03 01:48:06 +01:00
|
|
|
hash = "sha256-WVWGhyBguE1+KEMQu0N5QxO7IC4rPEJ/2L3VWUCQNi4=";
|
2021-12-12 12:30:58 +01:00
|
|
|
};
|
|
|
|
|
2022-11-21 01:22:04 -08:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "remove-unittest2.patch";
|
|
|
|
url = "https://github.com/nickmaccarthy/python-datemath/commit/781daa0241ed327d5f211f3b62f553f3ee3d86e0.patch";
|
|
|
|
hash = "sha256-WD6fuDaSSNXgYWoaUexiWnofCzEZzercEUlqTvOUT5I=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-05-22 16:01:06 +02:00
|
|
|
propagatedBuildInputs = [ arrow ];
|
2021-12-12 12:30:58 +01:00
|
|
|
|
2024-05-22 16:01:06 +02:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-12 12:30:58 +01:00
|
|
|
|
2024-05-22 16:01:06 +02:00
|
|
|
pytestFlagsArray = [ "tests.py" ];
|
2021-12-12 12:30:58 +01:00
|
|
|
|
2024-05-22 16:01:06 +02:00
|
|
|
pythonImportsCheck = [ "datemath" ];
|
2021-12-12 12:30:58 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to emulate the date math used in SOLR and Elasticsearch";
|
|
|
|
homepage = "https://github.com/nickmaccarthy/python-datemath";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|