Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

66 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
hypothesis,
marshmallow,
poetry-core,
poetry-dynamic-versioning,
pytestCheckHook,
pythonOlder,
typing-inspect,
}:
buildPythonPackage rec {
pname = "dataclasses-json";
version = "0.6.7";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "lidatong";
repo = "dataclasses-json";
tag = "v${version}";
hash = "sha256-AH/T6pa/CHtQNox67fqqs/BBnUcmThvbnSHug2p33qM=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'documentation =' 'Documentation =' \
--replace-fail 'version = "0.0.0"' 'version = "${version}"'
'';
build-system = [
poetry-core
poetry-dynamic-versioning
];
dependencies = [
typing-inspect
marshmallow
];
nativeCheckInputs = [
hypothesis
pytestCheckHook
];
disabledTestPaths = [
# fails with the following error and avoid dependency on mypy
# mypy_main(None, text_io, text_io, [__file__], clean_exit=True)
# TypeError: main() takes at most 4 arguments (5 given)
"tests/test_annotations.py"
];
pythonImportsCheck = [ "dataclasses_json" ];
meta = with lib; {
description = "Simple API for encoding and decoding dataclasses to and from JSON";
homepage = "https://github.com/lidatong/dataclasses-json";
changelog = "https://github.com/lidatong/dataclasses-json/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ albakham ];
};
}