nixpkgs/pkgs/development/python-modules/structlog/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.0 KiB
Nix
Raw Normal View History

2017-12-30 12:25:04 +00:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
2020-06-20 17:28:34 +01:00
, pytest-asyncio
2017-12-30 12:25:04 +00:00
, pretend
, freezegun
, hatch-fancy-pypi-readme
, hatch-vcs
, hatchling
2017-12-30 12:25:04 +00:00
, simplejson
, typing-extensions
, pythonAtLeast
2017-12-30 12:25:04 +00:00
}:
buildPythonPackage rec {
pname = "structlog";
version = "22.3.0";
format = "pyproject";
2017-12-30 12:25:04 +00:00
src = fetchFromGitHub {
owner = "hynek";
repo = "structlog";
rev = "refs/tags/${version}";
sha256 = "sha256-+r+M+uTXdNBWQf0TGQuZgsCXg2CBKwH8ZE2+uAe0Dzg=";
2017-12-30 12:25:04 +00:00
};
nativeBuildInputs = [
hatch-fancy-pypi-readme
hatch-vcs
hatchling
];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
typing-extensions
];
2017-12-30 12:25:04 +00:00
pythonImportsCheck = [
"structlog"
];
checkInputs = [
freezegun
pretend
pytest-asyncio
pytestCheckHook
simplejson
];
meta = with lib; {
2017-12-30 12:25:04 +00:00
description = "Painless structural logging";
homepage = "https://github.com/hynek/structlog";
license = licenses.asl20;
maintainers = with maintainers; [ ];
2017-12-30 12:25:04 +00:00
};
}