guix-commits
[Top][All Lists]
Advanced

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

82/163: gnu: inkscape-1.0: Wrap with the new Guix PYTHONPATH.


From: guix-commits
Subject: 82/163: gnu: inkscape-1.0: Wrap with the new Guix PYTHONPATH.
Date: Mon, 25 Jan 2021 02:01:37 -0500 (EST)

apteryx pushed a commit to branch cu/farewell-to-pythonpath
in repository guix.

commit a01fa0a40afdd27e554dc072e7944cbf9180113f
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Jan 23 22:44:37 2021 -0500

    gnu: inkscape-1.0: Wrap with the new Guix PYTHONPATH.
    
    * gnu/packages/inkscape.scm (inkscape-1.0): Delete trailing #t.
    [phases]{wrap-program}: Wrap with the new Guix PYTHONPATH.
---
 gnu/packages/inkscape.scm | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
index 48dc46e..1b5de5d 100644
--- a/gnu/packages/inkscape.scm
+++ b/gnu/packages/inkscape.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Boris A. Dekshteyn <boris.dekshteyn@gmail.com>
 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;;
@@ -210,24 +210,24 @@ endif()~%~%"
            ;; Lift the requirement on the double-conversion library, as
            ;; it is only needed by lib2geom, which is now unbundled.
            (substitute* "CMakeScripts/DefineDependsandFlags.cmake"
-             ((".*find_package\\(DoubleConversion.*") ""))
-           #t))))
+             ((".*find_package\\(DoubleConversion.*") ""))))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #t
        #:test-target "check"            ;otherwise some test binaries are 
missing
        #:imported-modules (,@%cmake-build-system-modules
+                           (guix build python-build-system)
                            (guix build glib-or-gtk-build-system))
        #:modules ((guix build cmake-build-system)
                   ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+                  ((guix build python-build-system) #:select (guix-pythonpath))
                   (guix build utils))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-icon-cache-generator
            (lambda _
              (substitute* "share/icons/application/CMakeLists.txt"
-               (("gtk-update-icon-cache") "true"))
-             #t))
+               (("gtk-update-icon-cache") "true"))))
          (add-after 'unpack 'disable-latex-export-tests
            ;; FIXME: For some reason the test.pdf_tex file generated by the
            ;; "--export-latex" lacks "some text" in its content when run in
@@ -235,14 +235,12 @@ endif()~%~%"
            (lambda _
              (substitute* "testfiles/cli_tests/CMakeLists.txt"
                (("add_cli_test\\(export-latex")
-                "message(TEST_DISABLED: export-latex"))
-             #t))
+                "message(TEST_DISABLED: export-latex"))))
          (add-after 'unpack 'set-home
            ;; Mute Inkscape warnings during tests.
            (lambda _
              (setenv "HOME" (getcwd))
-             (format #t "ARGS is set to: ~a" (getenv "ARGS"))
-             #t))
+             (format #t "ARGS is set to: ~a" (getenv "ARGS"))))
          ;; Move the check phase after the install phase, as when run in the
          ;; tests, Inkscape relies on files that are not yet installed, such
          ;; as the "share/inkscape/ui/units.xml" file.
@@ -255,11 +253,11 @@ endif()~%~%"
            (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
          (add-after 'install 'wrap-program
            ;; Ensure Python is available at runtime.
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (pythonpath (guix-pythonpath inputs)))
                (wrap-program (string-append out "/bin/inkscape")
-                 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
-             #t)))))
+                 `(,python ":" prefix (,(getenv python))))))))))
     (inputs
      `(("aspell" ,aspell)
        ("autotrace" ,autotrace)



reply via email to

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