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