2021-07-24 12:14:16 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
2022-01-19 23:45:15 +00:00
|
|
|
, pythonAtLeast
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dacite";
|
|
|
|
version = "1.6.0";
|
2022-01-19 23:45:15 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "konradhalas";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0nv2bnj3bq2v08ac4p583cnpjq2d6bv5isycgji5i5wg1y082a3d";
|
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.10") [
|
|
|
|
# https://github.com/konradhalas/dacite/issues/167
|
|
|
|
"test_from_dict_with_union_and_wrong_data"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"dacite"
|
|
|
|
];
|
2021-07-24 12:14:16 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python helper to create data classes from dictionaries";
|
|
|
|
homepage = "https://github.com/konradhalas/dacite";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|