Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / django-markup / default.nix
blobed33d093723658d96ae1279ad19fbbe8114bc6a6
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonOlder
5 , django
7 # optionals
8 , bleach
9 , docutils
10 , markdown
11 , pygments
12 , python-creole
13 , smartypants
14 , textile
16 # tests
17 , pytest-django
18 , pytestCheckHook
21 buildPythonPackage rec {
22   pname = "django-markup";
23   version = "1.8.1";
24   pyproject = true;
26   disabled = pythonOlder "3.8";
28   src = fetchFromGitHub {
29     owner = "bartTC";
30     repo = "django-markup";
31     rev = "refs/tags/v${version}";
32     hash = "sha256-Hhcp4wVJEcYV1lEZ2jWf7nOlt5m4lVAfC6VmKIdxf4c=";
33   };
35   postPatch = ''
36     sed -i "/--cov/d" pyproject.toml
37   '';
39   buildInputs = [
40     django
41   ];
43   passthru.optional-dependencies = {
44     all_filter_dependencies = [
45       bleach
46       docutils
47       markdown
48       pygments
49       python-creole
50       smartypants
51       textile
52     ];
53   };
55   pythonImportsCheck = [
56     "django_markup"
57   ];
59   nativeCheckInputs = [
60     pytest-django
61     pytestCheckHook
62   ] ++ passthru.optional-dependencies.all_filter_dependencies;
64   env.DJANGO_SETTINGS_MODULE = "django_markup.tests";
66   meta = with lib; {
67     description = "Generic Django application to convert text with specific markup to html.";
68     homepage = "https://github.com/bartTC/django-markup";
69     changelog = "https://github.com/bartTC/django-markup/blob/v${version}/CHANGELOG.rst";
70     license = licenses.mit;
71     maintainers = with maintainers; [ hexa ];
72   };