nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 65 lines 1.7 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 marshmallow, 7 pytestCheckHook, 8 setuptools, 9 typeguard, 10 typing-inspect, 11}: 12 13buildPythonPackage (finalAttrs: { 14 pname = "marshmallow-dataclass"; 15 version = "8.7.1"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "lovasoa"; 20 repo = "marshmallow_dataclass"; 21 tag = "v${finalAttrs.version}"; 22 hash = "sha256-0OXP78oyNe/UcI05NHskPyXAuX3dwAW4Uz4dI4b8KV0="; 23 }; 24 25 patches = [ 26 # Fix test_set_only_work_in_hashable_types on Python 3.14, https://github.com/lovasoa/marshmallow_dataclass/pull/286 27 (fetchpatch { 28 name = "fix-test.patch"; 29 url = "https://github.com/lovasoa/marshmallow_dataclass/commit/9a2ea19924a3cd5fadeb41663bfca64b9c0f75e4.patch"; 30 hash = "sha256-T2UbZdCj4+HRglMp8w3kU20sUcN6WoSyKiLNr1kSius="; 31 }) 32 ]; 33 34 build-system = [ setuptools ]; 35 36 dependencies = [ 37 marshmallow 38 typing-inspect 39 ]; 40 41 nativeCheckInputs = [ 42 pytestCheckHook 43 typeguard 44 ]; 45 46 pytestFlags = [ 47 # DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. 48 "-Wignore::DeprecationWarning" 49 ]; 50 51 disabledTests = [ 52 # TypeError: UserId is not a dataclass and cannot be turned into one. 53 "test_newtype" 54 ]; 55 56 pythonImportsCheck = [ "marshmallow_dataclass" ]; 57 58 meta = { 59 description = "Automatic generation of marshmallow schemas from dataclasses"; 60 homepage = "https://github.com/lovasoa/marshmallow_dataclass"; 61 changelog = "https://github.com/lovasoa/marshmallow_dataclass/blob/v${finalAttrs.version}/CHANGELOG.md"; 62 license = lib.licenses.mit; 63 maintainers = with lib.maintainers; [ fab ]; 64 }; 65})