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