about summary refs log tree commit diff
path: root/pkgs/development/python-modules/django-cryptography/default.nix
blob: d5849498ecfde52c00976f050aa67ed488a83ba8 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
  buildPythonPackage,
  cryptography,
  django,
  django-appconf,
  fetchFromGitHub,
  lib,
  python,
  pythonOlder,
  setuptools,
}:

buildPythonPackage rec {
  pname = "django-cryptography";
  version = "1.1";
  disabled = pythonOlder "3.7";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "georgemarshall";
    repo = "django-cryptography";
    rev = "refs/tags/${version}";
    hash = "sha256-C3E2iT9JdLvF+1g+xhZ8dPDjjh25JUxLAtTMnalIxPk=";
  };

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [
    cryptography
    django
    django-appconf
  ];

  patches = [
    # See: https://github.com/georgemarshall/django-cryptography/pull/88
    ./fix-setup-cfg.patch
  ];

  pythonImportsCheck = [ "django_cryptography" ];

  checkPhase = ''
    runHook preCheck
    ${python.interpreter} ./runtests.py
    runHook postCheck
  '';

  meta = with lib; {
    homepage = "https://github.com/georgemarshall/django-cryptography";
    description = "A set of primitives for performing cryptography in Django";
    license = licenses.bsd3;
    maintainers = with maintainers; [ centromere ];
  };
}