2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-12-26 17:43:05 +00:00
|
|
|
, fetchFromGitHub
|
2022-08-12 12:06:08 +00:00
|
|
|
, pythonOlder
|
2021-12-26 17:43:05 +00:00
|
|
|
, pytestCheckHook
|
2020-06-15 15:56:04 +00:00
|
|
|
, pytest-asyncio
|
2020-04-24 23:36:52 +00:00
|
|
|
, pretend
|
|
|
|
, freezegun
|
|
|
|
, simplejson
|
2022-08-12 12:06:08 +00:00
|
|
|
, typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
, pythonAtLeast
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "structlog";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "22.1.0";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "flit";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hynek";
|
|
|
|
repo = "structlog";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
sha256 = "sha256-2sdH6iP+l+6pBNC+sjpAX8bCdCANqqkaqZRmR68uwxY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
|
|
|
|
typing-extensions
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"structlog"
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
freezegun
|
|
|
|
pretend
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
simplejson
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--asyncio-mode=legacy"
|
|
|
|
];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Painless structural logging";
|
2021-12-26 17:43:05 +00:00
|
|
|
homepage = "https://github.com/hynek/structlog";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|