gnu: guile-2.0: Add libxcrypt dependency.

* gnu/packages/guile.scm (guile-2.0): Add libxcrypt dependency, and include it
in the pkg-config file's flags.
* gnu/packages/commencement.scm (guile-final): Explicitely exclude libxcrypt dependency.

Change-Id: Ie01913971b225c4dd23dcfdb96348d4e11042da8
This commit is contained in:
Josselin Poiret 2024-03-02 22:47:11 +01:00 committed by Ludovic Courtès
parent ce170fb4ca
commit 9b9977f355
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 26 additions and 4 deletions

View file

@ -3297,8 +3297,18 @@ (define with-boot4
(define-public guile-final
;; This package must be public because other modules refer to it. However,
;; mark it as hidden so that 'fold-packages' ignores it.
(with-boot4 (hidden-package
(package-with-bootstrap-guile guile-3.0/pinned))))
(let ((parent (with-boot4 (hidden-package
(package-with-bootstrap-guile guile-3.0/pinned)))))
(package
(inherit parent)
(inputs
(modify-inputs (package-inputs parent)
(delete "libxcrypt")))
(arguments
(substitute-keyword-arguments (package-arguments parent)
((#:phases phases #~%standard-phases)
#~(modify-phases #$phases
(delete 'add-libxcrypt-reference-pkgconfig))))))))
(define-public glibc-utf8-locales-final
;; Now that we have GUILE-FINAL, build the UTF-8 locales. They are needed

View file

@ -176,7 +176,7 @@ (define-public guile-2.0
(list this-package)
'())))
(inputs
(append (list libffi)
(append (list libffi libxcrypt)
(libiconv-if-needed)
;; We need Bash when cross-compiling because some of the scripts
@ -251,7 +251,19 @@ (define-public guile-2.0
'(search-input-file inputs "/bin/bash"))
(else
'(string-append bash "/bin/bash")))))
#t))))))
#t)))
(add-after 'install 'add-libxcrypt-reference-pkgconfig
(lambda* (#:key inputs outputs #:allow-other-keys)
(define out (assoc-ref outputs "out"))
(define libxcrypt
(false-if-exception
(dirname (search-input-file inputs "lib/libcrypt.so.1"))))
(when libxcrypt
(substitute*
(find-files (string-append out "/lib/pkgconfig")
".*\\.pc")
(("-lcrypt")
(string-append "-L" libxcrypt " -lcrypt")))))))))
(native-search-paths
(list (search-path-specification