Files
nixpkgs/pkgs/development/python-modules/marshmallow-dataclass/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

62 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
marshmallow,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
setuptools,
typeguard,
typing-extensions,
typing-inspect,
}:
buildPythonPackage rec {
pname = "marshmallow-dataclass";
version = "8.7.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "lovasoa";
repo = "marshmallow_dataclass";
tag = "v${version}";
hash = "sha256-0OXP78oyNe/UcI05NHskPyXAuX3dwAW4Uz4dI4b8KV0=";
};
build-system = [ setuptools ];
dependencies = [
marshmallow
typing-inspect
]
++ lib.optionals (pythonOlder "3.10") [ typing-extensions ];
nativeCheckInputs = [
pytestCheckHook
typeguard
];
pytestFlags = [
# DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12.
"-Wignore::DeprecationWarning"
];
disabledTests = lib.optionals (pythonAtLeast "3.10") [
# TypeError: UserId is not a dataclass and cannot be turned into one.
"test_newtype"
];
pythonImportsCheck = [ "marshmallow_dataclass" ];
meta = {
description = "Automatic generation of marshmallow schemas from dataclasses";
homepage = "https://github.com/lovasoa/marshmallow_dataclass";
changelog = "https://github.com/lovasoa/marshmallow_dataclass/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}