1{
2 buildPythonPackage,
3 cryptography,
4 django,
5 django-appconf,
6 fetchFromGitHub,
7 lib,
8 python,
9 pythonOlder,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "django-cryptography";
15 version = "1.1";
16 disabled = pythonOlder "3.7";
17 format = "pyproject";
18
19 src = fetchFromGitHub {
20 owner = "georgemarshall";
21 repo = "django-cryptography";
22 tag = version;
23 hash = "sha256-C3E2iT9JdLvF+1g+xhZ8dPDjjh25JUxLAtTMnalIxPk=";
24 };
25
26 nativeBuildInputs = [ setuptools ];
27
28 propagatedBuildInputs = [
29 cryptography
30 django
31 django-appconf
32 ];
33
34 patches = [
35 # See: https://github.com/georgemarshall/django-cryptography/pull/88
36 ./fix-setup-cfg.patch
37 ];
38
39 pythonImportsCheck = [ "django_cryptography" ];
40
41 checkPhase = ''
42 runHook preCheck
43 ${python.interpreter} ./runtests.py
44 runHook postCheck
45 '';
46
47 meta = with lib; {
48 homepage = "https://github.com/georgemarshall/django-cryptography";
49 description = "Set of primitives for performing cryptography in Django";
50 license = licenses.bsd3;
51 maintainers = with maintainers; [ centromere ];
52 };
53}