about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/python-datemath
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/python-datemath')
-rw-r--r--nixpkgs/pkgs/development/python-modules/python-datemath/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/python-datemath/default.nix b/nixpkgs/pkgs/development/python-modules/python-datemath/default.nix
new file mode 100644
index 000000000000..4b0366ae4da5
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/python-datemath/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, arrow
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, pytestCheckHook
+, unittest2
+}:
+
+buildPythonPackage rec {
+  pname = "python-datemath";
+  version = "1.5.5";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromGitHub {
+    owner = "nickmaccarthy";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-WVWGhyBguE1+KEMQu0N5QxO7IC4rPEJ/2L3VWUCQNi4=";
+  };
+
+  propagatedBuildInputs = [
+    arrow
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    unittest2
+  ];
+
+  pytestFlagsArray = [
+    "tests.py"
+  ];
+
+  pythonImportsCheck = [
+    "datemath"
+  ];
+
+  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 ];
+  };
+}