1{ lib 2, arrow 3, buildPythonPackage 4, fetchFromGitHub 5, fetchpatch 6, pythonOlder 7, pytestCheckHook 8}: 9 10buildPythonPackage rec { 11 pname = "python-datemath"; 12 version = "1.5.5"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.8"; 16 17 src = fetchFromGitHub { 18 owner = "nickmaccarthy"; 19 repo = pname; 20 rev = "v${version}"; 21 sha256 = "sha256-WVWGhyBguE1+KEMQu0N5QxO7IC4rPEJ/2L3VWUCQNi4="; 22 }; 23 24 patches = [ 25 (fetchpatch { 26 name = "remove-unittest2.patch"; 27 url = "https://github.com/nickmaccarthy/python-datemath/commit/781daa0241ed327d5f211f3b62f553f3ee3d86e0.patch"; 28 hash = "sha256-WD6fuDaSSNXgYWoaUexiWnofCzEZzercEUlqTvOUT5I="; 29 }) 30 ]; 31 32 propagatedBuildInputs = [ 33 arrow 34 ]; 35 36 checkInputs = [ 37 pytestCheckHook 38 ]; 39 40 pytestFlagsArray = [ 41 "tests.py" 42 ]; 43 44 pythonImportsCheck = [ 45 "datemath" 46 ]; 47 48 meta = with lib; { 49 description = "Python module to emulate the date math used in SOLR and Elasticsearch"; 50 homepage = "https://github.com/nickmaccarthy/python-datemath"; 51 license = with licenses; [ asl20 ]; 52 maintainers = with maintainers; [ fab ]; 53 }; 54}