Merge pull request #44249 from lukeadams/scrcpy

scrcpy: init at v1.2
This commit is contained in:
Jörg Thalheim 2018-08-01 09:14:27 +01:00 committed by GitHub
commit 02ba14dbd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 66 additions and 0 deletions

View File

@ -926,6 +926,11 @@
github = "deepfire";
name = "Kosyrev Serge";
};
deltaevo = {
email = "deltaduartedavid@gmail.com";
github = "DeltaEvo";
name = "Duarte David";
};
demin-dmitriy = {
email = "demindf@gmail.com";
github = "demin-dmitriy";
@ -2264,6 +2269,11 @@
github = "luispedro";
name = "Luis Pedro Coelho";
};
lukeadams = {
email = "luke.adams@belljar.io";
github = "lukeadams";
name = "Luke Adams";
};
lukego = {
email = "luke@snabb.co";
github = "lukego";

View File

@ -0,0 +1,52 @@
{ stdenv, fetchurl, fetchFromGitHub, makeWrapper
, meson
, ninja
, pkgconfig
, platformTools
, ffmpeg
, SDL2
}:
let
version = "1.2";
prebuilt_server = fetchurl {
url = "https://github.com/Genymobile/scrcpy/releases/download/v${version}/scrcpy-server-v${version}.jar";
sha256 = "0q0zyqw7y33r9ybjp8ay6yac7ifca1lq14pjvw6x78zxs976affb";
};
in
stdenv.mkDerivation rec {
name = "scrcpy-${version}";
inherit version;
src = fetchFromGitHub {
owner = "Genymobile";
repo = "scrcpy";
rev = "v${version}";
sha256 = "01zw6h6mz2cwqfh9lwypm8pbfx9m9df91l1fq1i0f1d8v49x8wqc";
};
nativeBuildInputs = [ makeWrapper meson ninja pkgconfig ];
buildInputs = [ ffmpeg SDL2 ];
# Manually install the server jar to prevent Meson from "fixing" it
preConfigure = ''
echo -n > server/meson.build
'';
postInstall = ''
mkdir -p "$out/share/scrcpy"
ln -s "${prebuilt_server}" "$out/share/scrcpy/scrcpy-server.jar"
# runtime dep on `adb` to push the server
wrapProgram "$out/bin/scrcpy" --prefix PATH : "${platformTools}/bin"
'';
meta = with stdenv.lib; {
description = "Display and control Android devices over USB or TCP/IP";
homepage = https://github.com/Genymobile/scrcpy;
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ deltaevo lukeadams ];
};
}

View File

@ -5012,6 +5012,10 @@ with pkgs;
inherit (darwin.apple_sdk.libs) utmp;
};
scrcpy = callPackage ../misc/scrcpy {
inherit (androidenv) platformTools;
};
screen-message = callPackage ../tools/X11/screen-message { };
screencloud = callPackage ../applications/graphics/screencloud {