1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4
5# optionals
6, genshi
7
8# tests
9, pytestCheckHook
10, webtest
11}:
12
13buildPythonPackage rec {
14 pname = "static3";
15 version = "0.7.0";
16 format = "setuptools";
17
18 src = fetchFromGitHub {
19 owner = "rmohr";
20 repo = "static3";
21 rev = "v${version}";
22 hash = "sha256-uFgv+57/UZs4KoOdkFxbvTEDQrJbb0iYJ5JoWWN4yFY=";
23 };
24
25 postPatch = ''
26 substituteInPlace setup.py \
27 --replace ", 'pytest-cov'" ""
28 '';
29
30 passthru.optional-dependencies = {
31 KidMagic = [
32 # TODO: kid
33 ];
34 Genshimagic = [
35 genshi
36 ];
37 };
38
39 pythonImportsCheck = [
40 "static"
41 ];
42
43 nativeCheckInputs = [
44 pytestCheckHook
45 webtest
46 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
47
48 meta = with lib; {
49 changelog = "https://github.com/rmohr/static3/releases/tag/v${version}";
50 description = "A really simple WSGI way to serve static (or mixed) content";
51 homepage = "https://github.com/rmohr/static3";
52 license = licenses.lgpl21Only;
53 maintainers = with maintainers; [ hexa ];
54 };
55}