diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2025-11-18 23:29:58 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2025-11-19 09:42:14 +0900 |
| commit | f5bb4d7d241950f90216ba7c311b7772f32d7ea4 (patch) | |
| tree | bf4ebac9dcb9fdb54fcf5f56744568ddff4aed0c | |
| parent | 8498a2b2748680b2aa17585506f2d1b68e9ce349 (diff) | |
profiles: Handle Zstd-compressed Info files in the profile hook.
* guix/profiles.scm (info-dir-file): Register the .info.zst file extension.
Remove gzip from the environment; both gzip and unzstd are captured directly
by texinfo.
Change-Id: Ie150507de5b5865612a6205d2aeb83a940272a87
| -rw-r--r-- | guix/profiles.scm | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm index 831f69b11c9..871ffee0bad 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | ;;; Copyright © 2016, 2017, 2018, 2019, 2021, 2022 Ricardo Wurmus <rekado@elephly.net> | 7 | ;;; Copyright © 2016, 2017, 2018, 2019, 2021, 2022 Ricardo Wurmus <rekado@elephly.net> |
| 8 | ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com> | 8 | ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com> |
| 9 | ;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com> | 9 | ;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com> |
| 10 | ;;; Copyright © 2017, 2021, 2024 Maxim Cournoyer <maxim@guixotic.coop> | 10 | ;;; Copyright © 2017, 2021, 2024-2025 Maxim Cournoyer <maxim@guixotic.coop> |
| 11 | ;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com> | 11 | ;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com> |
| 12 | ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> | 12 | ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> |
| 13 | ;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org> | 13 | ;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org> |
| @@ -1006,11 +1006,9 @@ if not found." | |||
| 1006 | (define* (info-dir-file manifest #:optional system) | 1006 | (define* (info-dir-file manifest #:optional system) |
| 1007 | "Return a derivation that builds the 'dir' file for all the entries of | 1007 | "Return a derivation that builds the 'dir' file for all the entries of |
| 1008 | MANIFEST." | 1008 | MANIFEST." |
| 1009 | (define texinfo ;lazy reference | 1009 | (define texinfo ;lazy reference |
| 1010 | (module-ref (resolve-interface '(gnu packages texinfo)) 'texinfo)) | 1010 | (module-ref (resolve-interface '(gnu packages texinfo)) 'texinfo)) |
| 1011 | (define gzip ;lazy reference | 1011 | (define libc-utf8-locales-for-target ;lazy reference |
| 1012 | (module-ref (resolve-interface '(gnu packages compression)) 'gzip)) | ||
| 1013 | (define libc-utf8-locales-for-target ;lazy reference | ||
| 1014 | (module-ref (resolve-interface '(gnu packages base)) | 1012 | (module-ref (resolve-interface '(gnu packages base)) |
| 1015 | 'libc-utf8-locales-for-target)) | 1013 | 'libc-utf8-locales-for-target)) |
| 1016 | 1014 | ||
| @@ -1022,8 +1020,9 @@ MANIFEST." | |||
| 1022 | (ice-9 ftw)) | 1020 | (ice-9 ftw)) |
| 1023 | 1021 | ||
| 1024 | (define (info-file? file) | 1022 | (define (info-file? file) |
| 1025 | (or (string-suffix? ".info" file) | 1023 | (or (string-suffix? ".info.zst" file) |
| 1026 | (string-suffix? ".info.gz" file))) | 1024 | (string-suffix? ".info.gz" file) |
| 1025 | (string-suffix? ".info" file))) | ||
| 1027 | 1026 | ||
| 1028 | (define (info-files top) | 1027 | (define (info-files top) |
| 1029 | (let ((infodir (string-append top "/share/info"))) | 1028 | (let ((infodir (string-append top "/share/info"))) |
| @@ -1031,9 +1030,12 @@ MANIFEST." | |||
| 1031 | (or (scandir infodir info-file?) '())))) | 1030 | (or (scandir infodir info-file?) '())))) |
| 1032 | 1031 | ||
| 1033 | (define (info-file-language file) | 1032 | (define (info-file-language file) |
| 1034 | (let* ((base (if (string-suffix? ".gz" file) | 1033 | (let* ((base (cond ((string-suffix? ".zst" file) |
| 1035 | (basename file ".info.gz") | 1034 | (basename file ".info.zst")) |
| 1036 | (basename file ".info"))) | 1035 | ((string-suffix? ".gz" file) |
| 1036 | (basename file ".info.gz")) | ||
| 1037 | (else | ||
| 1038 | (basename file ".info")))) | ||
| 1037 | (dot (string-rindex base #\.))) | 1039 | (dot (string-rindex base #\.))) |
| 1038 | (if dot | 1040 | (if dot |
| 1039 | (string-drop base (+ 1 dot)) | 1041 | (string-drop base (+ 1 dot)) |
| @@ -1052,7 +1054,6 @@ MANIFEST." | |||
| 1052 | '("") | 1054 | '("") |
| 1053 | `("." ,language))))))) | 1055 | `("." ,language))))))) |
| 1054 | 1056 | ||
| 1055 | (setenv "PATH" (string-append #+gzip "/bin")) ;for info.gz files | ||
| 1056 | (setenv "GUIX_LOCPATH" | 1057 | (setenv "GUIX_LOCPATH" |
| 1057 | #+(file-append (libc-utf8-locales-for-target system) | 1058 | #+(file-append (libc-utf8-locales-for-target system) |
| 1058 | "/lib/locale")) | 1059 | "/lib/locale")) |
