Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.django-mfa3: init at 0.13.0 #350697

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions pkgs/development/python-modules/django-mfa3/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
django,
setuptools,
pyotp,
fido2,
qrcode,
python,
}:

buildPythonPackage rec {
pname = "django-mfa3";
version = "0.13.0";
pyproject = true;

src = fetchFromGitHub {
owner = "xi";
repo = "django-mfa3";
rev = "refs/tags/${version}";
hash = "sha256-O8po7VevqyHlP2isnNnLbpgfs1p4sFezxIZKMTgnwuY=";
};

build-system = [ setuptools ];

dependencies = [
django
pyotp
fido2
qrcode
];

# qrcode 8.0 not supported yet
# See https://github.com/xi/django-mfa3/pull/14
pythonRelaxDeps = [ "qrcode" ];

checkPhase = ''
${python.interpreter} -m django test --settings tests.settings
'';

meta = {
description = "Multi factor authentication for Django";
homepage = "https://github.com/xi/django-mfa3";
changelog = "https://github.com/xi/django-mfa3/blob/${src.rev}/CHANGES.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.onny ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3444,6 +3444,8 @@ self: super: with self; {

django-markdownx = callPackage ../development/python-modules/django-markdownx { };

django-mfa3 = callPackage ../development/python-modules/django-mfa3 { };

django-model-utils = callPackage ../development/python-modules/django-model-utils { };

django-modelcluster = callPackage ../development/python-modules/django-modelcluster { };
Expand Down