diff options
| author | Dr. P. Roberts <dr.p.roberts@mailbox.org> | 2025-12-30 10:13:55 +0100 |
|---|---|---|
| committer | Gabriel Wicki <gabriel@erlikon.ch> | 2026-07-16 14:05:34 +0200 |
| commit | 2fb477e7e19110262cc30a995956ffe9430723ff (patch) | |
| tree | 60ba5641a268a90e49335a21e3c5481afea2f281 /gnu | |
| parent | e42822343142d50872aee726c1aa8ffc52e356f1 (diff) | |
gnu: Add qflipper.
* gnu/packages/embedded.scm (qflipper): New variable.
* gnu/packages/patches/qflipper-qt6.9-compat.patch: New file.
* gnu/local.mk: Register it.
Signed-off-by: Gabriel Wicki <gabriel@erlikon.ch>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/embedded.scm | 71 | ||||
| -rw-r--r-- | gnu/packages/patches/qflipper-qt6.9-compat.patch | 43 |
3 files changed, 115 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 098316e9194..9f68d0ff190 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -2316,6 +2316,7 @@ dist_patch_DATA = \ | |||
| 2316 | %D%/packages/patches/qemu-fix-agent-paths.patch \ | 2316 | %D%/packages/patches/qemu-fix-agent-paths.patch \ |
| 2317 | %D%/packages/patches/qemu-fix-test-virtio-version.patch \ | 2317 | %D%/packages/patches/qemu-fix-test-virtio-version.patch \ |
| 2318 | %D%/packages/patches/qemu-disable-aarch64-migration-test.patch \ | 2318 | %D%/packages/patches/qemu-disable-aarch64-migration-test.patch \ |
| 2319 | %D%/packages/patches/qflipper-qt6.9-compat.patch \ | ||
| 2319 | %D%/packages/patches/qrcodegen-cpp-cmake.patch \ | 2320 | %D%/packages/patches/qrcodegen-cpp-cmake.patch \ |
| 2320 | %D%/packages/patches/qtbase-absolute-runpath.patch \ | 2321 | %D%/packages/patches/qtbase-absolute-runpath.patch \ |
| 2321 | %D%/packages/patches/qtbase-qmake-fix-includedir.patch \ | 2322 | %D%/packages/patches/qtbase-qmake-fix-includedir.patch \ |
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index a4d633ac6e5..09deeaf27d8 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm | |||
| @@ -70,11 +70,13 @@ | |||
| 70 | #:use-module (gnu packages ncurses) | 70 | #:use-module (gnu packages ncurses) |
| 71 | #:use-module (gnu packages perl) | 71 | #:use-module (gnu packages perl) |
| 72 | #:use-module (gnu packages pkg-config) | 72 | #:use-module (gnu packages pkg-config) |
| 73 | #:use-module (gnu packages protobuf) | ||
| 73 | #:use-module (gnu packages python) | 74 | #:use-module (gnu packages python) |
| 74 | #:use-module (gnu packages python-build) | 75 | #:use-module (gnu packages python-build) |
| 75 | #:use-module (gnu packages python-crypto) | 76 | #:use-module (gnu packages python-crypto) |
| 76 | #:use-module (gnu packages python-web) | 77 | #:use-module (gnu packages python-web) |
| 77 | #:use-module (gnu packages python-xyz) | 78 | #:use-module (gnu packages python-xyz) |
| 79 | #:use-module (gnu packages qt) | ||
| 78 | #:use-module (gnu packages readline) | 80 | #:use-module (gnu packages readline) |
| 79 | #:use-module (gnu packages rust) | 81 | #:use-module (gnu packages rust) |
| 80 | #:use-module (gnu packages rust-apps) | 82 | #:use-module (gnu packages rust-apps) |
| @@ -2090,3 +2092,72 @@ TS-4900 family. The included commands are: | |||
| 2090 | in order to program 8051-based System-On-Chip devices: CC254x CC253x CC243x | 2092 | in order to program 8051-based System-On-Chip devices: CC254x CC253x CC243x |
| 2091 | CC251x CC111x.") | 2093 | CC251x CC111x.") |
| 2092 | (license license:gpl2))) | 2094 | (license license:gpl2))) |
| 2095 | |||
| 2096 | (define-public qflipper | ||
| 2097 | (package | ||
| 2098 | (name "qflipper") | ||
| 2099 | (version "1.3.3") | ||
| 2100 | (source | ||
| 2101 | (origin | ||
| 2102 | (method git-fetch) | ||
| 2103 | (uri (git-reference | ||
| 2104 | (url "https://github.com/flipperdevices/qFlipper") | ||
| 2105 | (commit version))) | ||
| 2106 | (file-name (git-file-name name version)) | ||
| 2107 | (sha256 | ||
| 2108 | (base32 "0q68pkkak1ji0800hxbypshgj89vzwkql3j5x53sd32v96c8j7yp")) | ||
| 2109 | (patches | ||
| 2110 | (search-patches "qflipper-qt6.9-compat.patch")))) | ||
| 2111 | (build-system gnu-build-system) | ||
| 2112 | (arguments | ||
| 2113 | (list | ||
| 2114 | #:phases | ||
| 2115 | #~(modify-phases %standard-phases | ||
| 2116 | (replace 'configure | ||
| 2117 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 2118 | (invoke "qmake" | ||
| 2119 | (string-append "PREFIX=" #$output) | ||
| 2120 | (string-append | ||
| 2121 | "QT_TOOL.lrelease.binary=" | ||
| 2122 | (search-input-file inputs "/bin/lrelease")) | ||
| 2123 | "DEFINES+=DISABLE_APPLICATION_UPDATES"))) | ||
| 2124 | (add-after 'unpack 'fix-version | ||
| 2125 | (lambda _ | ||
| 2126 | (substitute* "qflipper_common.pri" | ||
| 2127 | (("GIT_VERSION =.*") (string-append "GIT_VERSION = \"" #$version "\"\n"))))) | ||
| 2128 | (add-after 'unpack 'unbundle-nanopb | ||
| 2129 | (lambda _ | ||
| 2130 | (substitute* "qFlipper.pro" | ||
| 2131 | ((".*3rdparty.*") "")) | ||
| 2132 | (substitute* "plugins/flipperproto0/flipperproto0.pro" | ||
| 2133 | (("-l3rdparty") "-lprotobuf-nanopb"))))))) | ||
| 2134 | (native-inputs (list pkg-config)) | ||
| 2135 | (inputs | ||
| 2136 | (list libusb | ||
| 2137 | nanopb-malloc | ||
| 2138 | qt5compat | ||
| 2139 | qtbase | ||
| 2140 | qtdeclarative | ||
| 2141 | qtserialport | ||
| 2142 | qtsvg | ||
| 2143 | qttools | ||
| 2144 | qtwayland | ||
| 2145 | zlib)) | ||
| 2146 | (home-page "https://github.com/flipperdevices/qFlipper") | ||
| 2147 | (synopsis "Desktop application for Flipper Zero") | ||
| 2148 | (description | ||
| 2149 | "qFlipper is a graphical application for Flipper Zero with the following features: | ||
| 2150 | |||
| 2151 | @itemize @bullet | ||
| 2152 | @item Update Flipper's firmware and supplemental data | ||
| 2153 | @item Repair a broken firmware installation | ||
| 2154 | @item Stream Flipper's display and control it remotely | ||
| 2155 | @item Install firmware from a @code{.dfu} file | ||
| 2156 | @item Backup and restore settings, progress and pairing data | ||
| 2157 | @item Command line interface | ||
| 2158 | @end itemize | ||
| 2159 | |||
| 2160 | Tip: to be able to use this application as a regular user, search for the | ||
| 2161 | @code{42-flipperzero.rules} file in the contents of the package, install it | ||
| 2162 | using udev-rules-service, then add your user to the dialout group.") | ||
| 2163 | (license license:gpl3))) | ||
diff --git a/gnu/packages/patches/qflipper-qt6.9-compat.patch b/gnu/packages/patches/qflipper-qt6.9-compat.patch new file mode 100644 index 00000000000..38c85642822 --- /dev/null +++ b/gnu/packages/patches/qflipper-qt6.9-compat.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 57316893037d119931011d9abd4a05ed158c7a24 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Michal Suchanek <msuchanek@suse.de> | ||
| 3 | Date: Tue, 8 Apr 2025 17:06:42 +0200 | ||
| 4 | Subject: [PATCH] Define == for DeviceInfo | ||
| 5 | |||
| 6 | Looks like some newer Qt versions require == instead of !=. | ||
| 7 | |||
| 8 | Define both. | ||
| 9 | --- | ||
| 10 | backend/flipperzero/deviceinfo.h | 3 +++ | ||
| 11 | 1 file changed, 3 insertions(+) | ||
| 12 | |||
| 13 | diff --git a/backend/flipperzero/deviceinfo.h b/backend/flipperzero/deviceinfo.h | ||
| 14 | index deaa18b..3cfd5f9 100644 | ||
| 15 | --- a/backend/flipperzero/deviceinfo.h | ||
| 16 | +++ b/backend/flipperzero/deviceinfo.h | ||
| 17 | @@ -31,6 +31,7 @@ public: | ||
| 18 | |||
| 19 | // Needed in order to work with QVariant | ||
| 20 | bool operator !=(const HardwareInfo &other) const { Q_UNUSED(other) return true; } | ||
| 21 | + bool operator ==(const HardwareInfo &other) const { Q_UNUSED(other) return false; } | ||
| 22 | }; | ||
| 23 | |||
| 24 | struct SoftwareInfo { | ||
| 25 | @@ -50,6 +51,7 @@ public: | ||
| 26 | |||
| 27 | // Needed in order to work with QVariant | ||
| 28 | bool operator !=(const SoftwareInfo &other) const { Q_UNUSED(other) return true; } | ||
| 29 | + bool operator ==(const SoftwareInfo &other) const { Q_UNUSED(other) return false; } | ||
| 30 | }; | ||
| 31 | |||
| 32 | struct StorageInfo { | ||
| 33 | @@ -67,6 +69,7 @@ public: | ||
| 34 | |||
| 35 | // Needed in order to work with QVariant | ||
| 36 | bool operator !=(const StorageInfo &other) const { Q_UNUSED(other) return true; } | ||
| 37 | + bool operator ==(const StorageInfo &other) const { Q_UNUSED(other) return false; } | ||
| 38 | }; | ||
| 39 | |||
| 40 | struct ProtobufInfo { | ||
| 41 | -- | ||
| 42 | 2.52.0 | ||
| 43 | |||
