1{ lib
2, buildPythonPackage
3, fetchpatch
4, fetchFromGitHub
5, python
6, django
7, nodejs
8, js2py
9, six
10}:
11
12buildPythonPackage rec {
13 pname = "django-js-reverse";
14 # Support for Django 4.0 not yet released
15 version = "unstable-2022-09-16";
16
17 src = fetchFromGitHub {
18 owner = "ierror";
19 repo = "django-js-reverse";
20 rev = "7cab78c4531780ab4b32033d5104ccd5be1a246a";
21 sha256 = "sha256-oA4R5MciDMcSsb+GAgWB5jhj+nl7E8t69u0qlx2G93E=";
22 };
23
24 patches = [
25 (fetchpatch {
26 name = "fix-requires_system_checks-list-or-tuple";
27 url = "https://github.com/ierror/django-js-reverse/commit/1477ba44b62c419d12ebec86e56973f1ae56f712.patch";
28 sha256 = "sha256-xUtCziewVhnCOaNWddJBH4/Vvhwjjq/wcQDvh2YzWMQ=";
29 })
30 ];
31
32 propagatedBuildInputs = [
33 django
34 ];
35
36 checkInputs = [
37 nodejs
38 js2py
39 six
40 ];
41
42 checkPhase = ''
43 ${python.interpreter} django_js_reverse/tests/unit_tests.py
44 '';
45
46 pythonImportsCheck = [ "django_js_reverse" ];
47
48 meta = with lib; {
49 description = "Javascript url handling for Django that doesn't hurt";
50 homepage = "https://django-js-reverse.readthedocs.io/en/latest/";
51 license = licenses.mit;
52 maintainers = with maintainers; [ ambroisie ];
53 };
54}