ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / python-ldap / default.nix
blob7b3c2bdbc0ba41a6115f5fc57724458bfa6474e1
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , pyasn1
6 , pyasn1-modules
7 , pythonAtLeast
8 , pythonOlder
9 , pytestCheckHook
10 , openldap
11 , cyrus_sasl
14 buildPythonPackage rec {
15   pname = "python-ldap";
16   version = "3.4.3";
17   disabled = pythonOlder "3.6";
19   src = fetchFromGitHub {
20     owner = pname;
21     repo = pname;
22     rev = "refs/tags/python-ldap-${version}";
23     hash = "sha256-/ehvSs2qjuTPhaaOP0agPbWyyRugBpUlPq/Ny9t2C58=";
24   };
26   buildInputs = [
27     openldap
28     cyrus_sasl
29   ];
31   propagatedBuildInputs = [
32     pyasn1
33     pyasn1-modules
34   ];
36   checkInputs = [
37     pytestCheckHook
38   ];
40   preCheck = ''
41     # Needed by tests to setup a mockup ldap server.
42     export BIN="${openldap}/bin"
43     export SBIN="${openldap}/bin"
44     export SLAPD="${openldap}/libexec/slapd"
45     export SCHEMA="${openldap}/etc/schema"
46   '';
48   doCheck = !stdenv.isDarwin;
50   meta = with lib; {
51     description = "Python modules for implementing LDAP clients";
52     homepage = "https://www.python-ldap.org/";
53     license = licenses.psfl;
54   };