1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 marshmallow, 6 pytestCheckHook, 7 pythonAtLeast, 8 pythonOlder, 9 typeguard, 10 typing-inspect, 11}: 12 13buildPythonPackage rec { 14 pname = "marshmallow-dataclass"; 15 version = "8.6.1"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "lovasoa"; 22 repo = "marshmallow_dataclass"; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-IHHYYtQrdSAtZxbd/YV9J+c4B23HLr9gr01OE6Tgj94="; 25 }; 26 27 propagatedBuildInputs = [ 28 marshmallow 29 typing-inspect 30 ]; 31 32 nativeCheckInputs = [ 33 pytestCheckHook 34 typeguard 35 ]; 36 37 pytestFlagsArray = [ 38 # DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. 39 "-W" 40 "ignore::DeprecationWarning" 41 ]; 42 43 disabledTests = lib.optionals (pythonAtLeast "3.10") [ 44 # TypeError: UserId is not a dataclass and cannot be turned into one. 45 "test_newtype" 46 ]; 47 48 pythonImportsCheck = [ "marshmallow_dataclass" ]; 49 50 meta = with lib; { 51 description = "Automatic generation of marshmallow schemas from dataclasses"; 52 homepage = "https://github.com/lovasoa/marshmallow_dataclass"; 53 changelog = "https://github.com/lovasoa/marshmallow_dataclass/blob/v${version}/CHANGELOG.md"; 54 license = with licenses; [ mit ]; 55 maintainers = with maintainers; [ fab ]; 56 }; 57}