about summary refs log tree commit diff
path: root/pkgs/development/python-modules/backports-zoneinfo
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2021-05-08 14:19:20 -0700
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-05-08 15:05:21 -0700
commitae33267babb36b68dd839989c913d4c7e4250af8 (patch)
treeb4fdc5b7c1bc0576f8d915de0304387381c0dbbf /pkgs/development/python-modules/backports-zoneinfo
parentace0555d7223143e5c63428ea795c158bd309685 (diff)
python3Packages.backports-zoneinfo: init at 0.2.1
Diffstat (limited to 'pkgs/development/python-modules/backports-zoneinfo')
-rw-r--r--pkgs/development/python-modules/backports-zoneinfo/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/backports-zoneinfo/default.nix b/pkgs/development/python-modules/backports-zoneinfo/default.nix
new file mode 100644
index 0000000000000..a9bc0b55955ba
--- /dev/null
+++ b/pkgs/development/python-modules/backports-zoneinfo/default.nix
@@ -0,0 +1,39 @@
+{ lib, buildPythonPackage, fetchFromGitHub
+, pythonOlder
+, importlib-resources
+, hypothesis
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "backports-zoneinfo";
+  version = "0.2.1";
+
+  src = fetchFromGitHub {
+    owner = "pganssle";
+    repo = "zoneinfo";
+    rev = version;
+    sha256 = "sha256-00xdDOVdDanfsjQTd3yjMN2RFGel4cWRrAA3CvSnl24=";
+  };
+
+  propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [
+    importlib-resources
+  ];
+
+  pythonImportsCheck = [ "backports.zoneinfo" ];
+
+  checkInputs = [
+    hypothesis
+    pytestCheckHook
+  ];
+
+  # unfortunately /etc/zoneinfo doesn't exist in sandbox, and many tests fail
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Backport of the standard library module zoneinfo";
+    homepage = "https://github.com/pganssle/zoneinfo";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ jonringer ];
+  };
+}