1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # dependencies
7 django,
8 djangorestframework,
9 ujson,
10
11 # tests
12 pytest-django,
13 pytest-mock,
14 pytestCheckHook,
15}:
16
17buildPythonPackage rec {
18 pname = "drf-ujson2";
19 version = "1.7.2";
20 format = "setuptools";
21
22 src = fetchFromGitHub {
23 owner = "Amertz08";
24 repo = "drf_ujson2";
25 rev = "refs/tags/v${version}";
26 hash = "sha256-kbpZN1zOXHvRPcn+Sjbelq74cWgvCUeMXZy1eFSa6rA=";
27 };
28
29 postPatch = ''
30 sed -i '/--cov/d' setup.cfg
31 '';
32
33 buildInputs = [ django ];
34
35 propagatedBuildInputs = [
36 djangorestframework
37 ujson
38 ];
39
40 env.DJANGO_SETTINGS_MODULE = "tests.settings";
41
42 nativeCheckInputs = [
43 pytest-django
44 pytest-mock
45 pytestCheckHook
46 ];
47
48 meta = with lib; {
49 changelog = "https://github.com/Amertz08/drf_ujson2/releases/tag/v${version}";
50 description = "JSON parser and renderer using ujson for Django Rest Framework";
51 homepage = "https://github.com/Amertz08/drf_ujson2";
52 maintainers = with maintainers; [ hexa ];
53 };
54}