From 4cb222f16727f74ecc1550d72c3d52b20ab0d20b Mon Sep 17 00:00:00 2001 From: nixo Date: Wed, 20 Jan 2021 19:23:17 +0100 Subject: [PATCH v2 3/4] gnu: Add single-application-qt5. * gnu/packages/qt.scm (single-application-qt5): New variable. --- gnu/packages/qt.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 79d41b3e73..205d99c017 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2020 Jonathan Brielmaier ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Maxim Cournoyer +;;; Copyright © 2021 Nicolò Balzarotti ;;; ;;; This file is part of GNU Guix. ;;; @@ -1947,6 +1948,61 @@ using the Chromium browser project. The Chromium source code has Google service and binaries removed, and adds modular support for using system libraries.") (license license:lgpl2.1+))) +(define-public single-application-qt5 + ;; Change in function signature, nheko requires at least this commit + (let ((commit "dc8042b5db58f36e06ba54f16f38b16c5eea9053")) + (package + (name "single-application-qt5") + (version (string-append "3.2.0-" (string-take commit 7))) + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/itay-grudev/SingleApplication") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "163aa2x2qb0h8w26si5ql833ilj427jjbdwlz1p2p8iaq6dh0vq1")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ; no check target + ;; Projects can decide how to build this library. You might need to + ;; override this flag (QApplication, QGuiApplication or + ;; QCoreApplication). + #:configure-flags '("-DQAPPLICATION_CLASS=QApplication") + #:phases + (modify-phases %standard-phases + ;; No install target, install things manually + (replace 'install + (lambda* (#:key inputs outputs source #:allow-other-keys) + (let* ((qt (assoc-ref inputs "qtbase")) + (qt-version ,(version-major (package-version qt))) + (out (assoc-ref outputs "out"))) + (install-file + "libSingleApplication.a" (string-append out "/lib")) + (for-each + (lambda (file) + (install-file + (string-append source "/" file) + (string-append out "/include"))) + '("SingleApplication" + "singleapplication.h" "singleapplication_p.h")) + #t)))))) + (inputs + `(("qtbase" ,qtbase))) + (home-page "https://github.com/itay-grudev/SingleApplication") + (synopsis "Replacement of QtSingleApplication for Qt5 and Qt6") + (description + "SingleApplication is a replacement of the QtSingleApplication for Qt5 and Qt6. + +nKeeps the Primary Instance of your Application and kills each subsequent +instances. It can (if enabled) spawn secondary (non-related to the primary) +instances and can send data to the primary instance from secondary +instances.") + (license license:expat)))) + (define-public python-sip (package (name "python-sip") -- 2.29.2