Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.2 kB · 60 lines
Nix
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061{ lib, buildPythonPackage, fetchFromGitHub, hatchling, django, freezegun, qrcode, pytest, python,}:
buildPythonPackage rec { pname = "django-otp"; version = "1.6.0"; pyproject = true;
src = fetchFromGitHub { owner = "django-otp"; repo = "django-otp"; tag = "v${version}"; hash = "sha256-kK7aU2W89557vrzJF6XtmItIZlOsxibciyMlbRDT93c="; };
build-system = [ hatchling ];
dependencies = [ django qrcode ];
env.DJANGO_SETTINGS_MODUOLE = "test.test_project.settings";
nativeCheckInputs = [ freezegun pytest ];
checkPhase = '' runHook preCheck
export PYTHONPATH=$PYTHONPATH:test export DJANGO_SETTINGS_MODULE=test_project.settings ${python.interpreter} -m django test django_otp
runHook postCheck '';
enabledTestPaths = [ "src/django_otp/test.py" ];
pythonImportsCheck = [ "django_otp" ];
meta = with lib; { homepage = "https://github.com/django-otp/django-otp"; changelog = "https://github.com/django-otp/django-otp/blob/${src.tag}/CHANGES.rst"; description = "Pluggable framework for adding two-factor authentication to Django using one-time passwords"; license = licenses.bsd2; maintainers = [ ]; };}