guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gnu: hplip-next: Simplify the fix-more-hard-coded


From: guix-commits
Subject: branch master updated: gnu: hplip-next: Simplify the fix-more-hard-coded-file-names phase.
Date: Sun, 19 Feb 2023 10:45:21 -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 636b771536 gnu: hplip-next: Simplify the 
fix-more-hard-coded-file-names phase.
636b771536 is described below

commit 636b771536b95d15a2fd68b468deeebac97d6bee
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sun Feb 19 09:14:17 2023 -0500

    gnu: hplip-next: Simplify the fix-more-hard-coded-file-names phase.
    
    * gnu/packages/cups.scm (hplip-next) [phases]: Only substitute python files 
in
    the fix-more-hard-coded-file-names phase.  This greatly reduce the time 
taken
    by the phase (from 21 s to 0.4 s) on my system, and is functionally
    equivalent.
---
 gnu/packages/cups.scm | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index f1007ea03b..08677d612a 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -715,13 +715,10 @@ should only be used as part of the Guix cups-pk-helper 
service.")
         #~(modify-phases #$phases
             (add-after 'unpack 'fix-more-hard-coded-file-names
               (lambda* (#:key outputs #:allow-other-keys)
-                ;; Set the encoding to ISO-8859-1, as not all the files are
-                ;; readable as UTF-8.
-                (with-fluids ((%default-port-encoding "ISO-8859-1"))
-                  (substitute* (find-files ".")
-                    (("/etc/hp/hplip.conf")
-                     (string-append (assoc-ref outputs "out")
-                                    "/etc/hp/hplip.conf"))))))))))))
+                (substitute* (find-files "." "\\.py$")
+                  (("/etc/hp/hplip.conf")
+                   (string-append (assoc-ref outputs "out")
+                                  "/etc/hp/hplip.conf")))))))))))
 
 (define-public hplip-minimal
   (package/inherit hplip



reply via email to

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