2020-07-25 17:31:44 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-03-24 16:49:07 +01:00
|
|
|
, fetchFromGitHub
|
2020-07-25 17:31:44 +02:00
|
|
|
, typing-inspect
|
|
|
|
, marshmallow-enum
|
2021-03-24 16:49:07 +01:00
|
|
|
, hypothesis
|
|
|
|
, mypy
|
|
|
|
, pytestCheckHook
|
2020-07-25 17:31:44 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dataclasses-json";
|
2021-08-26 20:38:19 +02:00
|
|
|
version = "0.5.5";
|
2020-07-25 17:31:44 +02:00
|
|
|
|
2021-03-24 16:49:07 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lidatong";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-08-26 20:38:19 +02:00
|
|
|
sha256 = "sha256-b8oWl8AteVuGYb4E+M9aDS2ERgnKN8wS17Y/Bs7ajcI=";
|
2020-07-25 17:31:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
typing-inspect
|
|
|
|
marshmallow-enum
|
|
|
|
];
|
|
|
|
|
2021-03-24 16:49:07 +01:00
|
|
|
checkInputs = [
|
|
|
|
hypothesis
|
|
|
|
mypy
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: Type annotations check failed
|
|
|
|
"test_type_hints"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "dataclasses_json" ];
|
|
|
|
|
2020-07-25 17:31:44 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|