Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 distutils, 8 setuptools, 9 10 # native dependencies 11 openldap, 12 cyrus_sasl, 13 14 pyasn1, 15 pyasn1-modules, 16 17 # tests 18 pytestCheckHook, 19 jaraco-functools, 20}: 21 22buildPythonPackage rec { 23 pname = "python-ldap"; 24 version = "3.4.5"; 25 pyproject = true; 26 27 src = fetchFromGitHub { 28 owner = "python-ldap"; 29 repo = "python-ldap"; 30 tag = "python-ldap-${version}"; 31 hash = "sha256-olRu5HacRKaAcNbQczA+UCbDxhySUOO7qH0KdWlSbT0="; 32 }; 33 34 postPatch = '' 35 # unused in 3.4.5; https://github.com/python-ldap/python-ldap/pull/597 36 sed -i "/setuptools-scm/d" pyproject.toml 37 ''; 38 39 build-system = [ 40 distutils 41 setuptools 42 ]; 43 44 buildInputs = [ 45 openldap 46 cyrus_sasl 47 ]; 48 49 dependencies = [ 50 pyasn1 51 pyasn1-modules 52 ]; 53 54 nativeCheckInputs = [ 55 jaraco-functools 56 pytestCheckHook 57 ]; 58 59 preCheck = '' 60 # Needed by tests to setup a mockup ldap server. 61 export BIN="${openldap}/bin" 62 export SBIN="${openldap}/bin" 63 export SLAPD="${openldap}/libexec/slapd" 64 export SCHEMA="${openldap}/etc/schema" 65 ''; 66 67 disabledTests = [ 68 # https://github.com/python-ldap/python-ldap/issues/501 69 "test_tls_ext_noca" 70 ]; 71 72 __darwinAllowLocalNetworking = true; 73 74 meta = with lib; { 75 description = "Python modules for implementing LDAP clients"; 76 downloadPage = "https://github.com/python-ldap/python-ldap"; 77 homepage = "https://www.python-ldap.org/"; 78 changelog = "https://github.com/python-ldap/python-ldap/releases/tag/python-ldap-${version}"; 79 license = licenses.psfl; 80 maintainers = [ ]; 81 }; 82}