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