2021-08-22 07:53:02 +00:00
|
|
|
{ lib
|
|
|
|
, brotli
|
|
|
|
, buildPythonPackage
|
2022-03-05 16:20:37 +00:00
|
|
|
, django
|
2021-08-22 07:53:02 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "whitenoise";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "6.2.0";
|
2022-03-05 16:20:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "evansd";
|
|
|
|
repo = pname;
|
2022-03-05 16:20:37 +00:00
|
|
|
rev = version;
|
2022-09-09 14:08:57 +00:00
|
|
|
hash = "sha256-HcWWWMIuU8kfcOnntgXUnHD3pFogq8OEAd3wRtCnXjQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
brotli
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-05 16:20:37 +00:00
|
|
|
django
|
2021-08-22 07:53:02 +00:00
|
|
|
pytestCheckHook
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Don't run Django tests
|
|
|
|
"tests/test_django_whitenoise.py"
|
|
|
|
"tests/test_runserver_nostatic.py"
|
|
|
|
"tests/test_storage.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Test fails with AssertionError
|
|
|
|
"test_modified"
|
|
|
|
];
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"whitenoise"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Radically simplified static file serving for WSGI applications";
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "https://whitenoise.evans.io/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-08-22 07:53:02 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|