2017-12-30 13:25:04 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2018-01-08 16:46:40 +01:00
|
|
|
, fetchpatch
|
2017-12-30 13:25:04 +01:00
|
|
|
, pytest
|
2018-10-25 17:43:07 +02:00
|
|
|
, python-rapidjson
|
2017-12-30 13:25:04 +01:00
|
|
|
, pretend
|
|
|
|
, freezegun
|
2018-10-25 17:43:07 +02:00
|
|
|
, twisted
|
2017-12-30 13:25:04 +01:00
|
|
|
, simplejson
|
2018-10-14 19:48:33 +02:00
|
|
|
, six
|
2018-10-25 17:43:07 +02:00
|
|
|
, pythonAtLeast
|
2017-12-30 13:25:04 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "structlog";
|
2018-10-25 17:43:07 +02:00
|
|
|
version = "18.2.0";
|
2017-12-30 13:25:04 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-10-25 17:43:07 +02:00
|
|
|
sha256 = "e361edb3b9aeaa85cd38a1bc9ddbb60cda8a991fc29de9db26832f6300e81eb4";
|
2017-12-30 13:25:04 +01:00
|
|
|
};
|
|
|
|
|
2018-10-25 17:43:07 +02:00
|
|
|
checkInputs = [ pytest pretend freezegun simplejson twisted ]
|
|
|
|
++ lib.optionals (pythonAtLeast "3.6") [ python-rapidjson ];
|
2018-10-14 19:48:33 +02:00
|
|
|
propagatedBuildInputs = [ six ];
|
2017-12-30 13:25:04 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
2018-10-25 17:43:07 +02:00
|
|
|
# rm tests/test_twisted.py*
|
2017-12-30 13:25:04 +01:00
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Painless structural logging";
|
|
|
|
homepage = http://www.structlog.org/;
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
};
|
2018-01-08 16:46:40 +01:00
|
|
|
}
|