587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
65 lines
1.2 KiB
Nix
65 lines
1.2 KiB
Nix
{ lib
|
|
, brotli
|
|
, buildPythonPackage
|
|
, django
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, requests
|
|
, setuptools
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "whitenoise";
|
|
version = "6.6.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "evansd";
|
|
repo = pname;
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-Z59GjrOL+BPHqBCirg9T4qBOrjiuBng6Q5lTuLQx9ac=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
brotli
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
django
|
|
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"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"whitenoise"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Library to serve static file for WSGI applications";
|
|
homepage = "https://whitenoise.readthedocs.io/";
|
|
changelog = "https://github.com/evansd/whitenoise/blob/${version}/docs/changelog.rst";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|