2022-10-06 18:32:54 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2023-05-24 13:37:59 +00:00
|
|
|
, pythonAtLeast
|
2022-10-06 18:32:54 +00:00
|
|
|
, fetchpatch
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
|
|
|
, django
|
2023-05-24 13:37:59 +00:00
|
|
|
, packaging
|
2022-10-06 18:32:54 +00:00
|
|
|
, nodejs
|
|
|
|
, js2py
|
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-js-reverse";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.10.1-b1";
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-05-24 13:37:59 +00:00
|
|
|
owner = "BITSOLVER";
|
2022-10-06 18:32:54 +00:00
|
|
|
repo = "django-js-reverse";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = version;
|
|
|
|
hash = "sha256-i78UsxVwxyDAc8LrOVEXLG0tdidoQhvUx7GvPDaH0KY=";
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
2023-05-24 13:37:59 +00:00
|
|
|
] ++ lib.optionals (pythonAtLeast "3.7") [
|
|
|
|
packaging
|
2022-10-06 18:32:54 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-06 18:32:54 +00:00
|
|
|
nodejs
|
|
|
|
js2py
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} django_js_reverse/tests/unit_tests.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "django_js_reverse" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Javascript url handling for Django that doesn't hurt";
|
|
|
|
homepage = "https://django-js-reverse.readthedocs.io/en/latest/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ambroisie ];
|
|
|
|
};
|
|
|
|
}
|