about summary refs log tree commit diff
path: root/pkgs/development/python-modules/marshmallow-enum/default.nix
blob: d375901a0f3fde95beb76c2266fd839b2df091d0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ lib
, buildPythonPackage
, fetchFromGitHub
, marshmallow
, pytestCheckHook
, isPy27
, enum34
}:

buildPythonPackage rec {
  pname = "marshmallow-enum";
  version = "1.5.1";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "justanr";
    repo = "marshmallow_enum";
    rev = "v${version}";
    sha256 = "1ihrcmyfjabivg6hc44i59hnw5ijlg1byv3zs1rqxfynp8xr7398";
  };

  postPatch = ''
    sed -i '/addopts/d' tox.ini
  '';

  propagatedBuildInputs = [
    marshmallow
  ] ++ lib.optionals isPy27 [ enum34 ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  disabledTests = [
    "test_custom_error_in_deserialize_by_name"
    "test_custom_error_in_deserialize_by_value"
  ];

  meta = with lib; {
    description = "Enum field for Marshmallow";
    homepage = "https://github.com/justanr/marshmallow_enum";
    license = licenses.mit;
    maintainers = [ ];
  };
}