guix-commits
[Top][All Lists]
Advanced

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

01/02: gnu: Add hplip-next.


From: guix-commits
Subject: 01/02: gnu: Add hplip-next.
Date: Sat, 18 Feb 2023 16:09:20 -0500 (EST)

apteryx pushed a commit to branch master
in repository guix.

commit 185e8ac8cc52669fe1a94954f2a944abd3dde2f5
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Feb 18 15:55:10 2023 -0500

    gnu: Add hplip-next.
    
    * gnu/packages/cups.scm (hplip-next): New variable.
---
 gnu/packages/cups.scm | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index c729363fe8..259805b98a 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2017 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017–2022 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -696,6 +696,33 @@ should only be used as part of the Guix cups-pk-helper 
service.")
     (native-inputs
      (list perl pkg-config))))
 
+;;; TODO: Integrate in base hplip package on core-updates.
+(define-public hplip-next
+  (package
+    (inherit hplip)
+    (name "hplip")
+    (version "3.21.10")
+    (source (origin
+              (inherit (package-source hplip))
+              (uri (string-append "mirror://sourceforge/hplip/hplip/" version
+                                  "/hplip-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0q3adcp8iygravp4bq4gw14jk20c5rhnawj1333qyw8yvlghw8yy"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments hplip)
+       ((#:phases phases)
+        #~(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"))))))))))))
+
 (define-public hplip-minimal
   (package/inherit hplip
     (name "hplip-minimal")



reply via email to

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