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