2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# optionals
|
|
|
|
genshi,
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
pytestCheckHook,
|
|
|
|
webtest,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "static3";
|
|
|
|
version = "0.7.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rmohr";
|
|
|
|
repo = "static3";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-uFgv+57/UZs4KoOdkFxbvTEDQrJbb0iYJ5JoWWN4yFY=";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace ", 'pytest-cov'" ""
|
|
|
|
'';
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2023-05-24 13:37:59 +00:00
|
|
|
KidMagic = [
|
|
|
|
# TODO: kid
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
Genshimagic = [ genshi ];
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "static" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
2023-05-24 13:37:59 +00:00
|
|
|
pytestCheckHook
|
|
|
|
webtest
|
2024-10-04 16:56:33 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
changelog = "https://github.com/rmohr/static3/releases/tag/v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Really simple WSGI way to serve static (or mixed) content";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "static";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://github.com/rmohr/static3";
|
|
|
|
license = licenses.lgpl21Only;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|