mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-30 16:10:36 +00:00
84 lines
1.5 KiB
Nix
84 lines
1.5 KiB
Nix
{
|
||
lib,
|
||
buildPythonPackage,
|
||
fetchFromGitHub,
|
||
pythonOlder,
|
||
|
||
# build-system
|
||
setuptools,
|
||
|
||
# dependencies
|
||
django,
|
||
|
||
# optional-dependencies
|
||
coreapi,
|
||
coreschema,
|
||
django-guardian,
|
||
inflection,
|
||
psycopg2,
|
||
pygments,
|
||
pyyaml,
|
||
|
||
# tests
|
||
pytestCheckHook,
|
||
pytest-django,
|
||
pytz,
|
||
}:
|
||
|
||
buildPythonPackage (finalAttrs: {
|
||
pname = "djangorestframework";
|
||
version = "3.17.1";
|
||
pyproject = true;
|
||
|
||
src = fetchFromGitHub {
|
||
owner = "encode";
|
||
repo = "django-rest-framework";
|
||
tag = finalAttrs.version;
|
||
hash = "sha256-hDAtICtVFeEXRgR5Shb0IdVlLkpf/TBDWw+2cOLJTfw=";
|
||
};
|
||
|
||
build-system = [ setuptools ];
|
||
|
||
dependencies = [
|
||
django
|
||
];
|
||
|
||
optional-dependencies = {
|
||
complete = [
|
||
coreapi
|
||
coreschema
|
||
django-guardian
|
||
inflection
|
||
psycopg2
|
||
pygments
|
||
pyyaml
|
||
];
|
||
};
|
||
|
||
nativeCheckInputs = [
|
||
pytest-django
|
||
pytestCheckHook
|
||
pytz
|
||
]
|
||
++ finalAttrs.passthru.optional-dependencies.complete;
|
||
|
||
disabledTests = [
|
||
# https://github.com/encode/django-rest-framework/issues/9422
|
||
"test_urlpatterns"
|
||
];
|
||
|
||
disabledTestPaths = [
|
||
# AssertionError: assert '<27>\\u0125\\u01a6.txt' == 'ÀĥƦ.txt'"
|
||
"tests/test_parsers.py::TestFileUploadParser::test_get_encoded_filename"
|
||
];
|
||
|
||
pythonImportsCheck = [ "rest_framework" ];
|
||
|
||
meta = {
|
||
changelog = "https://github.com/encode/django-rest-framework/releases/tag/${finalAttrs.src.tag}";
|
||
description = "Web APIs for Django, made easy";
|
||
homepage = "https://www.django-rest-framework.org/";
|
||
license = lib.licenses.bsd2;
|
||
};
|
||
})
|