2021-11-28 14:57:20 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2023-05-04 22:23:12 +01:00
|
|
|
pythonAtLeast,
|
2021-11-28 14:57:20 +01:00
|
|
|
fetchFromGitHub,
|
|
|
|
python,
|
|
|
|
django,
|
2023-05-04 22:23:12 +01:00
|
|
|
packaging,
|
2021-11-28 14:57:20 +01:00
|
|
|
nodejs,
|
|
|
|
six,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-js-reverse";
|
2023-05-04 22:23:12 +01:00
|
|
|
version = "0.10.1-b1";
|
2023-12-07 16:53:02 +13:00
|
|
|
format = "setuptools";
|
2021-11-28 14:57:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-05-04 22:23:12 +01:00
|
|
|
owner = "BITSOLVER";
|
2021-11-28 14:57:20 +01:00
|
|
|
repo = "django-js-reverse";
|
2025-04-08 02:51:45 -04:00
|
|
|
rev = version;
|
2023-05-04 22:23:12 +01:00
|
|
|
hash = "sha256-i78UsxVwxyDAc8LrOVEXLG0tdidoQhvUx7GvPDaH0KY=";
|
2021-11-28 14:57:20 +01:00
|
|
|
};
|
|
|
|
|
2023-05-04 22:23:12 +01:00
|
|
|
propagatedBuildInputs = [ django ] ++ lib.optionals (pythonAtLeast "3.7") [ packaging ];
|
2021-11-28 14:57:20 +01:00
|
|
|
|
2024-10-18 17:53:42 +02:00
|
|
|
# Js2py is needed for tests but it's unmaintained and insecure
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-11-28 14:57:20 +01:00
|
|
|
nodejs
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|