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
|
|
|
|
, mypy
|
|
|
|
, pytestCheckHook
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dataclasses-json";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.5.6";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lidatong";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "09253p0zjqfaqap7jgfgjl1jswwnz7mb6x7dqix09id92mnb89mf";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
typing-inspect
|
|
|
|
marshmallow-enum
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
checkInputs = [
|
|
|
|
hypothesis
|
|
|
|
mypy
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: Type annotations check failed
|
|
|
|
"test_type_hints"
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|