diff mbox series

[bug#65139,2/3] gnu: Add pyotherside-for-qt5.

Message ID 4db489d46ef60fcbf9bfe1ae580a99789e5f9c4d.1691468046.git.maxim.cournoyer@gmail.com
State New
Headers show
Series Add yubikey-manager-qt. | expand

Commit Message

Maxim Cournoyer Aug. 8, 2023, 4:14 a.m. UTC
* gnu/packages/qt.scm (pyotherside-for-qt5): New variable.
---

 gnu/packages/qt.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 581df38eaa..1184a85938 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -3264,6 +3264,29 @@  (define-public pyotherside
 Python.")
     (license license:isc)))
 
+(define-public pyotherside-for-qt5
+  (package/inherit pyotherside
+    (name "pyotherside-for-qt5")
+    (arguments
+     (substitute-keyword-arguments (package-arguments pyotherside)
+       ((#:qtbase _ #f)
+        qtbase-5)
+       ((#:phases phases '%standard-phases)
+        #~(modify-phases #$phases
+            (replace 'fix-installation-prefix
+              (lambda _
+                ;; The QT_INSTALL_QML property points to the qtbase
+                ;; installation prefix.
+                (substitute* "src/src.pro"
+                  (("\\$\\$\\[QT_INSTALL_QML]")
+                   (string-append #$output "/lib/qt"
+                                  #$(version-major (package-version qtbase-5))
+                                  "/qml")))))))))
+    (inputs (modify-inputs (package-inputs pyotherside)
+              (replace "qtdeclarative" qtdeclarative-5)
+              (replace "qtquickcontrols2" qtquickcontrols-5)
+              (replace "qtsvg" qtsvg-5)))))
+
 (define-public python-sip
   (package
     (name "python-sip")