From 2409816e83098d572d099a10e45129d56ba2a607 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 25 Aug 2022 13:07:38 +0800
Subject: [PATCH 8/9] gnu: Add python-pyside-6-tools
* gnu/packages/qt.scm (python-pyside-6-tools): New variable.
---
gnu/packages/qt.scm | 39 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
@@ -4043,7 +4043,7 @@ (define-public python-pyside-2-tools
#:configure-flags
#~(list "-DBUILD_TESTS=off"
(string-append "-DPYTHON_EXECUTABLE="
- #$(this-package-native-inputs "python-wrapper")
+ #$(this-package-native-input "python-wrapper")
"/bin/python"))
#:phases
#~(modify-phases %standard-phases
@@ -4056,6 +4056,43 @@ (define-public python-pyside-2-tools
"Python-pyside-2-tools contains lupdate, rcc and uic tools for PySide2")
(license license:gpl2)))
+(define-public python-pyside-6-tools
+ (package
+ (inherit python-pyside-2-tools)
+ (name "python-pyside-6-tools")
+ (version (package-version python-shiboken-6))
+ (source (package-source python-shiboken-6))
+ (build-system cmake-build-system)
+ (inputs
+ (list python-pyside-6
+ python-shiboken-6
+ qtbase
+ qtdeclarative
+ qttools))
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-pyside-2-tools)
+ ((#:phases p)
+ #~(modify-phases #$p
+ (replace 'go-to-source-dir
+ (lambda _ (chdir "sources/pyside-tools") #t))
+ (add-after 'go-to-source-dir 'fix-missing-tools
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "CMakeLists.txt"
+ (("\\$\\{LIBEXEC_PATH\\}/(.+)\\$" all bin)
+ (string-append
+ (search-input-file
+ inputs (string-append "lib/qt6/libexec/" bin))
+ "$"))
+ (("\\$\\{TOOLS_PATH\\}/(.+)\\$" all bin)
+ (string-append
+ (search-input-file
+ inputs (string-append "bin/" bin))
+ "$")))))))))
+ (synopsis
+ "Command line tools for PySide6")
+ (description
+ "Python-pyside-6-tools contains lupdate, rcc and uic tools for PySide6.")))
+
(define-public libqglviewer
(package
(name "libqglviewer")
--
2.37.2