Skip to content

Commit

Permalink
python3Packages.django-mfa3: init at 0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
onny committed Oct 23, 2024
1 parent b158fbb commit 99f7ef0
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
51 changes: 51 additions & 0 deletions pkgs/development/python-modules/django-mfa3/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
django,
setuptools,
pyotp,
fido2,
qrcode,
coverage,
}:

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" ];

nativeCheckInputs = [ coverage ];

checkPhase = ''
coverage run -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 @@ -3446,6 +3446,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

0 comments on commit 99f7ef0

Please sign in to comment.