unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ESC/P-R package
@ 2017-10-28 22:32 Diego Nicola Barbato
  2017-10-29 15:16 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Diego Nicola Barbato @ 2017-10-28 22:32 UTC (permalink / raw)
  To: guix-devel

Hello,

I would like to create a package for the ESC/P-R printer driver.  The
recipe works on my machine (GuixSD on x86_64).  Yet I am not sure about
the source URL as it appears to break as soon as a new version is made
available because the old link is not preserved.  Should we get the
source from
http://http.debian.net/debian/pool/main/e/epson-inkjet-printer-escpr/
instead, even though it is an older version?

Greetings

Diego


diff -u ~/Programs/Guix/cups.scm.old ~/Programs/Guix/cups.scm
--- ~/Programs/Guix/cups.scm.old	2017-10-28 23:26:11.356064722 +0200
+++ ~/Programs/Guix/cups.scm	2017-10-29 00:03:38.820338060 +0200
@@ -599,3 +599,30 @@
 protocols, which cover printers made by Konica, HP (LaserJet), Oki, Samsung,
 and more.  See @file{README} for details.")
     (license license:gpl2+)))
+
+(define-public escpr
+  (package
+   (name "escpr")
+   (version "1.6.17")
+   ;; This currently works.  But it will break as soon as a newer
+   ;; version is available since the URLs for older versions are not
+   ;; preserved.  An alternative would be to download the source (for
+   ;; an older version) from this Debian repository:
+   ;; http://http.debian.net/debian/pool/main/e/epson-inkjet-printer-escpr/
+   (source (origin
+	    (method url-fetch)
+	    (uri "https://download3.ebz.epson.net/dsc/f/03/00/06/66/09/4ac2bf69bb1ddf4a9ad525596615cbb40fe4dad5/epson-inkjet-printer-escpr-1.6.17-1lsb3.2.tar.gz")
+	    (sha256
+	     (base32
+              "0m6v1wdavw4r25jfywqchsx0v9ss1l5fr8vq9d0d8cmjnz8mqblv"))))
+   (build-system gnu-build-system)
+   (arguments
+    `(#:configure-flags
+      `(,(string-append "--prefix=" (assoc-ref %outputs "out"))
+        ,(string-append "--with-cupsfilterdir=" (assoc-ref %outputs "out") "/lib/cups/filter")
+        ,(string-append "--with-cupsppddir=" (assoc-ref %outputs "out") "/share/ppd"))))
+   (inputs `(("cups" ,cups-minimal)))
+   (synopsis "ESC/P-R printer driver")
+   (description "ESC/P-R driver supporting a multitude of Epson printers.")
+   (home-page "http://download.ebz.epson.net/dsc/search/01/search")
+   (license license:gpl2+)))

Diff finished.  Sun Oct 29 00:04:01 2017

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ESC/P-R package
  2017-10-28 22:32 ESC/P-R package Diego Nicola Barbato
@ 2017-10-29 15:16 ` Ludovic Courtès
  2017-10-30 17:15   ` Diego Nicola Barbato
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2017-10-29 15:16 UTC (permalink / raw)
  To: Diego Nicola Barbato; +Cc: guix-devel

Hello Diego,

Diego Nicola Barbato <dnbarbato@posteo.de> skribis:

> I would like to create a package for the ESC/P-R printer driver.  The
> recipe works on my machine (GuixSD on x86_64).  Yet I am not sure about
> the source URL as it appears to break as soon as a new version is made
> available because the old link is not preserved.  Should we get the
> source from
> http://http.debian.net/debian/pool/main/e/epson-inkjet-printer-escpr/
> instead, even though it is an older version?

It would be ideal if you would find a mirror of the latest upstream
source at debian.org or anywhere else.  Then you can change your recipe
to include several URLs:

  (origin
    ;; …
    (uri (list "…epson.net…" "…debian.org…")))

Does that make sense?

When you’re ready I encourage you to follow
<https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html>
and send us the ‘git format-patch’-produced patch so we can incorporate it.

Thank you,
Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ESC/P-R package
  2017-10-29 15:16 ` Ludovic Courtès
@ 2017-10-30 17:15   ` Diego Nicola Barbato
  2017-11-08  8:01     ` Diego Nicola Barbato
  0 siblings, 1 reply; 4+ messages in thread
From: Diego Nicola Barbato @ 2017-10-30 17:15 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Hello Ludo,

ludo@gnu.org (Ludovic Courtès) writes:

> Hello Diego,
>
> Diego Nicola Barbato <dnbarbato@posteo.de> skribis:
>
>> I would like to create a package for the ESC/P-R printer driver.  The
>> recipe works on my machine (GuixSD on x86_64).  Yet I am not sure about
>> the source URL as it appears to break as soon as a new version is made
>> available because the old link is not preserved.  Should we get the
>> source from
>> http://http.debian.net/debian/pool/main/e/epson-inkjet-printer-escpr/
>> instead, even though it is an older version?
>
> It would be ideal if you would find a mirror of the latest upstream
> source at debian.org or anywhere else.  Then you can change your recipe
> to include several URLs:
>
>   (origin
>     ;; …
>     (uri (list "…epson.net…" "…debian.org…")))
>
> Does that make sense?

I agree that this would be ideal.  But as of now the latest version I
have found on a mirror is 1.6.16 (on the aforementioned Debian
repository) while the latest version is 1.6.17.  I could use the
epson.net source and add the one on debian.org as soon as it is updated
to the latest version.

> When you’re ready I encourage you to follow
> <https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html>
> and send us the ‘git format-patch’-produced patch so we can incorporate it.

Thank you for your feedback.  I apologise for not adhering to the
guidelines; this is my first contribution to a free software project.
If it is enough to add just the epson.net source for the time being I
will submit my patch as soon as possible and according to the manual.

Greetings

Diego

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ESC/P-R package
  2017-10-30 17:15   ` Diego Nicola Barbato
@ 2017-11-08  8:01     ` Diego Nicola Barbato
  0 siblings, 0 replies; 4+ messages in thread
From: Diego Nicola Barbato @ 2017-11-08  8:01 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 104 bytes --]

Hello Guix,

I have sent the following patch to the guix-patches mailing list
(29096@debbugs.gnu.org):


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: escpr patch --]
[-- Type: text/x-patch, Size: 2247 bytes --]

