(define-module (vfx packages qt)
#:use-module (gnu packages)
#:use-module (gnu packages python)
#:use-module (gnu packages qt)
#:use-module (guix)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix licenses:))
(define-public python-pyside-6-tools
(package
(name "python-pyside-6-tools")
(version (package-version python-shiboken-6))
(source (package-source python-shiboken-6))
(build-system cmake-build-system)
(native-inputs
(list python-wrapper qtbase qtdeclarative qttools))
(inputs
(list python-pyside-6 python-shiboken-6))
(arguments
(list
#:tests? #f
#:configure-flags
#~(list "-DBUILD_TESTS=off"
(string-append "-DPYTHON_EXECUTABLE="
(search-input-file %build-inputs
"/bin/python")))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'go-to-source-dir
(lambda _ (chdir "sources/pyside-tools")))
(add-after 'go-to-source-dir 'set-paths-for-guix
(lambda _
(substitute* "CMakeLists.txt"
(("\\$\\{LIBEXEC_PATH\\}/qmltyperegistrar")
(string-append
(assoc-ref %build-inputs "qtdeclarative")
"/lib/qt6/libexec/qmltyperegistrar"))
(("\\$\\{TOOLS_PATH\\}/lrelease")
(string-append
(assoc-ref %build-inputs "qttools")
"/bin/lrelease"))
(("\\$\\{TOOLS_PATH\\}/lupdate")
(string-append
(assoc-ref %build-inputs "qttools")
"/bin/lupdate"))
(("\\$\\{TOOLS_PATH\\}/qmllint")
(string-append
(assoc-ref %build-inputs "qtdeclarative")
"/bin/qmllint"))
(("\\$\\{TOOLS_PATH\\}/assistant")
(string-append
(assoc-ref %build-inputs "qttools")
"/bin/assistant"))
(("\\$\\{TOOLS_PATH\\}/designer")
(string-append
(assoc-ref %build-inputs "qttools")
"/bin/designer"))
(("\\$\\{TOOLS_PATH\\}/linguist")
(string-append
(assoc-ref %build-inputs "qttools")
"/bin/linguist"))))))))
(home-page "https://wiki.qt.io/Qt_for_Python")
(synopsis
"Command line tools for PySide6")
(description
"Python-pyside-6-tools contains lupdate, rcc and uic tools for PySide6")
(license licenses:gpl2)))