diff options
Diffstat (limited to 'guix/scripts/pack.scm')
-rw-r--r-- | guix/scripts/pack.scm | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index e0f9cc1a12..5fb6aaae0c 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -149,6 +149,11 @@ dependencies are registered." (define db-file (store-database-file #:state-directory #$output)) + ;; Make sure non-ASCII file names are properly handled. + (setenv "GUIX_LOCPATH" + #+(file-append glibc-utf8-locales "/lib/locale")) + (setlocale LC_ALL "en_US.utf8") + (sql-schema #$schema) (let ((items (append-map read-closure '#$labels))) (with-database db-file db @@ -181,6 +186,15 @@ added to the pack." (file-append (store-database (list profile)) "/db/db.sqlite"))) + (define set-utf8-locale + ;; Arrange to not depend on 'glibc-utf8-locales' when using '--bootstrap'. + (and (or (not (profile? profile)) + (profile-locales? profile)) + #~(begin + (setenv "GUIX_LOCPATH" + #+(file-append glibc-utf8-locales "/lib/locale")) + (setlocale LC_ALL "en_US.utf8")))) + (define build (with-imported-modules (source-module-closure `((guix build utils) @@ -226,6 +240,9 @@ added to the pack." "cf" "/dev/null" "--files-from=/dev/null" "--sort=name"))) + ;; Make sure non-ASCII file names are properly handled. + #+set-utf8-locale + ;; Add 'tar' to the search path. (setenv "PATH" #+(file-append archiver "/bin")) @@ -836,9 +853,10 @@ last resort for relocation." (scandir input)) (for-each build-wrapper - (append (find-files (string-append input "/bin")) - (find-files (string-append input "/sbin")) - (find-files (string-append input "/libexec"))))))) + ;; Note: Trailing slash in case these are symlinks. + (append (find-files (string-append input "/bin/")) + (find-files (string-append input "/sbin/")) + (find-files (string-append input "/libexec/"))))))) (computed-file (string-append (cond ((package? package) @@ -857,7 +875,10 @@ last resort for relocation." (item (apply wrapped-package (manifest-entry-item entry) (manifest-entry-output entry) - args)))) + args)) + (dependencies (map (lambda (entry) + (apply wrapped-manifest-entry entry args)) + (manifest-entry-dependencies entry))))) ;;; |