From 5d6449cc3cfc4154fff24abcdd54c05b44b9e471 Mon Sep 17 00:00:00 2001
From: Diego Nicola Barbato <dnbarbato@posteo.de>
Date: Wed, 1 Nov 2017 02:48:14 +0100
Subject: gnu: Add Epson escpr printer driver.

* gnu/packages/cups.scm (escpr): New variable.
---
 gnu/packages/cups.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 491668e52..54a93fe49 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -599,3 +599,35 @@ printer/driver specific, but spooler-independent PPD file.")
 protocols, which cover printers made by Konica, HP (LaserJet), Oki, Samsung,
 and more.  See @file{README} for details.")
     (license license:gpl2+)))
+
+(define-public escpr
+  (package
+    (name "escpr")
+    (version "1.6.17")
+    ;; This currently works.  But it will break as soon as a newer
+    ;; version is available since the URLs for older versions are not
+    ;; preserved.  An alternative source will be added as soon as
+    ;; available.
+    (source (origin
+              (method url-fetch)
+              ;; The uri has to be chopped up in order to satisfy guix lint.
+              (uri (string-append "https://download3.ebz.epson.net/dsc/f/03/00/06/66/09/"
+                                  "4ac2bf69bb1ddf4a9ad525596615cbb40fe4dad5/"
+                                  "epson-inkjet-printer-escpr-1.6.17-1lsb3.2.tar.gz"))
+              (sha256
+               (base32
+                "0m6v1wdavw4r25jfywqchsx0v9ss1l5fr8vq9d0d8cmjnz8mqblv"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       `(,(string-append "--prefix="
+                         (assoc-ref %outputs "out"))
+         ,(string-append "--with-cupsfilterdir="
+                         (assoc-ref %outputs "out") "/lib/cups/filter")
+         ,(string-append "--with-cupsppddir="
+                         (assoc-ref %outputs "out") "/share/ppd"))))
+    (inputs `(("cups" ,cups-minimal)))
+    (synopsis "ESC/P-R printer driver")
+    (description "ESC/P-R driver and PPDs supporting a multitude of Epson printers.")
+    (home-page "http://download.ebz.epson.net/dsc/search/01/search")
+    (license license:gpl2+)))
-- 
2.14.3


[-- Attachment #3: Type: text/plain, Size: 231 bytes --]


It appears to build reproducibly (at least on my system).  And I have
checked it with `guix lint'.  It passes all tests except `guix lint -c
source' which does not report an error but strangely crashes with the
following output:


[-- Attachment #4: guix lint error --]
[-- Type: text/plain, Size: 1247 bytes --]

~$ guix lint -c source escpr
Backtrace:scpr@1.6.17 [source]...
          13 (primitive-load "/gnu/store/19wpps1nmlg4j1530knl7kdhvgc…")
In guix/ui.scm:
  1384:12 12 (run-guix-command _ . _)
In srfi/srfi-1.scm:
    640:9 11 (for-each #<procedure 109e380 at guix/scripts/lint.scm…> …)
In guix/scripts/lint.scm:
   1062:4 10 (run-checkers #<package escpr@1.6.17 cups.scm:604 1b1a…> …)
In srfi/srfi-1.scm:
    640:9  9 (for-each #<procedure 23fac00 at guix/scripts/lint.scm…> …)
In guix/scripts/lint.scm:
    673:4  8 (check-source #<package escpr@1.6.17 cups.scm:604 1b1ad…>)
In guix/monads.scm:
    553:0  7 (_ _)
In guix/scripts/lint.scm:
   109:38  6 (_ ())
    543:7  5 (validate-uri _ #<package escpr@1.6.17 cups.scm:604 1b…> …)
    96:17  4 (emit-warning #<package escpr@1.6.17 cups.scm:604 1b1a…> …)
In ice-9/boot-9.scm:
    837:9  3 (catch system #<procedure 22c3660 at guix/packages.scm…> …)
In guix/packages.scm:
   355:11  2 (_)
In ice-9/ports.scm:
   439:11  1 (call-with-input-file #f #<procedure 22c3630 at guix/p…> …)
In unknown file:
           0 (open-file #f "r" #:encoding #f #:guess-encoding #f)

ERROR: In procedure open-file:
ERROR: Wrong type (expecting string): #f

[-- Attachment #5: Type: text/plain, Size: 310 bytes --]


I have not yet found an alternative source.  But the current one works
(except for the `guix lint' error).  I will try to send a patch as soon
as the URI changes or the source is made available on this Debian
repository:
http://http.debian.net/debian/pool/main/e/epson-inkjet-printer-escpr/

Greetings

Diego

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-08  8:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-28 22:32 ESC/P-R package Diego Nicola Barbato
2017-10-29 15:16 ` Ludovic Courtès
2017-10-30 17:15   ` Diego Nicola Barbato
2017-11-08  8:01     ` Diego Nicola Barbato

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).