summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-05-04 17:27:17 +0200
committerMarius Bakke <mbakke@fastmail.com>2020-05-04 17:27:17 +0200
commit68c7f577d8cbb1a11a812e36c7ae1e34ccc57e62 (patch)
treec512c86c6bcdd33a0698e42624526b4b0ac0732c
parentf7d34fcd7ce81968d282d8cb6145536241dda2fd (diff)
downloadguix-68c7f577d8cbb1a11a812e36c7ae1e34ccc57e62.tar.gz
gnu: hplip: Fix build with Python 3.8.
* gnu/packages/cups.scm (hplip)[arguments]: Add phase "fix-build-with-python-3.8".
-rw-r--r--gnu/packages/cups.scm16
1 files changed, 15 insertions, 1 deletions
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 9161b7bccb..b253d0604e 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
 ;;; 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>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -536,7 +537,20 @@ 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"))))))
+                  (string-append out "/etc/sane.d")))
+               #t)))
+         (add-before 'configure 'fix-build-with-python-3.8
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((python (assoc-ref inputs "python")))
+               ;; XXX: The configure script of looks for Python headers in the
+               ;; wrong places as of version 3.20.3.  Help it by adding the
+               ;; include directory on C_INCLUDE_PATH.
+               (when python
+                 (setenv "C_INCLUDE_PATH"
+                         (string-append python "/include/python"
+                                        (python:python-version python)
+                                        ":" (getenv "C_INCLUDE_PATH"))))
+               #t)))
          (add-after 'install 'install-models-dat
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))