scrcpy: 1.25 -> 2.0 (#220783)

This commit is contained in:
Harsh Shandilya 2023-03-14 02:45:09 +05:30 committed by GitHub
parent 13939e25a3
commit a8cfd27522
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,9 @@
{ lib, stdenv, fetchurl, fetchFromGitHub, makeWrapper { lib
, stdenv
, fetchpatch
, fetchurl
, fetchFromGitHub
, makeWrapper
, meson , meson
, ninja , ninja
, pkg-config , pkg-config
@ -12,10 +17,10 @@
}: }:
let let
version = "1.25"; version = "2.0";
prebuilt_server = fetchurl { prebuilt_server = fetchurl {
url = "https://github.com/Genymobile/scrcpy/releases/download/v${version}/scrcpy-server-v${version}"; url = "https://github.com/Genymobile/scrcpy/releases/download/v${version}/scrcpy-server-v${version}";
sha256 = "sha256-zgMGx7vQaucvbQb37A7jN3SZWmXeceCoOBPstnrsm9s="; sha256 = "sha256-niQWFfV4zWkLtDMRAA3r3s9qnFCnCCsAGVLxj28h3cI=";
}; };
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -26,9 +31,18 @@ stdenv.mkDerivation rec {
owner = "Genymobile"; owner = "Genymobile";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-4U/ChooesjhZSvxvk9dZrpZ/X0lf62+LEn72Ubrm2eM="; sha256 = "sha256-PWH+XLKraFfjXovnZpREXBaQVyOyP8yIMYDMiF6ddXg=";
}; };
# Remove in the next patch release
patches = [
(fetchpatch {
name = "fix-macos-build-error.patch";
url = "https://github.com/Genymobile/scrcpy/commit/6b769675fa68e60c9765022e43c4d7b1e329353a.patch";
hash = "sha256-lQx01HI0nTWdZFusLIswZT2iOgkP84btqF6F58tGNko=";
})
];
# postPatch: # postPatch:
# screen.c: When run without a hardware accelerator, this allows the command to continue working rather than failing unexpectedly. # screen.c: When run without a hardware accelerator, this allows the command to continue working rather than failing unexpectedly.
# This can happen when running on non-NixOS because then scrcpy seems to have a hard time using the host OpenGL-supporting hardware. # This can happen when running on non-NixOS because then scrcpy seems to have a hard time using the host OpenGL-supporting hardware.
@ -63,7 +77,7 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/Genymobile/scrcpy"; homepage = "https://github.com/Genymobile/scrcpy";
sourceProvenance = with sourceTypes; [ sourceProvenance = with sourceTypes; [
fromSource fromSource
binaryBytecode # server binaryBytecode # server
]; ];
license = licenses.asl20; license = licenses.asl20;
platforms = platforms.unix; platforms = platforms.unix;