1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 django,
6 setuptools,
7 pytestCheckHook,
8 pytest-django,
9}:
10
11buildPythonPackage rec {
12 pname = "django-crispy-forms";
13 version = "2.1";
14 format = "pyproject";
15
16 src = fetchFromGitHub {
17 owner = "django-crispy-forms";
18 repo = "django-crispy-forms";
19 rev = "refs/tags/${version}";
20 hash = "sha256-UQ5m0JWir20TdLgS+DVVLcMBlIEIfmzv8pkMJtaC0LA=";
21 };
22
23 propagatedBuildInputs = [
24 django
25 setuptools
26 ];
27
28 # FIXME: RuntimeError: Model class source.crispy_forms.tests.forms.CrispyTestModel doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
29 doCheck = false;
30
31 nativeCheckInputs = [
32 pytest-django
33 pytestCheckHook
34 ];
35
36 pytestFlagsArray = [
37 "--ds=crispy_forms.tests.test_settings"
38 "crispy_forms/tests/"
39 ];
40
41 pythonImportsCheck = [ "crispy_forms" ];
42
43 meta = with lib; {
44 description = "The best way to have DRY Django forms.";
45 homepage = "https://django-crispy-forms.readthedocs.io/en/latest/";
46 license = licenses.mit;
47 maintainers = with maintainers; [ ambroisie ];
48 };
49}