1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 asgiref,
11 typing-extensions,
12
13 # tests
14 django,
15 djangorestframework,
16 graphene-django,
17 pytestCheckHook,
18 pytest-django,
19}:
20
21buildPythonPackage rec {
22 pname = "django-countries";
23 version = "7.6.1";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "SmileyChris";
28 repo = "django-countries";
29 tag = "v${version}";
30 hash = "sha256-IR9cJbDVkZrcF3Ti70mV8VeXINQDK8OpwUTWVjD4Zn0=";
31 };
32
33 build-system = [ setuptools ];
34
35 dependencies = [
36 asgiref
37 typing-extensions
38 ];
39
40 nativeCheckInputs = [
41 django
42 djangorestframework
43 graphene-django
44 pytestCheckHook
45 pytest-django
46 ];
47
48 meta = with lib; {
49 description = "Provides a country field for Django models";
50 longDescription = ''
51 A Django application that provides country choices for use with
52 forms, flag icons static files, and a country field for models.
53 '';
54 homepage = "https://github.com/SmileyChris/django-countries";
55 changelog = "https://github.com/SmileyChris/django-countries/blob/v${version}/CHANGES.rst";
56 license = licenses.mit;
57 maintainers = with maintainers; [ hexa ];
58 };
59}