all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#65139] [PATCH 1/3] gnu: Add pyotherside.
       [not found] <cover.1691468046.git.maxim.cournoyer@gmail.com>
@ 2023-08-08  4:14 ` Maxim Cournoyer
  2023-08-09  7:51   ` Andreas Enge
  2023-08-08  4:14 ` [bug#65139] [PATCH 2/3] gnu: Add pyotherside-for-qt5 Maxim Cournoyer
  2023-08-08  4:14 ` [bug#65139] [PATCH 3/3] gnu: Add yubikey-manager-qt Maxim Cournoyer
  2 siblings, 1 reply; 5+ messages in thread
From: Maxim Cournoyer @ 2023-08-08  4:14 UTC (permalink / raw)
  To: 65139
  Cc: Maxim Cournoyer, Andreas Enge, Maxim Cournoyer,
	宋文武

* gnu/packages/qt.scm (pyotherside): New variable.
---

 gnu/packages/qt.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 5d7af0d0c8..581df38eaa 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -3215,6 +3215,55 @@ (define-public single-application-qt5
 instances.")
       (license license:expat))))
 
+(define-public pyotherside
+  (package
+    (name "pyotherside")
+    (version "1.6.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/thp/pyotherside")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0vwl088p8zjkh2rwmzwpz5mkjs2rfyb80018dq4r571c9vpwp2r0"))))
+    (build-system qt-build-system)
+    (arguments
+     (list
+      #:qtbase qtbase
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack '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))
+                                "/qml")))))
+          (replace 'configure
+            (lambda _
+              (invoke "qmake")))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "./tests/tests"))))
+          (replace 'install
+            ;; Specify a specific install target, otherwise the build fails
+            ;; attempting to install the qtquicktests target to the qtbase
+            ;; installation prefix.
+            (lambda _
+              (invoke "make" "sub-src-install_subtargets"))))))
+    (inputs (list python qtdeclarative qtquickcontrols2 qtsvg))
+    (home-page "https://thp.io/2011/pyotherside/")
+    (synopsis "Qt plugin providing access to a Python 3 interpreter from QML")
+    (description "Pyotherside is a Qt plugin providing access to a Python 3
+interpreter from QML for creating asynchronous mobile and desktop UIs with
+Python.")
+    (license license:isc)))
+
 (define-public python-sip
   (package
     (name "python-sip")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#65139] [PATCH 2/3] gnu: Add pyotherside-for-qt5.
       [not found] <cover.1691468046.git.maxim.cournoyer@gmail.com>
  2023-08-08  4:14 ` [bug#65139] [PATCH 1/3] gnu: Add pyotherside Maxim Cournoyer
@ 2023-08-08  4:14 ` Maxim Cournoyer
  2023-08-08  4:14 ` [bug#65139] [PATCH 3/3] gnu: Add yubikey-manager-qt Maxim Cournoyer
  2 siblings, 0 replies; 5+ messages in thread
From: Maxim Cournoyer @ 2023-08-08  4:14 UTC (permalink / raw)
  To: 65139
  Cc: Maxim Cournoyer, Andreas Enge, Maxim Cournoyer,
	宋文武

* gnu/packages/qt.scm (pyotherside-for-qt5): New variable.
---

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

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")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#65139] [PATCH 3/3] gnu: Add yubikey-manager-qt.
       [not found] <cover.1691468046.git.maxim.cournoyer@gmail.com>
  2023-08-08  4:14 ` [bug#65139] [PATCH 1/3] gnu: Add pyotherside Maxim Cournoyer
  2023-08-08  4:14 ` [bug#65139] [PATCH 2/3] gnu: Add pyotherside-for-qt5 Maxim Cournoyer
@ 2023-08-08  4:14 ` Maxim Cournoyer
  2 siblings, 0 replies; 5+ messages in thread
From: Maxim Cournoyer @ 2023-08-08  4:14 UTC (permalink / raw)
  To: 65139; +Cc: Maxim Cournoyer

* gnu/packages/security-token.scm (yubikey-manager-qt): New variable.

---

 gnu/packages/security-token.scm | 58 +++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 6d7f5c9ab2..3a0ed245ad 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -51,6 +51,7 @@ (define-module (gnu packages security-token)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system qt)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
@@ -772,6 +773,63 @@ (define-public python-yubikey-manager
 an unprivileged user.")
     (license license:bsd-2)))
 
+(define-public yubikey-manager-qt
+  (package
+    (name "yubikey-manager-qt")
+    (version "1.2.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://developers.yubico.com/" name
+                                  "/Releases/" name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1qjp9p7i6957lf6ycwwz0178nmjgdyydb2f235bkin0pfm3rxcp9"))))
+    (build-system qt-build-system)
+    (arguments
+     (list
+      #:tests? #f                       ;no test suite
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-paths
+            (lambda _
+              (substitute* "ykman-gui/deployment.pri"
+                (("/usr/bin")
+                 (string-append #$output "/bin")))))
+          (replace 'configure
+            (lambda _
+              (invoke "qmake")))
+          (add-after 'install 'install-desktop-resources
+            (lambda _
+              (let ((datadir (string-append #$output "/share")))
+                (with-directory-excursion "resources"
+                  (install-file "icons/ykman.png"
+                                (string-append datadir "/pixmaps"))
+                  (install-file "com.yubico.yubikey_manager.metainfo.xml"
+                                (string-append datadir "/metainfo"))
+                  (install-file "ykman-gui.desktop"
+                                (string-append datadir "/applications"))))))
+          (add-after 'qt-wrap 'wrap-more
+            (lambda _
+              (wrap-program (string-append #$output "/bin/ykman-gui")
+                ;; Wrap PYTHONPATH so that pyotherside can find the
+                ;; yubikey-manager library.
+                `("GUIX_PYTHONPATH" prefix
+                  (,(getenv "GUIX_PYTHONPATH")))))))))
+    (native-inputs (list python-wrapper))
+    (inputs (list pyotherside-for-qt5
+                  python-yubikey-manager
+                  qtdeclarative-5
+                  qtgraphicaleffects
+                  qtquickcontrols-5
+                  qtquickcontrols2-5
+                  qtsvg-5))
+    (home-page "https://developers.yubico.com/yubikey-manager-qt/")
+    (synopsis "GUI for configuring any YubiKey over all USB interfaces")
+    (description "YubiKey Manager (Qt) is a graphical application for
+configuring any YubiKey over all USB interfaces.  For a CLI alternative, refer
+to the @code{python-yubikey-manager} package.")
+    (license license:bsd-2)))
+
 (define-public libnitrokey
   (package
     (name "libnitrokey")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#65139] [PATCH 1/3] gnu: Add pyotherside.
  2023-08-08  4:14 ` [bug#65139] [PATCH 1/3] gnu: Add pyotherside Maxim Cournoyer
@ 2023-08-09  7:51   ` Andreas Enge
  2023-08-10 13:36     ` bug#65139: " Maxim Cournoyer
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Enge @ 2023-08-09  7:51 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 65139, 宋文武

Hello,

the packages look good, although it is unfortunate to add a dependency
on Qt5.

Andreas





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#65139: [PATCH 1/3] gnu: Add pyotherside.
  2023-08-09  7:51   ` Andreas Enge
@ 2023-08-10 13:36     ` Maxim Cournoyer
  0 siblings, 0 replies; 5+ messages in thread
From: Maxim Cournoyer @ 2023-08-10 13:36 UTC (permalink / raw)
  To: Andreas Enge; +Cc: 65139-done, 宋文武

Hi Andreas,

Andreas Enge <andreas@enge.fr> writes:

> Hello,
>
> the packages look good, although it is unfortunate to add a dependency
> on Qt5.

I'd like to move more things to Qt6 as well, but at the pace of things,
it seems this will take years.

I've installed the series and added you as reviewer to the last commit
message; I hope that's fine.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-10 13:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1691468046.git.maxim.cournoyer@gmail.com>
2023-08-08  4:14 ` [bug#65139] [PATCH 1/3] gnu: Add pyotherside Maxim Cournoyer
2023-08-09  7:51   ` Andreas Enge
2023-08-10 13:36     ` bug#65139: " Maxim Cournoyer
2023-08-08  4:14 ` [bug#65139] [PATCH 2/3] gnu: Add pyotherside-for-qt5 Maxim Cournoyer
2023-08-08  4:14 ` [bug#65139] [PATCH 3/3] gnu: Add yubikey-manager-qt Maxim Cournoyer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.