(define-module (glicid packages openldap) #:use-module (guix build-system gnu) #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages databases) #:use-module (gnu packages dbm) #:use-module (gnu packages gnupg) #:use-module (gnu packages groff) #:use-module (gnu packages kerberos) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module ((gnu packages openldap) #:prefix gnu:) #:use-module (gnu packages password-utils) #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages pkg-config) #:use-module (gnu packages crypto) #:use-module (gnu packages tls)) (define-public openldap (package (name "openldap") (version "2.6.6") (source (origin (method url-fetch) (uri (list (string-append "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-" version ".tgz"))) (sha256 (base32 "184ywcpw9gbrllp1a1q9a6g7aq583phxnhj4cd1lv622yn69jbh8")))) (build-system gnu-build-system) (inputs (list argon2 cyrus-sasl openssl libevent libxcrypt libltdl lz4 perl snappy unixodbc wiredtiger zlib)) ;; YD : was libgcrypt ?? but broken (Sept 2024) (native-inputs (list bdb groff libtool pkg-config)) (arguments `( #:tests? #f #:configure-flags '( "--enable-debug" "--enable-dynamic" "--enable-syslog" "--enable-ipv6" "--enable-local" "--enable-slapd" "--enable-dynacl" "--enable-aci" "--enable-cleartext" "--enable-crypt" "--enable-spasswd" "--enable-modules" "--enable-rlookups" "--enable-slapi" "--enable-backends=mod" "--enable-overlays=mod" "--enable-argon2" "--enable-balancer" "--disable-static" "--enable-shared" "--with-tls=openssl" ,@(if (%current-target-system) '("--with-yielding_select=yes" "ac_cv_func_memcmp_working=yes") '())) #:make-flags '("STRIP=") #:phases (modify-phases %standard-phases ,@(if (%current-target-system) '((add-before 'configure 'fix-cross-gcc (lambda* (#:key target #:allow-other-keys) (setenv "CC" (string-append target "-gcc")) #t))) '()) (add-before 'build 'make-depend (lambda* (#:key input #:allow-other-keys) (invoke "make" "depend"))) ))) (synopsis "Implementation of the Lightweight Directory Access Protocol") (description "OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.") (license license:openldap2.8) (home-page "https://www.openldap.org/"))) (define-public nss-pam-ldapd (package (name "nss-pam-ldapd") (version "0.9.12") (source (origin (method url-fetch) (uri (string-append "https://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-" version ".tar.gz")) (sha256 (base32 "050fzcmxmf6y15dlcffc4gxr3wkk7fliqqwhlwqzbjwk8vkn3mn6")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list (string-append "--with-pam-seclib-dir=" (assoc-ref %outputs "out") "/lib/security/") "--with-ldap-conf-file=/etc/nslcd.conf") #:phases (modify-phases %standard-phases (add-after 'unpack 'override-nslcd.conf-install-path (lambda* (#:key outputs #:allow-other-keys) (substitute* "Makefile.in" (("\\$\\(DESTDIR\\)\\$\\(NSLCD_CONF_PATH\\)") (string-append (assoc-ref outputs "out") "/etc/nslcd.conf.example")))))))) (inputs (list linux-pam mit-krb5 openldap python)) (home-page "https://arthurdejong.org/nss-pam-ldapd") (synopsis "NSS and PAM modules for LDAP") (description "nss-pam-ldapd provides a @dfn{Name Service Switch} (NSS) module that allows your LDAP server to provide user account, group, host name, alias, netgroup, and basically any other information that you would normally get from @file{/etc} flat files or NIS. It also provides a @dfn{Pluggable Authentication Module} (PAM) to do identity and authentication management with an LDAP server.") (license license:lgpl2.1+)))