Files
nixpkgs/pkgs/development/python-modules/logbook/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

78 lines
1.4 KiB
Nix

{
lib,
brotli,
buildPythonPackage,
cython,
execnet,
fetchFromGitHub,
jinja2,
pytestCheckHook,
pytest-rerunfailures,
pythonOlder,
pyzmq,
redis,
setuptools,
sqlalchemy,
}:
buildPythonPackage rec {
pname = "logbook";
version = "1.8.2";
format = "setuptools";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "getlogbook";
repo = "logbook";
tag = version;
hash = "sha256-21323iXtjyUAxAEFMsU6t1/nNLEN5G3jHcubNCEYQ3c=";
};
nativeBuildInputs = [
cython
setuptools
];
optional-dependencies = {
execnet = [ execnet ];
sqlalchemy = [ sqlalchemy ];
redis = [ redis ];
zmq = [ pyzmq ];
compression = [ brotli ];
jinja = [ jinja2 ];
all = [
brotli
execnet
jinja2
pyzmq
redis
sqlalchemy
];
};
nativeCheckInputs = [
pytestCheckHook
pytest-rerunfailures
]
++ lib.concatAttrValues optional-dependencies;
# Some of the tests use localhost networking.
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "logbook" ];
disabledTests = [
# Test require Redis instance
"test_redis_handler"
];
meta = {
description = "Logging replacement for Python";
homepage = "https://logbook.readthedocs.io/";
changelog = "https://github.com/getlogbook/logbook/blob/${src.tag}/CHANGES";
license = lib.licenses.bsd3;
maintainers = [ ];
};
}