1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytest
5, python-rapidjson
6, pretend
7, freezegun
8, twisted
9, simplejson
10, six
11, pythonAtLeast
12}:
13
14buildPythonPackage rec {
15 pname = "structlog";
16 version = "19.2.0";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "4287058cf4ce1a59bc5dea290d6386d37f29a37529c9a51cdf7387e51710152b";
21 };
22
23 checkInputs = [ pytest pretend freezegun simplejson twisted ]
24 ++ lib.optionals (pythonAtLeast "3.6") [ python-rapidjson ];
25 propagatedBuildInputs = [ six ];
26
27 checkPhase = ''
28 # rm tests/test_twisted.py*
29 py.test
30 '';
31
32 meta = {
33 description = "Painless structural logging";
34 homepage = http://www.structlog.org/;
35 license = lib.licenses.asl20;
36 };
37}