#:use-module (gnu packages readline)
#:use-module (gnu packages libunwind)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages patchelf)
#:use-module (gnu packages perl)
#:use-module (gnu packages python))
"1phl6mmrc72jyvbyrw6cv6b92cxq3v2pbn1fh97nnb4hild1fnjg"))))
(build-system gnu-build-system)
(arguments
- '(#:phases (alist-cons-before 'configure 'chdir
- (lambda _
- (chdir "source3"))
- %standard-phases)
+ '(#:phases (alist-cons-before
+ 'configure 'chdir
+ (lambda _
+ (chdir "source3"))
+ (alist-cons-after
+ 'strip 'add-lib-to-runpath
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib")))
+ ;; Add LIB to the RUNPATH of all the executables.
+ (with-directory-excursion out
+ (for-each (cut augment-rpath <> lib)
+ (append (find-files "bin" ".*")
+ (find-files "sbin" ".*"))))))
+ %standard-phases))
+
+ #:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (guix build rpath)
+ (srfi srfi-26))
+ #:imported-modules ((guix build gnu-build-system)
+ (guix build utils)
+ (guix build rpath))
;; This flag is required to allow for "make test".
#:configure-flags '("--enable-socket-wrapper")
("popt" ,popt)
("openldap" ,openldap)
("linux-pam" ,linux-pam)
- ("readline" ,readline)))
+ ("readline" ,readline)
+ ("patchelf" ,patchelf))) ; for (guix build rpath)
(native-inputs ; for the test suite
`(("perl" ,perl)
("python" ,python)))