1 { lib, buildPythonPackage, fetchFromGitHub, cacert, openssl, python, nixosTests
3 , cryptography, pyrad, pymysql, python-dateutil, flask-versioned, flask_script
4 , defusedxml, croniter, flask_migrate, pyjwt, configobj, sqlsoup, pillow
5 , python-gnupg, passlib, pyopenssl, beautifulsoup4, smpplib, flask-babel
6 , ldap3, huey, pyyaml, qrcode, oauth2client, requests, lxml, cbor2, psycopg2
9 , mock, pytestCheckHook, responses, testfixtures
12 buildPythonPackage rec {
13 pname = "privacyIDEA";
16 src = fetchFromGitHub {
20 sha256 = "sha256-k2om2LjkFRCT53ECPAJEztCiMdz4fF5eoipVUvSoyGo=";
21 fetchSubmodules = true;
25 # Subset of https://github.com/privacyidea/privacyidea/commit/359db6dd10212b8a210e0a83536e92e9e796a1f8,
26 # fixes app context errors in tests. Can be removed on the next bump.
30 propagatedBuildInputs = [
31 cryptography pyrad pymysql python-dateutil flask-versioned flask_script
32 defusedxml croniter flask_migrate pyjwt configobj sqlsoup pillow
33 python-gnupg passlib pyopenssl beautifulsoup4 smpplib flask-babel
34 ldap3 huey pyyaml qrcode oauth2client requests lxml cbor2 psycopg2
38 passthru.tests = { inherit (nixosTests) privacyidea; };
40 checkInputs = [ openssl mock pytestCheckHook responses testfixtures ];
42 "AESHardwareSecurityModuleTestCase"
43 "test_01_cert_request"
44 "test_01_loading_scripts"
45 "test_02_api_push_poll"
46 "test_02_cert_enrolled"
47 "test_02_enroll_rights"
48 "test_02_get_resolvers"
50 "test_03_get_identifiers"
51 "test_04_remote_user_auth"
52 "test_14_convert_timestamp_to_utc"
55 pythonImportsCheck = [ "privacyidea" ];
58 substituteInPlace privacyidea/lib/resolvers/LDAPIdResolver.py --replace \
59 "/etc/privacyidea/ldap-ca.crt" \
60 "${cacert}/etc/ssl/certs/ca-bundle.crt"
64 rm -rf $out/${python.sitePackages}/tests
68 description = "Multi factor authentication system (2FA, MFA, OTP Server)";
69 license = licenses.agpl3Plus;
70 homepage = "http://www.privacyidea.org";
71 maintainers = with maintainers; [ globin ma27 ];