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