From d29428e5a7e377c5db1e30ea9519ecf5e603ef34 Mon Sep 17 00:00:00 2001 From: Noé Lopez Date: Sun, 25 Jan 2026 19:41:05 +0100 Subject: gnu: guix-xsearch: Update to 2.3. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/package-management.scm (guix-xsearch): Update to 2.3. [arguments]<#:phases>: Wrap Guile search paths. [propagated-inputs]: Stop propagating guile-xapian. Merges: https://codeberg.org/guix/guix/pulls/5918 Change-Id: Ief44bb67ad991c81ea8e34f62a415b22f47a503f Reviewed-by: Ludovic Courtès Signed-off-by: Sharlatan Hellseher --- gnu/packages/package-management.scm | 40 +++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index a399f977c42..3d8cd1a9ef4 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -847,34 +847,58 @@ high-performance computing} clusters.") (define-public guix-xsearch (package (name "guix-xsearch") - (version "2.2") + (version "2.3") (source (origin (method git-fetch) (uri (git-reference - (url "https://codeberg.org/Baleine/guix-xsearch.git") - (commit version))) + (url "https://codeberg.org/Baleine/guix-xsearch.git") + (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1rx1984841jv6y4wkhlfgdjylfffl6zl07scl1l7wgm5kmaqc6br")))) + (base32 "0id4g9slkciirmr442ygyb2044h3fhr5vavsy024g470qr6nz4vs")))) (build-system guile-build-system) (arguments (list #:source-directory "src" #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'set-load-paths-in-entry-point + (lambda _ + (define load-path + (cons (string-append #$output + "/share/guile/site/" + (target-guile-effective-version)) + (parse-path (getenv "GUILE_LOAD_PATH")))) + (define load-compiled-path + (cons (string-append #$output + "/lib/guile/" + (target-guile-effective-version) + "/site-ccache") + (parse-path (getenv "GUILE_LOAD_COMPILED_PATH")))) + (define search-paths-header + `(begin + (set! %load-path + (append (list ,@load-path) %load-path)) + (set! %load-compiled-path + (append (list ,@load-compiled-path) %load-compiled-path)))) + + (substitute* "src/guix/extensions/xsearch.scm" + ((";;@load-paths@") + (with-output-to-string (lambda () (write search-paths-header))))))) (add-after 'build 'add-extension-to-search-path (lambda _ (with-directory-excursion #$output (mkdir-p "share/guix/extensions") - (symlink (string-append #$output - "/share/guile/site/3.0/guix/extensions/xsearch.scm") - "share/guix/extensions/xsearch.scm"))))))) + (symlink + (string-append + #$output + "/share/guile/site/3.0/guix/extensions/xsearch.scm") + "share/guix/extensions/xsearch.scm"))))))) ;; Avoid setting guix as propagated so that we use the user’s profile. (native-inputs (list guile-3.0 guile-xapian guix)) - (propagated-inputs (list guile-xapian)) ;; This is very important since we want the extension to be available ;; without having to add a vanilla guix to the current profile. (native-search-paths -- cgit v1.3