From 367d7da4a143949d11fbc76495f935dff7a3f25c Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Sun, 16 Jan 2022 17:59:22 +0100 Subject: [PATCH 1/4] gnu: Add qmqtt. * gnu/packages/qt.scm (qmqtt): New variable. diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 30bf429897..6aaa9c47c2 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3363,6 +3363,68 @@ (define-public python-qt.py bindings (PySide, PySide2, PyQt4 and PyQt5).") (license license:expat))) +(define-public qmqtt + (package + (name "qmqtt") + (version "1.0.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/alex-spataru/qmqtt") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (modules '((guix build utils) (ice-9 ftw) + (srfi srfi-1))) + (snippet `(begin + (delete-file-recursively "tests/gtest/gtest"))) + (sha256 + (base32 + "1l96cssa9hjmabds9k9nzisxnzr3ndi3r82m3lgwq9ip94kz05nw")))) + (build-system cmake-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (invoke "qmake"))) + (replace 'install + (lambda* (#:key outputs source #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) (lib (string-append + out "/lib")) + (include (string-append out "/include"))) + (mkdir-p lib) + (mkdir-p include) + (chdir "..") ;we were in dir tests + (copy-recursively "lib" lib) + (chdir "src/mqtt") + (for-each (lambda (file) + (install-file (string-append file) include)) + '("qmqtt_client.h" "qmqtt_frame.h" + "qmqtt_global.h" + "qmqtt.h" + "qmqtt_message.h" + "qmqtt_networkinterface.h" + "qmqtt_routedmessage.h" + "qmqtt_router.h" + "qmqtt_routesubscription.h" + "qmqtt_socketinterface.h" + "qmqtt_timerinterface.h" + "qmqtt_message.h"))))) + (replace 'check + (lambda* (#:key tests? test-options parallel- + + #:allow-other-keys) + + + (when tests? + (chdir "tests") + (substitute* "gtest/gtest.pro" + (("gtest") "")) + (invoke "qmake"))))))) + (native-inputs (list googletest perl python)) + (inputs (list qtbase-5 openssl qtwebsockets)) + (home-page "https://github.com/alex-spataru/qmqtt") + (synopsis "MQTT Client") + (description "Provides an MQTT Client with SSL support and Websockets.") + (license license:expat))) + (define-public qscintilla (package (name "qscintilla") -- 2.38.1