Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
84 lines
1.5 KiB
Nix
84 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
|
|
# build-system
|
|
setuptools,
|
|
|
|
# dependencies
|
|
django,
|
|
pytz,
|
|
|
|
# optional-dependencies
|
|
coreapi,
|
|
coreschema,
|
|
django-guardian,
|
|
inflection,
|
|
psycopg2,
|
|
pygments,
|
|
pyyaml,
|
|
|
|
# tests
|
|
pytestCheckHook,
|
|
pytest-django,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "djangorestframework";
|
|
version = "3.16.0";
|
|
pyproject = true;
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "encode";
|
|
repo = "django-rest-framework";
|
|
rev = version;
|
|
hash = "sha256-LFq8mUx+jAFFnQTfysYs+DSN941p+8h9mDDOp+LO7VU=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
django
|
|
pygments
|
|
]
|
|
++ (lib.optional (lib.versionOlder django.version "5.0.0") pytz);
|
|
|
|
optional-dependencies = {
|
|
complete = [
|
|
coreschema
|
|
django-guardian
|
|
inflection
|
|
psycopg2
|
|
pygments
|
|
pyyaml
|
|
]
|
|
++ lib.optionals (pythonOlder "3.13") [
|
|
# broken on 3.13
|
|
coreapi
|
|
];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
pytest-django
|
|
pytestCheckHook
|
|
]
|
|
++ optional-dependencies.complete;
|
|
|
|
disabledTests = [
|
|
# https://github.com/encode/django-rest-framework/issues/9422
|
|
"test_urlpatterns"
|
|
];
|
|
|
|
pythonImportsCheck = [ "rest_framework" ];
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/encode/django-rest-framework/releases/tag/3.15.1";
|
|
description = "Web APIs for Django, made easy";
|
|
homepage = "https://www.django-rest-framework.org/";
|
|
license = licenses.bsd2;
|
|
};
|
|
}
|