guix-commits
[Top][All Lists]
Advanced

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

120/131: gnu: hplip: Adjust to use GUIX_PYTHONPATH.


From: guix-commits
Subject: 120/131: gnu: hplip: Adjust to use GUIX_PYTHONPATH.
Date: Mon, 1 Feb 2021 11:57:05 -0500 (EST)

apteryx pushed a commit to branch core-updates
in repository guix.

commit 6275b9bc2e6b2aeac513e8bd3414aa999cb44471
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Wed Jan 27 20:49:38 2021 -0500

    gnu: hplip: Adjust to use GUIX_PYTHONPATH.
    
    * gnu/packages/cups.scm (hplip): Delete trailing #t.
    [phases]{wrap-binaries}: Streamline and use GUIX_PYTHONPATH.
---
 gnu/packages/cups.scm | 25 +++++++++----------------
 1 file changed, 9 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 9b00fe1..86ce31a 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2017 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -445,8 +446,7 @@ should only be used as part of the Guix cups-pk-helper 
service.")
                     (("^dat2drvdir =.*")
                      "dat2drvdir = $(pkglibexecdir)\n")
                     (("^locatedriverdir =.*")
-                     "locatedriverdir = $(pkglibexecdir)\n"))
-                  #t))))
+                     "locatedriverdir = $(pkglibexecdir)\n"))))))
     (build-system gnu-build-system)
     (outputs (list "out" "ppd"))
     (home-page "https://developers.hp.com/hp-linux-imaging-and-printing";)
@@ -534,8 +534,7 @@ should only be used as part of the Guix cups-pk-helper 
service.")
                   (string-append "rulessystemdir = " out
                                  "/lib/systemd/system"))
                  (("/etc/sane.d")
-                  (string-append out "/etc/sane.d")))
-               #t)))
+                  (string-append out "/etc/sane.d"))))))
          (add-before 'configure 'fix-build-with-python-3.8
            (lambda* (#:key inputs #:allow-other-keys)
              (let ((python (assoc-ref inputs "python")))
@@ -546,15 +545,13 @@ should only be used as part of the Guix cups-pk-helper 
service.")
                  (setenv "C_INCLUDE_PATH"
                          (string-append python "/include/python"
                                         (python:python-version python)
-                                        ":" (getenv "C_INCLUDE_PATH"))))
-               #t)))
+                                        ":" (getenv "C_INCLUDE_PATH")))))))
          (add-after 'install 'install-models-dat
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (models-dir (string-append out
                                                "/share/hplip/data/models")))
-               (install-file "data/models/models.dat" models-dir))
-             #t))
+               (install-file "data/models/models.dat" models-dir))))
          (add-after 'install 'wrap-binaries
            ;; Scripts in /bin are all symlinks to .py files in /share/hplip.
            ;; Symlinks are immune to the Python build system's 'WRAP phase,
@@ -565,7 +562,7 @@ should only be used as part of the Guix cups-pk-helper 
service.")
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (bin (string-append out "/bin"))
-                    (python (assoc-ref inputs "python")))
+                    (site (python:site-packages inputs outputs)))
                (with-directory-excursion bin
                  (for-each (lambda (file)
                              (let ((target (readlink file)))
@@ -574,19 +571,15 @@ should only be used as part of the Guix cups-pk-helper 
service.")
                                  (lambda _
                                    (format #t
                                            "#!~a~@
-                                           export PYTHONPATH=\"~a:~a\"~@
+                                           export GUIX_PYTHONPATH=\"~a:~a\"~@
                                            exec -a \"$0\" \"~a/~a\" \"$@\"~%"
                                            (which "bash")
-                                           (string-append
-                                            out "/lib/python"
-                                            (python:python-version python)
-                                            "/site-packages")
+                                           site
                                            (getenv "GUIX_PYTHONPATH")
                                            bin target)))
                                (chmod file #o755)))
                   (find-files "." (lambda (file stat)
-                                    (eq? 'symlink (stat:type stat)))))
-                 #t)))))))
+                                    (eq? 'symlink (stat:type stat))))))))))))
 
     ;; Note that the error messages printed by the tools in the case of
     ;; missing dependencies are often downright misleading.



reply via email to

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