Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

61 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
django,
freezegun,
qrcode,
pytest,
python,
}:
buildPythonPackage rec {
pname = "django-otp";
version = "1.6.1";
pyproject = true;
src = fetchFromGitHub {
owner = "django-otp";
repo = "django-otp";
tag = "v${version}";
hash = "sha256-//i2KSsrkofcNE2JUlIG9zPCe/cIzBo/zmueC4I5g7I=";
};
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 = [ ];
};
}