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