13 buildPythonPackage rec {
14 pname = "dataclasses-serialization";
17 # upstream requires >= 3.6 but only 3.7 includes dataclasses
18 disabled = pythonOlder "3.7";
20 format = "setuptools";
22 src = fetchFromGitHub {
24 repo = "python-dataclasses-serialization";
26 hash = "sha256-jLMR2D01KgzHHRP0zduMBJt8xgBmIquWLCjZYLo2/AA=";
30 mv pypi_upload/setup.py .
31 substituteInPlace setup.py \
32 --replace "project_root = Path(__file__).parents[1]" "project_root = Path(__file__).parents[0]"
34 # dataclasses is included in Python 3.7
35 substituteInPlace requirements.txt \
36 --replace dataclasses ""
38 # https://github.com/madman-bob/python-dataclasses-serialization/issues/16
39 sed -i '/(\(Dict\|List\)/d' tests/test_json.py tests/test_bson.py
42 propagatedBuildInputs = [
54 pythonImportsCheck = [
55 "dataclasses_serialization.bson"
56 "dataclasses_serialization.json"
57 "dataclasses_serialization.serializer_base"
61 description = "Serialize/deserialize Python dataclasses to various other data formats";
62 homepage = "https://github.com/madman-bob/python-dataclasses-serialization";
63 license = lib.licenses.mit;
64 maintainers = with lib.maintainers; [ dotlambda ];