2021-08-22 07:53:02 +00:00
|
|
|
{ lib
|
|
|
|
, brotli
|
|
|
|
, buildPythonPackage
|
2022-03-05 16:20:37 +00:00
|
|
|
, django
|
2021-08-22 07:53:02 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
2023-05-24 13:37:59 +00:00
|
|
|
, setuptools
|
2021-08-22 07:53:02 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "whitenoise";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "6.4.0";
|
|
|
|
format = "pyproject";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "evansd";
|
|
|
|
repo = pname;
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-ouEoqMcNh3Vwahwaq6bGQuVUFViVN14CDJosDXC5ozI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
brotli
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-05 16:20:37 +00:00
|
|
|
django
|
2021-08-22 07:53:02 +00:00
|
|
|
pytestCheckHook
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Don't run Django tests
|
|
|
|
"tests/test_django_whitenoise.py"
|
|
|
|
"tests/test_runserver_nostatic.py"
|
|
|
|
"tests/test_storage.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Test fails with AssertionError
|
|
|
|
"test_modified"
|
|
|
|
];
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"whitenoise"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-05-24 13:37:59 +00:00
|
|
|
description = "Library to serve static file for WSGI applications";
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "https://whitenoise.evans.io/";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/evansd/whitenoise/blob/${version}/docs/changelog.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-08-22 07:53:02 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|