Merge pull request #85687 from mayflower/privacyidea

Init privacyIDEA packages and modules
This commit is contained in:
Linus Heckemann
2020-05-13 09:08:57 +02:00
committed by GitHub
12 changed files with 533 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, flask }:
buildPythonPackage rec {
pname = "Flask-Versioned";
version = "0.9.4-20101221";
src = fetchFromGitHub {
owner = "pilt";
repo = "flask-versioned";
rev = "38046fb53a09060de437c90a5f7370a6b94ffc31"; # no tags
sha256 = "1wim9hvx7lxzfg35c0nc7p34j4vw9mzisgijlz4ibgykah4g1y37";
};
propagatedBuildInputs = [ flask ];
meta = with stdenv.lib; {
description = "Flask plugin to rewrite file paths to add version info";
homepage = "https://github.com/pilt/flask-versioned";
license = licenses.bsd3;
maintainers = with maintainers; [ globin ];
};
}

View File

@@ -0,0 +1,25 @@
{ lib, buildPythonPackage, fetchFromGitHub, redis }:
buildPythonPackage rec {
pname = "huey";
version = "2.2.0";
src = fetchFromGitHub {
owner = "coleifer";
repo = pname;
rev = version;
sha256 = "1hgic7qrmb1kxvfgf2qqiw39nqyknf17pjvli8jfzvd9mv7cb7hh";
};
propagatedBuildInputs = [ redis ];
# connects to redis
doCheck = false;
meta = with lib; {
description = "A little task queue for python";
homepage = "https://github.com/coleifer/huey";
license = licenses.mit;
maintainers = [ maintainers.globin ];
};
}

View File

@@ -0,0 +1,51 @@
{ lib, buildPythonPackage, fetchFromGitHub, cacert, openssl, python
, 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
, mock, pytest, responses, testfixtures
}:
buildPythonPackage rec {
pname = "privacyIDEA";
version = "3.3";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "188ki924dig899wlih45xfsm0s7mjkya56vii26bg02h91izrb4b";
};
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
];
checkInputs = [ openssl mock pytest responses testfixtures ];
# issues with hardware token tests
doCheck = false;
pythonImportsCheck = [ "privacyidea" ];
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 = [ maintainers.globin ];
};
}

View File

@@ -0,0 +1,27 @@
{ lib, buildPythonPackage, fetchFromGitHub, twisted, ldaptor, configobj }:
buildPythonPackage rec {
pname = "privacyidea-ldap-proxy";
version = "0.6.1";
src = fetchFromGitHub {
owner = "privacyidea";
repo = pname;
rev = "v${version}";
sha256 = "1kc1n9wr1a66xd5zvl6dq78xnkqkn5574jpzashc99pvm62dr24j";
};
propagatedBuildInputs = [ twisted ldaptor configobj ];
# python 2 zope.interface test import path issues
doCheck = false;
pythonImportsCheck = [ "pi_ldapproxy" ];
meta = with lib; {
description = "LDAP Proxy to intercept LDAP binds and authenticate against privacyIDEA";
homepage = "https://github.com/privacyidea/privacyidea-ldap-proxy";
license = licenses.agpl3;
maintainers = [ maintainers.globin ];
};
}

View File

@@ -0,0 +1,27 @@
{ buildPythonPackage, fetchFromGitHub, lib, netaddr, six, nose }:
buildPythonPackage rec {
pname = "pyrad";
version = "2.3";
src = fetchFromGitHub {
owner = "pyradius";
repo = pname;
rev = version;
sha256 = "0hy7999av47s8100afbhxfjb8phbmrqcv530xlvskndby4a8w94k";
};
propagatedBuildInputs = [ netaddr six ];
checkInputs = [ nose ];
checkPhase = ''
nosetests -e testBind
'';
meta = with lib; {
description = "Python RADIUS Implementation";
homepage = "https://bitbucket.org/zzzeek/sqlsoup";
license = licenses.mit;
maintainers = [ maintainers.globin ];
};
}

View File

@@ -0,0 +1,29 @@
{ buildPythonPackage, fetchPypi, lib, python, six, tox, mock, pytest }:
buildPythonPackage rec {
pname = "smpplib";
version = "2.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "0jzxlfwf0861ilh4xyd70hmkdbvdki52aalglm1bnpxkg6i3jhfz";
};
propagatedBuildInputs = [ six ];
checkInputs = [ tox mock pytest ];
checkPhase = ''
pytest
'';
postInstall = ''
rm -rf $out/${python.sitePackages}/tests
'';
meta = with lib; {
description = "SMPP library for Python";
homepage = "https://github.com/python-smpplib/python-smpplib";
license = licenses.lgpl3Plus;
maintainers = [ maintainers.globin ];
};
}

View File

@@ -0,0 +1,21 @@
{ buildPythonPackage, fetchPypi, lib, sqlalchemy, nose }:
buildPythonPackage rec {
pname = "sqlsoup";
version = "0.9.1";
src = fetchPypi {
inherit pname version;
sha256 = "1mj00fhxj75ac3i8xk9jmm7hvcjz9p4x2r3yndcwsgb659rvgbrg";
};
propagatedBuildInputs = [ sqlalchemy ];
checkInputs = [ nose ];
meta = with lib; {
description = "A one step database access tool, built on the SQLAlchemy ORM";
homepage = "https://bitbucket.org/zzzeek/sqlsoup";
license = licenses.mit;
maintainers = [ maintainers.globin ];
};
}