1{
2 lib,
3 buildPythonPackage,
4 django,
5 fetchFromGitHub,
6 nodejs,
7 packaging,
8 python,
9 setuptools,
10 six,
11}:
12
13buildPythonPackage rec {
14 pname = "django-js-reverse";
15 version = "0.10.2";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "vintasoftware";
20 repo = "django-js-reverse";
21 tag = "v${version}";
22 hash = "sha256-0S1g8tLWaJVV2QGPeiBOevhz9f0ueINxA9HOcnXuyYg=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [
28 django
29 packaging
30 ];
31
32 nativeCheckInputs = [
33 nodejs
34 six
35 ];
36
37 # Js2py is needed for tests but it's unmaintained and insecure
38 doCheck = false;
39
40 checkPhase = ''
41 ${python.interpreter} django_js_reverse/tests/unit_tests.py
42 '';
43
44 pythonImportsCheck = [ "django_js_reverse" ];
45
46 meta = with lib; {
47 description = "Javascript URL handling for Django";
48 homepage = "https://django-js-reverse.readthedocs.io/";
49 changelog = "https://github.com/vintasoftware/django-js-reverse/releases/tag/${src.tag}";
50 license = licenses.mit;
51 maintainers = with maintainers; [ ambroisie ];
52 };
53}