summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Hodina <phodina@protonmail.com>2022-01-11 03:14:03 +0100
committerGuix Patches Tester <>2022-07-20 14:30:43 +0100
commit58ba38bd143af1308e31c8a21acdde63f61ee15e (patch)
treee5e33637a91afebb4f855264252edd80c081a168
parentdbf09879710aefe6cedd9ed975cc2b79df01b755 (diff)
downloadguix-patches-58ba38bd143af1308e31c8a21acdde63f61ee15e.tar
guix-patches-58ba38bd143af1308e31c8a21acdde63f61ee15e.tar.gz
gnu: Add qtscrcpy.issue-56664
* gnu/packages/android.scm (qtscrcpy): New variable.
-rw-r--r--gnu/packages/android.scm90
1 files changed, 89 insertions, 1 deletions
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 04dc4b6499..15f96ba294 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -11,7 +11,7 @@
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Sergey Trofimov <sarg@sarg.org.ru>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
-;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
+;;; Copyright © 2021, 2022 Petr Hodina <phodina@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,6 +34,7 @@
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system android-ndk)
+ #:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system python)
@@ -49,7 +50,9 @@
#:use-module (gnu packages image)
#:use-module (gnu packages java)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages qt)
#:use-module (gnu packages pcre)
+ #:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
@@ -61,6 +64,7 @@
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
+ #:use-module (gnu packages video)
#:use-module (gnu packages virtualization)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml))
@@ -1133,6 +1137,90 @@ backups. It supports encrypted archives.")
for communicating with Xiaomi smart appliances over miIO and MIoT protocols.")
(license license:gpl3+)))
+(define-public qtscrcpy
+ ;; this tracks the QtScrcpyCore submodule
+ (let ((commit "3004e63935fe8a3e57b91e117a91c1a6aa68ae42")
+ (revision "1"))
+ (package
+ (name "qtscrcpy")
+ (version "2.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/barry-ran/QtScrcpy")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1l3l6z4snzfljzzywf6yxw0fc1c0kkkcw3477rmfkrd7rapwxndl"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'download-qtscrcpycore
+ (lambda* _
+ (copy-recursively (string-append #$(origin
+ (method
+ git-fetch)
+ (uri (git-reference
+ (url
+ "https://github.com/barry-ran/QtScrcpyCore")
+ (commit
+ commit)))
+ (file-name (git-file-name
+ name
+ version))
+ (sha256 (base32
+ "0x57vv1la27m67dgvbll24h7amqmxjs8xik4qyizx5qjxhylw93c")))
+ "/")
+ "QtScrcpy/QtScrcpyCore")
+ (substitute* "QtScrcpy/QtScrcpyCore/CMakeLists.txt"
+ ((".*/src/third_party/adb/linux/adb.*")
+ ""))
+ (delete-file-recursively
+ "QtScrcpy/QtScrcpyCore/src/third_party/adb")
+ (delete-file-recursively
+ "QtScrcpy/QtScrcpyCore/src/third_party/ffmpeg")))
+ (add-after 'unpack 'fix-adb-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "QtScrcpy/main.cpp"
+ (("\"\\..*linux/adb")
+ (string-append "\""
+ (assoc-ref inputs "adb")
+ "/bin/adb")))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((bin (string-append #$output "/bin"))
+ (build (string-append (getenv "PWD")
+ "/source/output/x64/RelWithDebInfo"))
+ (qtscrcpy (string-append build
+ "/QtScrcpy"))
+ (scrcpy-server (string-append build
+ "/scrcpy-server"))
+ (config (string-append #$output
+ "/etc/qtscrcpy"))
+ (ini (string-append (getenv "PWD")
+ "/source/config/config.ini")))
+ (mkdir-p bin)
+ (mkdir-p config)
+ (install-file qtscrcpy bin)
+ (install-file scrcpy-server bin)
+ (install-file ini config)))))))
+ (native-inputs (list qttools pkg-config))
+ (inputs (list adb
+ ffmpeg
+ qtx11extras
+ qtmultimedia
+ qtbase-5
+ zlib))
+ (synopsis "Android real-time display control software")
+ (description
+ "This package provides QtScrcpy which connects to Android
+devices via USB (or via TCP/IP) for display and control. It does NOT require
+the root privileges. Supports up to 16 Android device connections at the same time.")
+ (home-page "https://github.com/DanielOgorchock/joycond")
+ (license license:asl2.0))))
+
(define-public fdroidserver
(package
(name "fdroidserver")