Files
nixpkgs/pkgs/development/python-modules/python-utils/default.nix
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

64 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
loguru,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
typing-extensions,
}:
buildPythonPackage rec {
pname = "python-utils";
version = "3.9.1";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "WoLpH";
repo = "python-utils";
tag = "v${version}";
hash = "sha256-lzLzYI5jShfIwQqvfA8UtPjGawXE80ww7jb/gPzpeDo=";
};
postPatch = ''
sed -i pytest.ini \
-e '/--cov/d' \
-e '/--mypy/d'
'';
build-system = [ setuptools ];
dependencies = [ typing-extensions ];
optional-dependencies = {
loguru = [ loguru ];
};
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
]
++ optional-dependencies.loguru;
pythonImportsCheck = [ "python_utils" ];
enabledTestPaths = [ "_python_utils_tests" ];
disabledTests = [
# Flaky tests
"test_timeout_generator"
];
meta = {
description = "Module with some convenient utilities";
homepage = "https://github.com/WoLpH/python-utils";
changelog = "https://github.com/wolph/python-utils/releases/tag/v${version}";
license = lib.licenses.bsd3;
maintainers = [ ];
};
}