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