Archived
1
0
Fork 0

gnu: 389-ds-base: Use gexp.

* gnu/packages/openldap.scm (389-ds-base)[arguments]: Use gexp; remove one
obsolete substitution.
This commit is contained in:
Ricardo Wurmus 2022-12-14 21:50:55 +01:00
parent 597685054b
commit b5bb44b260
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -260,24 +260,25 @@ servers from Python programs.")
"1sdvfbjfg0091f47562gw3gdc2vgvvhyhdi21lrpwnw9lqc8xdxk")))) "1sdvfbjfg0091f47562gw3gdc2vgvvhyhdi21lrpwnw9lqc8xdxk"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:modules ((srfi srfi-1) (list
#:modules '((srfi srfi-1)
(guix build gnu-build-system) (guix build gnu-build-system)
((guix build python-build-system) ((guix build python-build-system)
#:select (add-installed-pythonpath python-version)) #:select (add-installed-pythonpath python-version))
(guix build utils)) (guix build utils))
#:imported-modules ((guix build python-build-system) #:imported-modules `((guix build python-build-system)
,@%gnu-build-system-modules) ,@%gnu-build-system-modules)
#:configure-flags #:configure-flags
(list (string-append "--with-db=" #~(list (string-append "--with-db="
(assoc-ref %build-inputs "bdb")) #$(this-package-input "bdb"))
(string-append "--with-netsnmp=" (string-append "--with-netsnmp="
(assoc-ref %build-inputs "net-snmp")) #$(this-package-input "net-snmp"))
(string-append "--with-selinux=" (string-append "--with-selinux="
(assoc-ref %build-inputs "libselinux")) #$(this-package-input "libselinux"))
"--localstatedir=/var" "--localstatedir=/var"
"--with-instconfigdir=/etc/dirsrv") "--with-instconfigdir=/etc/dirsrv")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'fix-references (add-after 'unpack 'fix-references
(lambda _ (lambda _
(substitute* "ldap/servers/plugins/sync/sync_persist.c" (substitute* "ldap/servers/plugins/sync/sync_persist.c"
@ -291,11 +292,10 @@ servers from Python programs.")
(("'/usr/bin/openssl'") (("'/usr/bin/openssl'")
(string-append "'" (which "openssl") "'"))))) (string-append "'" (which "openssl") "'")))))
(add-after 'unpack 'overwrite-default-locations (add-after 'unpack 'overwrite-default-locations
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let ((out (assoc-ref outputs "out")))
(substitute* "src/lib389/lib389/paths.py" (substitute* "src/lib389/lib389/paths.py"
(("/usr/share/dirsrv/inf/defaults.inf") (("/usr/share/dirsrv/inf/defaults.inf")
(string-append out "/share/dirsrv/inf/defaults.inf"))) (string-append #$output "/share/dirsrv/inf/defaults.inf")))
;; This directory can only be specified relative to sysconfdir. This ;; This directory can only be specified relative to sysconfdir. This
;; is used to determine where to look for installed directory ;; is used to determine where to look for installed directory
;; servers, so in the absence of a search path it needs to be global. ;; servers, so in the absence of a search path it needs to be global.
@ -306,24 +306,22 @@ servers from Python programs.")
;; when installing new directory server instances. ;; when installing new directory server instances.
(substitute* "src/lib389/lib389/instance/setup.py" (substitute* "src/lib389/lib389/instance/setup.py"
(("etc_dirsrv_path = .*") (("etc_dirsrv_path = .*")
"etc_dirsrv_path = '/etc/dirsrv/'\n"))))) "etc_dirsrv_path = '/etc/dirsrv/'\n"))))
(add-after 'unpack 'fix-install-location-of-python-tools (add-after 'unpack 'fix-install-location-of-python-tools
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let ((pythondir (string-append
(pythondir (string-append #$output "/lib/python"
out "/lib/python" (python-version #$(this-package-input "python"))
(python-version (assoc-ref inputs "python"))
"/site-packages/"))) "/site-packages/")))
;; Install directory must be on PYTHONPATH. ;; Install directory must be on PYTHONPATH.
(add-installed-pythonpath inputs outputs) (add-installed-pythonpath inputs outputs)
;; Install directory must exist. ;; Install directory must exist.
(mkdir-p pythondir) (mkdir-p pythondir)
(substitute* "src/lib389/setup.py" (setenv "INSTALL_PREFIX" #$output)
(("/usr") out))
(substitute* "Makefile.am" (substitute* "Makefile.am"
(("setup.py install --skip-build" m) (("setup.py install --skip-build" m)
(string-append (string-append
m " --prefix=" out m " --prefix=" #$output
" --root=/ --single-version-externally-managed")))))) " --root=/ --single-version-externally-managed"))))))
(add-after 'build 'build-python-tools (add-after 'build 'build-python-tools
(lambda* (#:key make-flags #:allow-other-keys) (lambda* (#:key make-flags #:allow-other-keys)
@ -339,10 +337,9 @@ servers from Python programs.")
(apply invoke "make" "lib389-install" make-flags))) (apply invoke "make" "lib389-install" make-flags)))
(add-after 'install-python-tools 'wrap-python-tools (add-after 'install-python-tools 'wrap-python-tools
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let ((pythonpath (getenv "GUIX_PYTHONPATH")))
(pythonpath (getenv "GUIX_PYTHONPATH")))
(for-each (lambda (file) (for-each (lambda (file)
(wrap-program (string-append out file) (wrap-program (string-append #$output file)
`("GUIX_PYTHONPATH" ":" prefix (,pythonpath)))) `("GUIX_PYTHONPATH" ":" prefix (,pythonpath))))
'("/sbin/dsconf" '("/sbin/dsconf"
"/sbin/dscreate" "/sbin/dscreate"