1{
2 lib,
3 brotli,
4 buildPythonPackage,
5 django,
6 fetchFromGitHub,
7 pytestCheckHook,
8 requests,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "whitenoise";
14 version = "6.9.0";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "evansd";
19 repo = "whitenoise";
20 tag = version;
21 hash = "sha256-UmM8Az22ql3uUpyY6jj7ky3LelmttFBqGMYlzlNRAHg=";
22 };
23
24 build-system = [ setuptools ];
25
26 dependencies = [ brotli ];
27
28 nativeCheckInputs = [
29 django
30 pytestCheckHook
31 requests
32 ];
33
34 __darwinAllowLocalNetworking = true;
35
36 disabledTestPaths = [
37 # Don't run Django tests
38 "tests/test_django_whitenoise.py"
39 "tests/test_runserver_nostatic.py"
40 "tests/test_storage.py"
41 ];
42
43 disabledTests = [
44 # Test fails with AssertionError
45 "test_modified"
46 ];
47
48 pythonImportsCheck = [ "whitenoise" ];
49
50 meta = with lib; {
51 description = "Library to serve static file for WSGI applications";
52 homepage = "https://whitenoise.readthedocs.io/";
53 changelog = "https://github.com/evansd/whitenoise/blob/${version}/docs/changelog.rst";
54 license = licenses.mit;
55 maintainers = [ ];
56 };
57}