guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: make-mozilla-with-l10n: Use the copy-build-s


From: guix-commits
Subject: branch master updated: gnu: make-mozilla-with-l10n: Use the copy-build-system.
Date: Thu, 02 Mar 2023 16:11:51 -0500

This is an automated email from the git hooks/post-receive script.

apteryx pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 89e5f3f384 gnu: make-mozilla-with-l10n: Use the copy-build-system.
89e5f3f384 is described below

commit 89e5f3f3847b3bfd507ea9f0874a73f99a53cbf9
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Thu Mar 2 15:39:55 2023 -0500

    gnu: make-mozilla-with-l10n: Use the copy-build-system.
    
    Fixes <https://issues.guix.gnu.org/61742>.
    
    * gnu/packages/gnuzilla.scm (make-mozilla-with-l10n): Rewrite to use the
    copy-build-system.
    
    Reported-by: Feng Shu <tumashu@163.com>
---
 gnu/packages/gnuzilla.scm | 91 +++++++++++++++++++++++++----------------------
 1 file changed, 48 insertions(+), 43 deletions(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 5a2e716042..2707fe6230 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -50,8 +50,9 @@
   #:use-module (guix modules)
   #:use-module (guix monads)
   #:use-module (guix utils)
-  #:use-module (guix build-system gnu)
   #:use-module (guix build-system cargo)
+  #:use-module (guix build-system copy)
+  #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages audio)
@@ -1681,51 +1682,55 @@ associated with their name."))
     (package
       (inherit base)
       (name (symbol->string project))
-      (build-system trivial-build-system)
+      ;; Use the copy-build-system, as it provides the necessary UTF-8 locales
+      ;; support.
+      (build-system copy-build-system)
       (arguments
        (list
-        #:modules '((guix build union)
+        #:imported-modules `(,@%copy-build-system-modules
+                             (guix build union))
+        #:modules '((guix build copy-build-system)
+                    (guix build union)
                     (guix build utils))
-        #:builder
-        #~(begin
-            (use-modules (guix build union)
-                         (guix build utils))
-
-            (union-build #$output (list #$base #$l10n-package)
-                         #:create-all-directories? #t)
-
-            (define* (expose name #:optional (proc copy-file)
-                             #:key (source #$base))
-              (let ((dest (string-append #$output "/" name)))
-                (mkdir-p (dirname dest))
-                (proc (string-append source "/" name) dest)))
-
-            (let ((wrapper (string-append "lib/" #$name "/" #$name))
-                  (real-binary (string-append "lib/" #$name "/." #$name
-                                              "-real"))
-                  (desktop-file (string-append "share/applications/"
-                                               #$name ".desktop")))
-              ;; Copy wrapper file.
-              (delete-file (string-append #$output "/" wrapper))
-              (expose wrapper)
-
-              ;; Recreate bin symlink.
-              (delete-file (string-append #$output "/bin/" #$name))
-              (symlink (string-append #$output "/" wrapper)
-                       (string-append #$output "/bin/" #$name))
-
-              ;; Copy actual binary.
-              (delete-file (string-append #$output "/" real-binary))
-              (expose real-binary)
-
-              ;; Copy desktop file.
-              (delete-file (string-append #$output "/" desktop-file))
-              (expose desktop-file)
-
-              ;; Adjust the references in the desktop file and wrapper.
-              (substitute* (list (string-append #$output "/" desktop-file)
-                                 (string-append #$output "/" wrapper))
-                ((#$base) #$output)))))))))
+        #:phases
+        #~(modify-phases %standard-phases
+            (replace 'install
+              (lambda _
+                (union-build #$output (list #$base #$l10n-package)
+                             #:create-all-directories? #t)
+
+                (define* (expose name #:optional (proc copy-file)
+                                 #:key (source #$base))
+                  (let ((dest (string-append #$output "/" name)))
+                    (mkdir-p (dirname dest))
+                    (proc (string-append source "/" name) dest)))
+
+                (let ((wrapper (string-append "lib/" #$name "/" #$name))
+                      (real-binary (string-append "lib/" #$name "/." #$name
+                                                  "-real"))
+                      (desktop-file (string-append "share/applications/"
+                                                   #$name ".desktop")))
+                  ;; Copy wrapper file.
+                  (delete-file (string-append #$output "/" wrapper))
+                  (expose wrapper)
+
+                  ;; Recreate bin symlink.
+                  (delete-file (string-append #$output "/bin/" #$name))
+                  (symlink (string-append #$output "/" wrapper)
+                           (string-append #$output "/bin/" #$name))
+
+                  ;; Copy actual binary.
+                  (delete-file (string-append #$output "/" real-binary))
+                  (expose real-binary)
+
+                  ;; Copy desktop file.
+                  (delete-file (string-append #$output "/" desktop-file))
+                  (expose desktop-file)
+
+                  ;; Adjust the references in the desktop file and wrapper.
+                  (substitute* (list (string-append #$output "/" desktop-file)
+                                     (string-append #$output "/" wrapper))
+                    ((#$base) #$output)))))))))))
 
 (define-public icecat
   (make-mozilla-with-l10n 'icecat icecat-minimal icecat-l10n))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]