depot/third_party/nixpkgs/pkgs/development/python-modules/django-js-reverse/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

46 lines
951 B
Nix

{
lib,
buildPythonPackage,
pythonAtLeast,
fetchFromGitHub,
python,
django,
packaging,
nodejs,
js2py,
six,
}:
buildPythonPackage rec {
pname = "django-js-reverse";
version = "0.10.1-b1";
format = "setuptools";
src = fetchFromGitHub {
owner = "BITSOLVER";
repo = "django-js-reverse";
rev = version;
hash = "sha256-i78UsxVwxyDAc8LrOVEXLG0tdidoQhvUx7GvPDaH0KY=";
};
propagatedBuildInputs = [ django ] ++ lib.optionals (pythonAtLeast "3.7") [ packaging ];
nativeCheckInputs = [
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 ];
};
}