anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / dataclasses-json / default.nix
blobbb8a949bc8ae2e2915dd5541894cd6680cc33f31
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   hypothesis,
6   marshmallow,
7   poetry-core,
8   poetry-dynamic-versioning,
9   pytestCheckHook,
10   pythonOlder,
11   typing-inspect,
14 buildPythonPackage rec {
15   pname = "dataclasses-json";
16   version = "0.6.7";
17   pyproject = true;
19   disabled = pythonOlder "3.7";
21   src = fetchFromGitHub {
22     owner = "lidatong";
23     repo = "dataclasses-json";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-AH/T6pa/CHtQNox67fqqs/BBnUcmThvbnSHug2p33qM=";
26   };
28   postPatch = ''
29     substituteInPlace pyproject.toml \
30       --replace-fail 'version = "0.0.0"' 'version = "${version}"'
31   '';
33   build-system = [
34     poetry-core
35     poetry-dynamic-versioning
36   ];
38   dependencies = [
39     typing-inspect
40     marshmallow
41   ];
43   nativeCheckInputs = [
44     hypothesis
45     pytestCheckHook
46   ];
48   disabledTestPaths = [
49     # fails with the following error and avoid dependency on mypy
50     # mypy_main(None, text_io, text_io, [__file__], clean_exit=True)
51     # TypeError: main() takes at most 4 arguments (5 given)
52     "tests/test_annotations.py"
53   ];
55   pythonImportsCheck = [ "dataclasses_json" ];
57   meta = with lib; {
58     description = "Simple API for encoding and decoding dataclasses to and from JSON";
59     homepage = "https://github.com/lidatong/dataclasses-json";
60     changelog = "https://github.com/lidatong/dataclasses-json/releases/tag/v${version}";
61     license = licenses.mit;
62     maintainers = with maintainers; [ albakham ];
63   };