[PATCH] gnu: Add new variable scrcpy

  • Done
  • quality assurance status badge
Details
3 participants
  • ???
  • ??
  • Maxim Cournoyer
Owner
unassigned
Submitted by
??
Severity
normal
?
(name . guix-patches)(address . guix-patches@gnu.org)
CAGNyvegBRgDDGZCJUfX8epHD8D8F9zOX0-3mo2wtK-8tVS7ckQ@mail.gmail.com

From 3adf47b102b0ddcbdee264e6b7f9a1371482adae Mon Sep 17 00:00:00 2001
From: LuHui <luhux76@gmail.com>
Date: Wed, 26 Oct 2022 15:57:09 +0800
Subject: [PATCH] gnu: Add new variable scrcpy

* gnu/packages/android.scm (scrcpy): Add new variable.
---
gnu/packages/android.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (84 lines)
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 91aaba089f..fccf71a4cc 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2020 Sergey Trofimov <sarg@sarg.org.ru>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
+;;; Copyright © 2022 LuHui <luhux76@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +38,7 @@ (define-module (gnu packages android)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
+ #:use-module (guix build-system meson)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module ((guix licenses) #:prefix license:)
@@ -49,14 +51,17 @@ (define-module (gnu packages android)
#:use-module (gnu packages golang)
#:use-module (gnu packages image)
#:use-module (gnu packages java)
+ #:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#: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)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages sdl)
#:use-module (gnu packages selinux)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sphinx)
@@ -64,6 +69,7 @@ (define-module (gnu packages android)
#: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))
@@ -1298,3 +1304,35 @@ (define-public android-file-transfer
with Android devices using MTP. It also allows the Android device to be
mounted via FUSE.")
(license license:lgpl2.1+)))
+
+(define-public scrcpy
+ (package
+ (name "scrcpy")
+ (version "1.24")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Genymobile/scrcpy")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "069139c66w7myrpx7jwy6xllp1l1r2gkw8mf385wfc0gjm4jbgcq"))))
+ (build-system meson-build-system)
+ (native-inputs
+ (list pkg-config))
+ (inputs
+ (list sdl2 libusb ffmpeg))
+ (arguments
+ `(#:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'disable-server-build
+ ;; because server build need android ndk
+ ;; you can use SCRCPY_SERVER_PATH to instead default server binary
+ (lambda _
+ (truncate-file "server/meson.build" 0))))))
+ (home-page "https://github.com/Genymobile/scrcpy")
+ (synopsis "Display and control your Android device")
+ (description "This application provides display and control
+of Android devices connected via USB or over TCP/IP.")
+ (license license:asl2.0)))
--
2.38.0
?
(name . ??)(address . luhux76@gmail.com)(address . 58816@debbugs.gnu.org)
877d0fch68.fsf@envs.net
?? <luhux76@gmail.com> writes:

Hello,

Toggle quote (10 lines)
> From 3adf47b102b0ddcbdee264e6b7f9a1371482adae Mon Sep 17 00:00:00 2001
> [...]
> + `(#:tests? #f
> + #:phases (modify-phases %standard-phases
> + (add-after 'unpack 'disable-server-build
> + ;; because server build need android ndk
> + ;; you can use SCRCPY_SERVER_PATH to instead default server binary
> + (lambda _
> + (truncate-file "server/meson.build" 0))))))

I think without 'scrcpy-server' this package won't be useful. Require
user to download or compile it via android ndk seems awkward. Hope we
can find a way to package it properly...
M
M
Maxim Cournoyer wrote on 21 Mar 2023 13:22
(name . ???)(address . iyzsong@envs.net)
877cvathte.fsf_-_@gmail.com
Hello,

??? <iyzsong@envs.net> writes:

Toggle quote (18 lines)
> ?? <luhux76@gmail.com> writes:
>
> Hello,
>
>> From 3adf47b102b0ddcbdee264e6b7f9a1371482adae Mon Sep 17 00:00:00 2001
>> [...]
>> + `(#:tests? #f
>> + #:phases (modify-phases %standard-phases
>> + (add-after 'unpack 'disable-server-build
>> + ;; because server build need android ndk
>> + ;; you can use SCRCPY_SERVER_PATH to instead default server binary
>> + (lambda _
>> + (truncate-file "server/meson.build" 0))))))
>
> I think without 'scrcpy-server' this package won't be useful. Require
> user to download or compile it via android ndk seems awkward. Hope we
> can find a way to package it properly...

Agreed; and since there hasn't been an update in 20 weeks, I'm closing
this until it can be resubmitted with the server component packaged.

--
Thanks,
Maxim
Closed
?