about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorGuy Boldon <gb@guyboldon.com>2023-08-08 20:17:05 +0200
committerGuy Boldon <gb@guyboldon.com>2023-08-11 19:03:51 +0200
commita8d80cd4087629ce5af169f20ca1720933d94522 (patch)
treedb157b8ae0120ed9d07dc18b5721e2935d2de2f1 /pkgs/development
parentb4ddc3e3db7688bfc36ad98e4d87dfcabf399b00 (diff)
dataclass-wizard: init at 0.22.2
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/dataclass-wizard/default.nix65
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/dataclass-wizard/default.nix b/pkgs/development/python-modules/dataclass-wizard/default.nix
new file mode 100644
index 0000000000000..603fd25e9b2a1
--- /dev/null
+++ b/pkgs/development/python-modules/dataclass-wizard/default.nix
@@ -0,0 +1,65 @@
+{ lib
+, fetchFromGitHub
+, buildPythonPackage
+, pythonOlder
+, pythonAtLeast
+, pytimeparse
+, pyyaml
+, pytestCheckHook
+, pytest-mock
+, typing-extensions
+}:
+
+buildPythonPackage rec {
+  pname = "dataclass-wizard";
+  version = "0.22.2";
+  format = "setuptools";
+
+  src = fetchFromGitHub {
+    owner = "rnag";
+    repo = "dataclass-wizard";
+    rev = "v${version}";
+    hash = "sha256-Ufi4lZc+UkM6NZr4bS2OibpOmMjyiBEoVKxmrqauW50=";
+  };
+
+  propagatedBuildInputs = [
+  ] ++ lib.optionals (pythonOlder "3.9") [
+    typing-extensions
+  ];
+
+  passthru.optional-dependencies = {
+    timedelta = [
+      pytimeparse
+    ];
+    yaml = [
+      pyyaml
+    ];
+  };
+
+  nativeCheckInputs = [
+    pytestCheckHook
+    pytest-mock
+  ] ++ passthru.optional-dependencies.timedelta
+  ++ passthru.optional-dependencies.yaml;
+
+  disabledTests = [
+  ] ++ lib.optionals (pythonAtLeast "3.11") [
+    # Any/None internal changes, tests need adjusting upstream
+    "without_type_hinting"
+    "default_dict"
+    "test_frozenset"
+    "test_set"
+    "date_times_with_custom_pattern"
+    "from_dict_handles_identical_cased_json_keys"
+  ];
+
+  pythonImportsCheck = [ "dataclass_wizard" ];
+
+  meta = with lib; {
+    description = "A set of simple, yet elegant wizarding tools for interacting with the Python dataclasses module";
+    homepage = "https://github.com/rnag/dataclass-wizard";
+    changelog = "https://github.com/rnag/dataclass-wizard/releases/tag/v${version}";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ codifryed ];
+  };
+}