@@ -19,6 +19,7 @@
;;; Copyright © 2018 Steve Sprang <scs@stevesprang.com>
;;; Copyright © 2022 Taiju HIGASHI <higashi@taiju.info>
;;; Copyright © 2022 Liliana Marie Prikler <liliana.prikler@gmail.com>
+;;; Copyright © 2024 Carlo Zancanaro <carlo@zancanaro.id.au>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -73,6 +74,7 @@ (define-module (guix ui) ;import in user interfaces only
#:use-module (srfi srfi-31)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
+ #:use-module (srfi srfi-71)
#:autoload (ice-9 ftw) (scandir)
#:use-module (ice-9 match)
#:use-module (ice-9 format)
@@ -2192,9 +2194,16 @@ (define* (command-files #:optional directory)
(define (extension-directories)
"Return the list of directories containing Guix extensions."
- (filter file-exists?
- (parse-path
- (getenv "GUIX_EXTENSIONS_PATH"))))
+ (define package-path-entries
+ ;; We need to resolve this lazily, because even using an #:autoload is too
+ ;; much and breaks compilation during "guix pull".
+ (module-ref (resolve-module `(guix describe))
+ (symbol-append 'package-path-entries)))
+ (let ((scm-path go-path (package-path-entries)))
+ (set! %load-path (append %load-path scm-path))
+ (set! %load-compiled-path (append %load-compiled-path go-path))
+ (filter file-exists?
+ (parse-path (getenv "GUIX_EXTENSIONS_PATH") scm-path))))
(define (commands)
"Return the list of commands, alphabetically sorted."