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