Commit a602da1b authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python310Packages.django-two-factor-auth: add optional-dependencies

parent 2fe6f096
Loading
Loading
Loading
Loading
+27 −6
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
, django-otp
, django-phonenumber-field
, fetchFromGitHub
, phonenumbers
, pydantic
, pythonOlder
, pythonRelaxDepsHook
@@ -41,18 +42,38 @@ buildPythonPackage rec {
    django
    django-formtools
    django-otp
    # django-otp-yubikey #Addtional Pkgs not in nixpkgs yet
    django-phonenumber-field
    pydantic
    qrcode
  ];

  passthru.optional-dependencies = {
    call = [
      twilio
    ];
    sms = [
      twilio
    ];
    webauthn = [
      pydantic
      webauthn
    ];
    # yubikey = [
    #   django-otp-yubikey
    # ];
    phonenumbers = [
      phonenumbers
    ];
    # phonenumberslite = [
    #   phonenumberslite
    # ];
  };

  # require internet connection
  # Tests require internet connection
  doCheck = false;

  pythonImportsCheck = [ "two_factor" ];
  pythonImportsCheck = [
    "two_factor"
  ];

  meta = with lib; {
    description = "Complete Two-Factor Authentication for Django";