2021-08-22 07:53:02 +00:00
|
|
|
{ lib
|
|
|
|
, brotli
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "whitenoise";
|
2021-08-22 07:53:02 +00:00
|
|
|
version = "5.3.0";
|
|
|
|
disabled = pythonOlder "3.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "evansd";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "17j1rml1hb43c7fs7kf4ygkpmnjppzgsbnyw3plq9w3yh9w5hkhg";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
brotli
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
|
|
|
homepage = "http://whitenoise.evans.io/";
|
|
|
|
license = licenses.mit;
|
2021-08-22 07:53:02 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|