guix_mirror_bot pushed a commit to branch core-packages-team in repository guix.
commit c0876e9df57cbc89f0bc7f40c3bb11d4e2214a4e Author: Janneke Nieuwenhuizen <[email protected]> AuthorDate: Tue Dec 9 18:33:45 2025 +0100 gnu: guile: Install -MAJOR.MINOR symlinks. Fixes #4743. * gnu/packages/guile.scm (guile-2.0)[arguments]: Unless building for MinGW, add stage 'install-major.minor-symlinks. Change-Id: Iaa119970a4b98d6c3e3834ccac14ef304b1e307f --- gnu/packages/guile.scm | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 3237f560b5c..5873c77c5b9 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2014, 2016, 2018 David Thompson <[email protected]> ;;; Copyright © 2014, 2017, 2018 Mark H Weaver <[email protected]> ;;; Copyright © 2015, 2017 Christine Lemmer-Webber <[email protected]> -;;; Copyright © 2016, 2023, 2024, 2025 Janneke Nieuwenhuizen <[email protected]> +;;; Copyright © 2016, 2023-2025 Janneke Nieuwenhuizen <[email protected]> ;;; Copyright © 2016, 2017 Leo Famulari <[email protected]> ;;; Copyright © 2016, 2019, 2020 Ricardo Wurmus <[email protected]> ;;; Copyright © 2017 Andy Wingo <[email protected]> @@ -212,6 +212,10 @@ without requiring the source code to be rewritten.") ;; <https://bugs.gnu.org/20272>, which affects 2.0, 2.2, and 3.0 so far. #:parallel-build? #f + #:modules ((guix build gnu-build-system) + (guix build utils) + (ice-9 regex)) + #:phases (modify-phases %standard-phases ,@(if (system-hurd?) @@ -263,8 +267,26 @@ without requiring the source code to be rewritten.") (find-files (string-append out "/lib/pkgconfig") ".*\\.pc") (("-lcrypt") - (string-append "-L" libxcrypt " -lcrypt"))))))))) - + (string-append "-L" libxcrypt " -lcrypt")))))) + ,@(if (target-mingw?) + '() + '((add-after 'install 'install-major.minor-symlinks + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (in-vicinity out "bin")) + (m (string-match + ".*-([0-9]+[.][0-9]+)[.][0-9]+$" out)) + (effective-version (match:substring m 1))) + (define (symlink-version name) + (let ((name-version + (string-append name "-" effective-version))) + (symlink name (in-vicinity bin name-version)))) + (for-each symlink-version + '("guild" + "guile" + "guile-config" + "guile-snarf" + "guile-tools")))))))))) (native-search-paths (list (search-path-specification (variable "GUILE_LOAD_PATH")
