From 801e4315b1ef24fc18cf61169b42443eb221e924 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 24 Aug 2022 22:57:44 +0800 Subject: [PATCH 5/9] gnu: python-pyside-2: Use "this-package-input" instead of "assoc-ref". * gnu/packages/qt.scm (python-pyside-2)[arguments]<#:configure-flags>: Use "this-package-input" <#:phases>: In phase "fix-qt-module-detection", use "this-package-input". --- gnu/packages/qt.scm | 46 +++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index dd1e2d4640..bc16f69e60 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3880,7 +3880,7 @@ (define-public python-pyside-2 #:configure-flags #~(list "-DBUILD_TESTS=FALSE" (string-append "-DPYTHON_EXECUTABLE=" - (assoc-ref %build-inputs "python") + #$(this-package-native-input "python-wrapper") "/bin/python")) #:modules '((guix build cmake-build-system) (guix build utils) @@ -3890,33 +3890,35 @@ (define-public python-pyside-2 (add-after 'unpack 'go-to-source-dir (lambda _ (chdir "sources/pyside2") #t)) (add-after 'go-to-source-dir 'fix-qt-module-detection - (lambda* (#:key inputs #:allow-other-keys) + (lambda _ ;; Activate qt module support even if it not in the same ;; directory as qtbase. (substitute* "../cmake_helpers/helpers.cmake" (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)") "true")) ;; Add include directories for qt modules. - (let ((dirs (map (lambda (name) - (string-append (assoc-ref inputs name) - "/include/qt5")) - '("qtdatavis3d" - "qtdeclarative" - "qtlocation" - "qtmultimedia" - "qtquickcontrols" - "qtquickcontrols2" - "qtscript" - "qtscxml" - "qtsensors" - "qtspeech" - "qtsvg" - "qttools-5" - "qtwebchannel" - "qtwebengine" - "qtwebsockets" - "qtx11extras" - "qtxmlpatterns")))) + (let ((dirs (map (lambda (path) + (string-append path "/include/qt5")) + (list + #$@(map (lambda (name) + (this-package-input name)) + '("qtdatavis3d" + "qtdeclarative" + "qtlocation" + "qtmultimedia" + "qtquickcontrols" + "qtquickcontrols2" + "qtscript" + "qtscxml" + "qtsensors" + "qtspeech" + "qtsvg" + "qttools" + "qtwebchannel" + "qtwebengine" + "qtwebsockets" + "qtx11extras" + "qtxmlpatterns")))))) (substitute* "cmake/Macros/PySideModules.cmake" (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all) (fold (lambda (dir paths) -- 2.37.2