Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.2 kB · 100 lines
Nix
at litex
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101{ lib, attrs, buildPythonPackage, fetchFromGitHub, exceptiongroup, hypothesis, immutables, motor, msgpack, orjson, poetry-core, pytest-xdist, pytestCheckHook, pythonOlder, pyyaml, tomlkit, typing-extensions, ujson}:
buildPythonPackage rec { pname = "cattrs"; version = "22.2.0"; format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub { owner = "python-attrs"; repo = pname; rev = "v${version}"; hash = "sha256-Qnrq/mIA/t0mur6IAen4vTmMIhILWS6v5nuf+Via2hA="; };
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [ attrs ] ++ lib.optionals (pythonOlder "3.11") [ exceptiongroup ] ++ lib.optionals (pythonOlder "3.7") [ typing-extensions ];
nativeCheckInputs = [ hypothesis immutables motor msgpack orjson pytest-xdist pytestCheckHook pyyaml tomlkit ujson ];
postPatch = '' substituteInPlace pyproject.toml \ --replace "-l --benchmark-sort=fullname --benchmark-warmup=true --benchmark-warmup-iterations=5 --benchmark-group-by=fullname" "" \ --replace 'orjson = "^3.5.2"' "" \ --replace "[tool.poetry.group.dev.dependencies]" "[tool.poetry.dev-dependencies]" substituteInPlace tests/test_preconf.py \ --replace "from orjson import dumps as orjson_dumps" "" \ --replace "from orjson import loads as orjson_loads" "" '';
preCheck = '' export HOME=$(mktemp -d); '';
disabledTestPaths = [ # Don't run benchmarking tests "bench/test_attrs_collections.py" "bench/test_attrs_nested.py" "bench/test_attrs_primitives.py" "bench/test_primitives.py" ];
disabledTests = [ # orjson is not available as it requires Rust nightly features to compile its requirements "test_orjson" # tomlkit is pinned to an older version and newer versions raise InvalidControlChar exception "test_tomlkit" ];
pythonImportsCheck = [ "cattr" ];
meta = with lib; { description = "Python custom class converters for attrs"; homepage = "https://github.com/python-attrs/cattrs"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; };}