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