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