about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/office/paperless/python-modules/django-crispy-forms.nix
blob: f8b91a94ccc79206e884a74d233701622a4921a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pytest-django
, django
}:

buildPythonPackage rec {
  pname = "django-crispy-forms";
  version = "1.10.0";

  src = fetchFromGitHub {
    owner = "django-crispy-forms";
    repo = "django-crispy-forms";
    rev = version;
    sha256 = "0y6kskfxgckb9npcgwx4zrs5n9px159zh9zhinhxi3i7wlriqpf5";
  };

  # For reasons unknown, the source dir must contain a dash
  # for the tests to run successfully
  postUnpack = ''
    mv $sourceRoot source-
    export sourceRoot=source-
  '';

  checkInputs = [ django pytest-django pytestCheckHook ];

  preCheck = ''
    export DJANGO_SETTINGS_MODULE=crispy_forms.tests.test_settings
  '';

  meta = with lib; {
    description = "The best way to have DRY Django forms";
    homepage = "https://github.com/maraujop/django-crispy-forms";
    license = licenses.mit;
    maintainers = with maintainers; [ earvstedt ];
  };
}