Files
nixpkgs/pkgs/development/python-modules/django-stubs-ext/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

67 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
django,
fetchFromGitHub,
hatchling,
oracledb,
pytest-mypy-plugins,
pytest-xdist,
pytestCheckHook,
redis,
typing-extensions,
}:
buildPythonPackage rec {
pname = "django-stubs-ext";
version = "5.2.5";
pyproject = true;
src = fetchFromGitHub {
owner = "typeddjango";
repo = "django-stubs";
tag = version;
hash = "sha256-v+MlMy9XABb9gw3U6Xv+aXXF6AZuvu+OBdU5+8tE9Oo=";
};
postPatch = ''
cd ext
ln -s ../scripts
'';
build-system = [ hatchling ];
dependencies = [
django
typing-extensions
];
optional-dependencies = {
redis = [ redis ];
oracle = [ oracledb ];
};
nativeCheckInputs = [
pytest-mypy-plugins
pytest-xdist
pytestCheckHook
];
disabledTestPaths = [
# error: Skipping analyzing "django.db": module is installed, but missing library stubs or py.typed marker [import-untyped] (diff)
"tests/typecheck"
];
# Tests are not shipped with PyPI
pythonImportsCheck = [ "django_stubs_ext" ];
meta = {
description = "Extensions and monkey-patching for django-stubs";
homepage = "https://github.com/typeddjango/django-stubs";
changelog = "https://github.com/typeddjango/django-stubs/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = [ ];
};
}