3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/privacyidea/default.nix

67 lines
2 KiB
Nix
Raw Normal View History

{ lib, buildPythonPackage, fetchFromGitHub, cacert, openssl, python, nixosTests
2020-04-21 12:35:41 +01:00
, cryptography, pyrad, pymysql, python-dateutil, flask-versioned, flask_script
, defusedxml, croniter, flask_migrate, pyjwt, configobj, sqlsoup, pillow
, python-gnupg, passlib, pyopenssl, beautifulsoup4, smpplib, flask-babel
, ldap3, huey, pyyaml, qrcode, oauth2client, requests, lxml, cbor2, psycopg2
, pydash
2020-04-21 12:35:41 +01:00
, mock, pytestCheckHook, responses, testfixtures
2020-04-21 12:35:41 +01:00
}:
buildPythonPackage rec {
pname = "privacyIDEA";
version = "3.5.1";
2020-04-21 12:35:41 +01:00
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-XJnrrpU0x2Axu7W4G3oDTjSJuqEyh3C/0Aga5D0gw9k=";
fetchSubmodules = true;
2020-04-21 12:35:41 +01:00
};
propagatedBuildInputs = [
cryptography pyrad pymysql python-dateutil flask-versioned flask_script
defusedxml croniter flask_migrate pyjwt configobj sqlsoup pillow
python-gnupg passlib pyopenssl beautifulsoup4 smpplib flask-babel
ldap3 huey pyyaml qrcode oauth2client requests lxml cbor2 psycopg2
pydash
2020-04-21 12:35:41 +01:00
];
passthru.tests = { inherit (nixosTests) privacyidea; };
checkInputs = [ openssl mock pytestCheckHook responses testfixtures ];
disabledTests = [
"AESHardwareSecurityModuleTestCase"
"test_01_cert_request"
"test_01_loading_scripts"
"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 = ''
rm -rf $out/${python.sitePackages}/tests
'';
meta = with lib; {
description = "Multi factor authentication system (2FA, MFA, OTP Server)";
license = licenses.agpl3Plus;
homepage = "http://www.privacyidea.org";
maintainers = with maintainers; [ globin ma27 ];
2020-04-21 12:35:41 +01:00
};
}