1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5, django
6, djangorestframework
7, pytestCheckHook
8, pytest-django
9, ipdb
10}:
11
12buildPythonPackage rec {
13 pname = "drf-nested-routers";
14 version = "0.93.4";
15 format = "setuptools";
16
17 src = fetchFromGitHub {
18 owner = "alanjds";
19 repo = "drf-nested-routers";
20 rev = "refs/tags/v${version}";
21 hash = "sha256-qlXNDydoQJ9FZB6G7yV/pNmx3BEo+lvRqsfjrvlbdNY=";
22 };
23
24 patches = [
25 # django4 compatibility
26 (fetchpatch {
27 url = "https://github.com/alanjds/drf-nested-routers/commit/59764cc356f7f593422b26845a9dfac0ad196120.patch";
28 hash = "sha256-mq3vLHzQlGl2EReJ5mVVQMMcYgGIVt/T+qi1STtQ0aI=";
29 })
30 (fetchpatch {
31 url = "https://github.com/alanjds/drf-nested-routers/commit/723a5729dd2ffcb66fe315f229789ca454986fa4.patch";
32 hash = "sha256-UCbBjwlidqsJ9vEEWlGzfqqMOr0xuB2TAaUxHsLzFfU=";
33 })
34 (fetchpatch {
35 url = "https://github.com/alanjds/drf-nested-routers/commit/38e49eb73759bc7dcaaa9166169590f5315e1278.patch";
36 hash = "sha256-IW4BLhHHhXDUZqHaXg46qWoQ89pMXv0ZxKjOCTnDcI0=";
37 })
38 ];
39
40 buildInputs = [
41 django
42 ];
43
44 propagatedBuildInputs = [
45 djangorestframework
46 ];
47
48 nativeCheckInputs = [
49 ipdb
50 pytestCheckHook
51 pytest-django
52 ];
53
54 meta = with lib; {
55 homepage = "https://github.com/alanjds/drf-nested-routers";
56 description = "Provides routers and fields to create nested resources in the Django Rest Framework";
57 license = licenses.asl20;
58 maintainers = with maintainers; [ felschr ];
59 };
60}