summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-03-14 02:45:09 +0530
committerGitHub <noreply@github.com>2023-03-13 22:15:09 +0100
commita8cfd275226ecc37b09dccd3e303884c48118e0b (patch)
tree4a661964d059dba6608c9d8dd1c91eab920e6182 /pkgs/misc
parent13939e25a33127e9964f7b11c89b32361c6c8049 (diff)
downloadnixpkgs-a8cfd275226ecc37b09dccd3e303884c48118e0b.tar
nixpkgs-a8cfd275226ecc37b09dccd3e303884c48118e0b.tar.gz
nixpkgs-a8cfd275226ecc37b09dccd3e303884c48118e0b.tar.bz2
nixpkgs-a8cfd275226ecc37b09dccd3e303884c48118e0b.tar.lz
nixpkgs-a8cfd275226ecc37b09dccd3e303884c48118e0b.tar.xz
nixpkgs-a8cfd275226ecc37b09dccd3e303884c48118e0b.tar.zst
nixpkgs-a8cfd275226ecc37b09dccd3e303884c48118e0b.zip
scrcpy: 1.25 -> 2.0 (#220783)
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/scrcpy/default.nix24
1 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/misc/scrcpy/default.nix b/pkgs/misc/scrcpy/default.nix
index fa2fab2d962..277a53e253a 100644
--- a/pkgs/misc/scrcpy/default.nix
+++ b/pkgs/misc/scrcpy/default.nix
@@ -1,4 +1,9 @@
-{ lib, stdenv, fetchurl, fetchFromGitHub, makeWrapper
+{ lib
+, stdenv
+, fetchpatch
+, fetchurl
+, fetchFromGitHub
+, makeWrapper
 , meson
 , ninja
 , pkg-config
@@ -12,10 +17,10 @@
 }:
 
 let
-  version = "1.25";
+  version = "2.0";
   prebuilt_server = fetchurl {
     url = "https://github.com/Genymobile/scrcpy/releases/download/v${version}/scrcpy-server-v${version}";
-    sha256 = "sha256-zgMGx7vQaucvbQb37A7jN3SZWmXeceCoOBPstnrsm9s=";
+    sha256 = "sha256-niQWFfV4zWkLtDMRAA3r3s9qnFCnCCsAGVLxj28h3cI=";
   };
 in
 stdenv.mkDerivation rec {
@@ -26,9 +31,18 @@ stdenv.mkDerivation rec {
     owner = "Genymobile";
     repo = pname;
     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:
   #   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.
@@ -63,7 +77,7 @@ stdenv.mkDerivation rec {
     homepage = "https://github.com/Genymobile/scrcpy";
     sourceProvenance = with sourceTypes; [
       fromSource
-      binaryBytecode  # server
+      binaryBytecode # server
     ];
     license = licenses.asl20;
     platforms = platforms.unix;