diff --git a/pkgs/applications/finance/odoo/default.nix b/pkgs/applications/finance/odoo/default.nix index c755b0fb6678..9ae2d97a3d28 100644 --- a/pkgs/applications/finance/odoo/default.nix +++ b/pkgs/applications/finance/odoo/default.nix @@ -120,7 +120,7 @@ in python.pkgs.buildPythonApplication rec { pypdf2 pyserial python-dateutil - ldap + python-ldap python-stdnum pytz pyusb diff --git a/pkgs/applications/networking/powerdns-admin/default.nix b/pkgs/applications/networking/powerdns-admin/default.nix index cc31f25390a7..d8b4a6b2f329 100644 --- a/pkgs/applications/networking/powerdns-admin/default.nix +++ b/pkgs/applications/networking/powerdns-admin/default.nix @@ -32,7 +32,7 @@ let pythonDeps = with python.pkgs; [ flask flask_assets flask_login flask-sqlalchemy flask_migrate flask-seasurf flask_mail flask-session flask-sslify mysqlclient psycopg2 sqlalchemy - cffi configobj cryptography bcrypt requests ldap pyotp qrcode dnspython + cffi configobj cryptography bcrypt requests python-ldap pyotp qrcode dnspython gunicorn python3-saml pytz cssmin rjsmin authlib bravado-core lima pytimeparse pyyaml jinja2 itsdangerous werkzeug ]; diff --git a/pkgs/development/python-modules/django-auth-ldap/default.nix b/pkgs/development/python-modules/django-auth-ldap/default.nix index b3596e1e4444..e1ca5f418afb 100644 --- a/pkgs/development/python-modules/django-auth-ldap/default.nix +++ b/pkgs/development/python-modules/django-auth-ldap/default.nix @@ -7,8 +7,8 @@ , setuptools-scm # runtime -, ldap , django +, python-ldap # tests , python @@ -33,7 +33,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ django - ldap + python-ldap ]; # ValueError: SCHEMADIR is None, ldap schemas are missing. diff --git a/pkgs/development/python-modules/ldappool/default.nix b/pkgs/development/python-modules/ldappool/default.nix index a3cb21c10972..4697c80680af 100644 --- a/pkgs/development/python-modules/ldappool/default.nix +++ b/pkgs/development/python-modules/ldappool/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchPypi -, pbr, ldap, prettytable, fixtures, testresources, testtools }: +, pbr, python-ldap, prettytable, fixtures, testresources, testtools }: buildPythonPackage rec { pname = "ldappool"; @@ -20,7 +20,7 @@ buildPythonPackage rec { nativeBuildInputs = [ pbr ]; - propagatedBuildInputs = [ ldap prettytable ]; + propagatedBuildInputs = [ python-ldap prettytable ]; checkInputs = [ fixtures testresources testtools ]; diff --git a/pkgs/development/python-modules/ldap/default.nix b/pkgs/development/python-modules/python-ldap/default.nix similarity index 54% rename from pkgs/development/python-modules/ldap/default.nix rename to pkgs/development/python-modules/python-ldap/default.nix index ceaf4f6bf83a..ea9e8ca852d7 100644 --- a/pkgs/development/python-modules/ldap/default.nix +++ b/pkgs/development/python-modules/python-ldap/default.nix @@ -1,21 +1,39 @@ -{ buildPythonPackage, fetchPypi -, pyasn1, pyasn1-modules -, pythonAtLeast, pytestCheckHook -, openldap, cyrus_sasl, lib, stdenv }: +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pyasn1 +, pyasn1-modules +, pythonAtLeast +, pythonOlder +, pytestCheckHook +, openldap +, cyrus_sasl +}: buildPythonPackage rec { pname = "python-ldap"; version = "3.4.2"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-sWRwoJg6rwmgD/uPQLaaJEbz0L5jmiKSVrzjgfyyaPc="; + hash = "sha256-sWRwoJg6rwmgD/uPQLaaJEbz0L5jmiKSVrzjgfyyaPc="; }; - propagatedBuildInputs = [ pyasn1 pyasn1-modules ]; + buildInputs = [ + openldap + cyrus_sasl + ]; - checkInputs = [ pytestCheckHook ]; - buildInputs = [ openldap cyrus_sasl ]; + propagatedBuildInputs = [ + pyasn1 + pyasn1-modules + ]; + + checkInputs = [ + pytestCheckHook + ]; preCheck = '' # Needed by tests to setup a mockup ldap server. @@ -25,11 +43,6 @@ buildPythonPackage rec { export SCHEMA="${openldap}/etc/schema" ''; - disabledTests = lib.optionals (pythonAtLeast "3.9") [ - # See https://github.com/python-ldap/python-ldap/issues/407 - "test_simple_bind_noarg" - ]; - doCheck = !stdenv.isDarwin; meta = with lib; { diff --git a/pkgs/development/python-modules/suseapi/default.nix b/pkgs/development/python-modules/suseapi/default.nix index bcf35d1f5f70..83925dd64d93 100644 --- a/pkgs/development/python-modules/suseapi/default.nix +++ b/pkgs/development/python-modules/suseapi/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , django , suds-jurko -, ldap +, python-ldap , mechanize , beautifulsoup4 , pyxdg @@ -24,7 +24,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - django suds-jurko ldap mechanize beautifulsoup4 pyxdg python-dateutil requests + django suds-jurko python-ldap mechanize beautifulsoup4 pyxdg python-dateutil requests ]; buildInputs = [ httpretty ]; diff --git a/pkgs/os-specific/linux/sssd/default.nix b/pkgs/os-specific/linux/sssd/default.nix index ba655e75be54..462151ff64f7 100644 --- a/pkgs/os-specific/linux/sssd/default.nix +++ b/pkgs/os-specific/linux/sssd/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { preConfigure = '' export SGML_CATALOG_FILES="${docbookFiles}" - export PYTHONPATH=$(find ${python3.pkgs.ldap} -type d -name site-packages) + export PYTHONPATH=$(find ${python3.pkgs.python-ldap} -type d -name site-packages) export PATH=$PATH:${openldap}/libexec configureFlagsArray=( @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { samba nfs-utils p11-kit python3 popt talloc tdb tevent ldb pam openldap pcre2 libkrb5 cifs-utils glib keyutils dbus fakeroot libxslt libxml2 - libuuid python3.pkgs.ldap systemd nspr check cmocka uid_wrapper + libuuid python3.pkgs.python-ldap systemd nspr check cmocka uid_wrapper nss_wrapper ncurses Po4a http-parser jansson jose ]; makeFlags = [ diff --git a/pkgs/servers/ldap/389/default.nix b/pkgs/servers/ldap/389/default.nix index aa46426142bd..438d7d0e630f 100644 --- a/pkgs/servers/ldap/389/default.nix +++ b/pkgs/servers/ldap/389/default.nix @@ -81,7 +81,7 @@ stdenv.mkDerivation rec { # lib389 (python3.withPackages (ps: with ps; [ setuptools - ldap + python-ldap six pyasn1 pyasn1-modules diff --git a/pkgs/tools/security/adenum/default.nix b/pkgs/tools/security/adenum/default.nix index 8bcac264d95d..24d318968ad8 100644 --- a/pkgs/tools/security/adenum/default.nix +++ b/pkgs/tools/security/adenum/default.nix @@ -20,7 +20,7 @@ python3.pkgs.buildPythonApplication rec { propagatedBuildInputs = with python3.pkgs; [ impacket pwntools - ldap + python-ldap ] ++ [ john ]; diff --git a/pkgs/tools/security/ldapmonitor/default.nix b/pkgs/tools/security/ldapmonitor/default.nix index 83035de4d20c..410aa4ca87ed 100644 --- a/pkgs/tools/security/ldapmonitor/default.nix +++ b/pkgs/tools/security/ldapmonitor/default.nix @@ -19,8 +19,8 @@ python3.pkgs.buildPythonApplication rec { propagatedBuildInputs = with python3.pkgs; [ impacket - ldap ldap3 + python-ldap ]; installPhase = '' diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 6f9f6accd927..e6c9434a1198 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -95,6 +95,7 @@ mapAliases ({ influxgraph = throw "influxgraph has been removed because it is no longer maintained"; # added 2022-07-10 jupyter_client = jupyter-client; # added 2021-10-15 Keras = keras; # added 2021-11-25 + ldap = python-ldap; # added 2022-09-16 lammps-cython = throw "lammps-cython no longer builds and is unmaintained"; # added 2021-07-04 loo-py = loopy; # added 2022-05-03 Markups = markups; # added 2022-02-14 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 93037a89b537..b3bca6b0d3ab 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5071,10 +5071,6 @@ in { lc7001 = callPackage ../development/python-modules/lc7001 { }; - ldap = callPackage ../development/python-modules/ldap { - inherit (pkgs) openldap cyrus_sasl; - }; - ldap3 = callPackage ../development/python-modules/ldap3 { }; ldapdomaindump = callPackage ../development/python-modules/ldapdomaindump { }; @@ -8935,6 +8931,10 @@ in { python_keyczar = callPackage ../development/python-modules/python_keyczar { }; + python-ldap = callPackage ../development/python-modules/python-ldap { + inherit (pkgs) openldap cyrus_sasl; + }; + python-ldap-test = callPackage ../development/python-modules/python-ldap-test { }; python-Levenshtein = callPackage ../development/python-modules/python-levenshtein { };