2020-08-20 17:08:02 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-06-28 23:13:55 +00:00
|
|
|
, fetchFromGitHub
|
2020-08-20 17:08:02 +00:00
|
|
|
, typing-inspect
|
|
|
|
, marshmallow-enum
|
2021-06-28 23:13:55 +00:00
|
|
|
, hypothesis
|
|
|
|
, pytestCheckHook
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dataclasses-json";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.5.9";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lidatong";
|
|
|
|
repo = pname;
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-2/J+d7SQvUs7nXw1n+qwy0DQCplK28eUrbP7+yQPB7g=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
typing-inspect
|
|
|
|
marshmallow-enum
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
hypothesis
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# fails with the following error and avoid dependency on mypy
|
2022-10-06 18:32:54 +00:00
|
|
|
# mypy_main(None, text_io, text_io, [__file__], clean_exit=True)
|
|
|
|
# TypeError: main() takes at most 4 arguments (5 given)
|
2023-07-15 17:15:38 +00:00
|
|
|
"tests/test_annotations.py"
|
2022-10-06 18:32:54 +00:00
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
pythonImportsCheck = [ "dataclasses_json" ];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple API for encoding and decoding dataclasses to and from JSON";
|
|
|
|
homepage = "https://github.com/lidatong/dataclasses-json";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ albakham ];
|
|
|
|
};
|
|
|
|
}
|