python3Packages.python-ldap: rename from ldap
This commit is contained in:
53
pkgs/development/python-modules/python-ldap/default.nix
Normal file
53
pkgs/development/python-modules/python-ldap/default.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{ 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;
|
||||
hash = "sha256-sWRwoJg6rwmgD/uPQLaaJEbz0L5jmiKSVrzjgfyyaPc=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
openldap
|
||||
cyrus_sasl
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pyasn1
|
||||
pyasn1-modules
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# Needed by tests to setup a mockup ldap server.
|
||||
export BIN="${openldap}/bin"
|
||||
export SBIN="${openldap}/bin"
|
||||
export SLAPD="${openldap}/libexec/slapd"
|
||||
export SCHEMA="${openldap}/etc/schema"
|
||||
'';
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python modules for implementing LDAP clients";
|
||||
homepage = "https://www.python-ldap.org/";
|
||||
license = licenses.psfl;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user