GNU bug report logs - #42758
[PATCH] gnu: foo2zjs: Fix install phase.

Previous Next

Package: guix-patches;

Reported by: "Boris A. Dekshteyn" <boris.dekshteyn <at> gmail.com>

Date: Sat, 8 Aug 2020 08:10:01 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42758 in the body.
You can then email your comments to 42758 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#42758; Package guix-patches. (Sat, 08 Aug 2020 08:10:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Boris A. Dekshteyn" <boris.dekshteyn <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 08 Aug 2020 08:10:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Boris A. Dekshteyn" <boris.dekshteyn <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: "Boris A. Dekshteyn" <boris.dekshteyn <at> gmail.com>
Subject: [PATCH] gnu: foo2zjs: Fix install phase.
Date: Sat,  8 Aug 2020 20:09:18 +1200
* gnu/packages/cups.scm (foo2zjs): Fix install phase

Existed package definition builds fine, but de-facto it doesn't work
as expected. This quick and dirty patch make it's functional (tested with
HP LJ M1005, at least i'am able to add printer, configure, and print test
page through cups web interface), but needs some further work (fix and install
udev rules and hotplug helper) to make it fully functional.
---
 gnu/packages/cups.scm | 39 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 281c2718e8..899ea594f3 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -28,6 +28,7 @@
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages avahi)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages fonts)     ; font-dejavu
   #:use-module (gnu packages fontutils)
@@ -716,6 +717,40 @@ printer/driver specific, but spooler-independent PPD file.")
                         (("^MODTIME[[:blank:]]*=.*$")
                          "MODTIME = echo Thu Jan 01 01:00:00 1970\n"))
                       #t))
+                  (add-before 'install 'make-install-dirs
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      ;; Make missing install dirs
+                      (let ((out (assoc-ref outputs "out"))
+                            (dirs '("/share/cups/model"
+                                    "/share/foomatic/db/source/opt"
+                                    "/share/foomatic/db/source/printer"
+                                    "/share/foomatic/db/source/driver"
+                                    "/lib/cups/filter")))
+                        (for-each (lambda (dir)
+                                    (mkdir-p (string-append out dir)))
+                                  dirs))))
+                  (add-after 'install 'wrap-wrappers
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out"))
+                            (ghostscript (assoc-ref inputs "ghostscript"))
+                            (coreutils (assoc-ref inputs "coreutils"))
+                            (sed (assoc-ref inputs "sed")))
+                        (for-each (lambda (file)
+                                    (wrap-program file
+                                      `("PATH" ":" prefix
+                                        (,(string-append ghostscript "/bin:"
+                                                         coreutils "/bin:"
+                                                         sed "/bin")))))
+                                  (find-files (string-append
+                                               out "/bin") "wrapper$")))))
+                  (add-after 'install 'install-cups-filters-symlinks
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (for-each
+                         (lambda (file)
+                           (symlink file
+                                    (string-append out "/lib/cups/filter/" (basename file))))
+                         (find-files (string-append out "/bin"))))))
                   (add-after 'install 'remove-pdf
                     (lambda* (#:key outputs #:allow-other-keys)
                       ;; Remove 'manual.pdf' which is (1) useless (it's a
@@ -729,7 +764,9 @@ printer/driver specific, but spooler-independent PPD file.")
        #:tests? #f                                ;no tests
        #:make-flags '("CC=gcc")))
     (inputs
-     `(("ghostscript" ,ghostscript)
+     `(("coreutils" ,coreutils)
+       ("sed" ,sed)
+       ("ghostscript" ,ghostscript)
        ("foomatic-filters" ,foomatic-filters)))   ;for 'foomatic-rip'
     (native-inputs
      `(("bc" ,bc)
-- 
2.28.0





Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Tue, 15 Dec 2020 21:54:02 GMT) Full text and rfc822 format available.

Notification sent to "Boris A. Dekshteyn" <boris.dekshteyn <at> gmail.com>:
bug acknowledged by developer. (Tue, 15 Dec 2020 21:54:02 GMT) Full text and rfc822 format available.

Message #10 received at 42758-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: "Boris A. Dekshteyn" <boris.dekshteyn <at> gmail.com>
Cc: 42758-done <at> debbugs.gnu.org
Subject: Re: [bug#42758] [PATCH] gnu: foo2zjs: Fix install phase.
Date: Tue, 15 Dec 2020 16:53:01 -0500
On Sat, Aug 08, 2020 at 08:09:18PM +1200, Boris A. Dekshteyn wrote:
> * gnu/packages/cups.scm (foo2zjs): Fix install phase
> 
> Existed package definition builds fine, but de-facto it doesn't work
> as expected. This quick and dirty patch make it's functional (tested with
> HP LJ M1005, at least i'am able to add printer, configure, and print test
> page through cups web interface), but needs some further work (fix and install
> udev rules and hotplug helper) to make it fully functional.

Thanks! I satisfied the linter and made the commit message more
descriptive, and pushed as cf066b7a4eb1426b17442e0bcb779e7d7ff4e150.

I hope you will find time for the "further work" :)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Jan 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 103 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.