2021-06-20 22:12:11 +01:00
|
|
|
{ lib, fetchFromGitHub, cacert, openssl, nixosTests
|
|
|
|
, python3
|
2020-04-21 12:35:41 +01:00
|
|
|
}:
|
|
|
|
|
2021-06-20 22:12:11 +01:00
|
|
|
let
|
|
|
|
python3' = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "1.3.24";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "ebbb777cbf9312359b897bf81ba00dae0f5cb69fba2a18265dcc18a6f5ef7519";
|
|
|
|
};
|
|
|
|
});
|
2021-07-22 13:09:33 +01:00
|
|
|
flask_migrate = super.flask_migrate.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "2.7.0";
|
2021-09-18 13:26:01 +01:00
|
|
|
src = python3.pkgs.fetchPypi {
|
|
|
|
pname = "Flask-Migrate";
|
2021-07-22 13:09:33 +01:00
|
|
|
inherit version;
|
|
|
|
sha256 = "ae2f05671588762dd83a21d8b18c51fe355e86783e24594995ff8d7380dffe38";
|
|
|
|
};
|
|
|
|
});
|
2021-07-22 10:31:58 +01:00
|
|
|
werkzeug = self.callPackage ../../../development/python-modules/werkzeug/1.nix { };
|
|
|
|
flask = self.callPackage ../../../development/python-modules/flask/1.nix { };
|
2021-06-20 22:12:11 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
python3'.pkgs.buildPythonPackage rec {
|
2020-04-21 12:35:41 +01:00
|
|
|
pname = "privacyIDEA";
|
2021-07-28 22:39:27 +01:00
|
|
|
version = "3.6.2";
|
2020-04-21 12:35:41 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-07-28 22:39:27 +01:00
|
|
|
sha256 = "sha256-kv6XqsbGkaGEhfNxSOjCe6JbFOJnuqwM8CR/J9lJjks=";
|
2021-03-19 20:11:49 +00:00
|
|
|
fetchSubmodules = true;
|
2020-04-21 12:35:41 +01:00
|
|
|
};
|
|
|
|
|
2021-06-20 22:12:11 +01:00
|
|
|
propagatedBuildInputs = with python3'.pkgs; [
|
2020-04-21 12:35:41 +01:00
|
|
|
cryptography pyrad pymysql python-dateutil flask-versioned flask_script
|
2021-05-09 15:16:02 +01:00
|
|
|
defusedxml croniter flask_migrate pyjwt1 configobj sqlsoup pillow
|
2020-04-21 12:35:41 +01:00
|
|
|
python-gnupg passlib pyopenssl beautifulsoup4 smpplib flask-babel
|
|
|
|
ldap3 huey pyyaml qrcode oauth2client requests lxml cbor2 psycopg2
|
2021-06-20 22:12:11 +01:00
|
|
|
pydash ecdsa google-auth importlib-metadata
|
2020-04-21 12:35:41 +01:00
|
|
|
];
|
|
|
|
|
2021-03-19 20:11:49 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) privacyidea; };
|
|
|
|
|
2021-06-20 22:12:11 +01:00
|
|
|
checkInputs = with python3'.pkgs; [ openssl mock pytestCheckHook responses testfixtures ];
|
2021-03-19 20:11:49 +00:00
|
|
|
disabledTests = [
|
|
|
|
"AESHardwareSecurityModuleTestCase"
|
|
|
|
"test_01_cert_request"
|
|
|
|
"test_01_loading_scripts"
|
2021-04-02 10:09:55 +01:00
|
|
|
"test_02_api_push_poll"
|
2021-03-19 20:11:49 +00:00
|
|
|
"test_02_cert_enrolled"
|
|
|
|
"test_02_enroll_rights"
|
|
|
|
"test_02_get_resolvers"
|
|
|
|
"test_02_success"
|
|
|
|
"test_03_get_identifiers"
|
|
|
|
"test_04_remote_user_auth"
|
|
|
|
"test_14_convert_timestamp_to_utc"
|
|
|
|
];
|
2020-04-21 12:35:41 +01:00
|
|
|
|
2020-05-08 13:09:10 +01:00
|
|
|
pythonImportsCheck = [ "privacyidea" ];
|
|
|
|
|
2020-04-21 12:35:41 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace privacyidea/lib/resolvers/LDAPIdResolver.py --replace \
|
|
|
|
"/etc/privacyidea/ldap-ca.crt" \
|
|
|
|
"${cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2021-06-20 22:12:11 +01:00
|
|
|
rm -r $out/${python3'.sitePackages}/tests
|
2020-04-21 12:35:41 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Multi factor authentication system (2FA, MFA, OTP Server)";
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
homepage = "http://www.privacyidea.org";
|
2021-03-19 20:11:49 +00:00
|
|
|
maintainers = with maintainers; [ globin ma27 ];
|
2020-04-21 12:35:41 +01:00
|
|
|
};
|
|
|
|
}
|