1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, marshmallow
5, pytestCheckHook
6, isPy27
7, enum34
8}:
9
10buildPythonPackage rec {
11 pname = "marshmallow-enum";
12 version = "1.5.1";
13
14 src = fetchFromGitHub {
15 owner = "justanr";
16 repo = "marshmallow_enum";
17 rev = "v${version}";
18 sha256 = "1ihrcmyfjabivg6hc44i59hnw5ijlg1byv3zs1rqxfynp8xr7398";
19 };
20
21 postPatch = ''
22 sed -i '/addopts/d' tox.ini
23 '';
24
25 propagatedBuildInputs = [
26 marshmallow
27 ] ++ lib.optionals isPy27 [ enum34 ];
28
29 nativeCheckInputs = [
30 pytestCheckHook
31 ];
32
33 disabledTests = [
34 "test_custom_error_in_deserialize_by_name"
35 "test_custom_error_in_deserialize_by_value"
36 ];
37
38 meta = with lib; {
39 description = "Enum field for Marshmallow";
40 homepage = "https://github.com/justanr/marshmallow_enum";
41 license = licenses.mit;
42 maintainers = [ ];
43 };
44}