Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / python-datemath / default.nix
blob3c12e92b9036fe5aebac93d4116fd8fe76bf2afd
1 { lib
2 , arrow
3 , buildPythonPackage
4 , fetchFromGitHub
5 , fetchpatch
6 , pythonOlder
7 , pytestCheckHook
8 }:
10 buildPythonPackage rec {
11   pname = "python-datemath";
12   version = "1.5.5";
13   format = "setuptools";
15   disabled = pythonOlder "3.8";
17   src = fetchFromGitHub {
18     owner = "nickmaccarthy";
19     repo = pname;
20     rev = "v${version}";
21     hash = "sha256-WVWGhyBguE1+KEMQu0N5QxO7IC4rPEJ/2L3VWUCQNi4=";
22   };
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   ];
32   propagatedBuildInputs = [
33     arrow
34   ];
36   nativeCheckInputs = [
37     pytestCheckHook
38   ];
40   pytestFlagsArray = [
41     "tests.py"
42   ];
44   pythonImportsCheck = [
45     "datemath"
46   ];
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   };