Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / static3 / default.nix
blob9156ea6d6089a7bdefd0f949f827a77396c7fe56
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
5 # optionals
6 , genshi
8 # tests
9 , pytestCheckHook
10 , webtest
13 buildPythonPackage rec {
14   pname = "static3";
15   version = "0.7.0";
16   format = "setuptools";
18   src = fetchFromGitHub {
19     owner = "rmohr";
20     repo = "static3";
21     rev = "v${version}";
22     hash = "sha256-uFgv+57/UZs4KoOdkFxbvTEDQrJbb0iYJ5JoWWN4yFY=";
23   };
25   postPatch = ''
26     substituteInPlace setup.py \
27       --replace ", 'pytest-cov'" ""
28   '';
30   passthru.optional-dependencies = {
31     KidMagic = [
32       # TODO: kid
33     ];
34     Genshimagic = [
35       genshi
36     ];
37   };
39   pythonImportsCheck = [
40     "static"
41   ];
43   nativeCheckInputs  = [
44     pytestCheckHook
45     webtest
46   ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
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   };