Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 37 lines 873 B view raw
1{ buildPythonPackage, fetchPypi 2, pyasn1, pyasn1-modules, pytest 3, openldap, cyrus_sasl, stdenv }: 4 5buildPythonPackage rec { 6 pname = "python-ldap"; 7 version = "3.3.1"; 8 9 src = fetchPypi { 10 inherit pname version; 11 sha256 = "198as30xy6p760niqps2zdvq2xcmr765h06pmda8fa9y077wl4a7"; 12 }; 13 14 propagatedBuildInputs = [ pyasn1 pyasn1-modules ]; 15 16 buildInputs = [ openldap cyrus_sasl ]; 17 18 checkInputs = [ pytest ]; 19 20 checkPhase = '' 21 # Needed by tests to setup a mockup ldap server. 22 export BIN="${openldap}/bin" 23 export SBIN="${openldap}/bin" 24 export SLAPD="${openldap}/libexec/slapd" 25 export SCHEMA="${openldap}/etc/schema" 26 27 py.test 28 ''; 29 30 doCheck = !stdenv.isDarwin; 31 32 meta = with stdenv.lib; { 33 description = "Python modules for implementing LDAP clients"; 34 homepage = "https://www.python-ldap.org/"; 35 license = licenses.psfl; 36 }; 37}