nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at flake-libs 67 lines 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytest-mock, 6 pytestCheckHook, 7 python-dotenv, 8 pythonAtLeast, 9 pythonOlder, 10 pytimeparse, 11 pyyaml, 12 setuptools, 13 typing-extensions, 14 tomli-w, 15}: 16 17buildPythonPackage rec { 18 pname = "dataclass-wizard"; 19 version = "0.35.0"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "rnag"; 24 repo = "dataclass-wizard"; 25 tag = "v${version}"; 26 hash = "sha256-Ed9/y2blOGYfNcmCCAe4TPWssKWUS0gxvRXKMf+cJh0="; 27 }; 28 29 build-system = [ setuptools ]; 30 31 dependencies = [ typing-extensions ]; 32 33 optional-dependencies = { 34 dotenv = [ python-dotenv ]; 35 timedelta = [ pytimeparse ]; 36 toml = [ tomli-w ]; 37 yaml = [ pyyaml ]; 38 }; 39 40 nativeCheckInputs = [ 41 pytestCheckHook 42 pytest-mock 43 ] ++ lib.flatten (builtins.attrValues optional-dependencies); 44 45 disabledTests = 46 [ ] 47 ++ lib.optionals (pythonAtLeast "3.11") [ 48 # Any/None internal changes, tests need adjusting upstream 49 "without_type_hinting" 50 "default_dict" 51 "test_frozenset" 52 "test_set" 53 "date_times_with_custom_pattern" 54 "from_dict_handles_identical_cased_json_keys" 55 ]; 56 57 pythonImportsCheck = [ "dataclass_wizard" ]; 58 59 meta = with lib; { 60 description = "Wizarding tools for interacting with the Python dataclasses module"; 61 homepage = "https://github.com/rnag/dataclass-wizard"; 62 changelog = "https://github.com/rnag/dataclass-wizard/releases/tag/${src.tag}"; 63 license = licenses.asl20; 64 maintainers = with maintainers; [ codifryed ]; 65 mainProgram = "wiz"; 66 }; 67}