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