From 3318e7bfd1d713ab899f616ce1cc41a6f4557468 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 31 Dec 2023 16:24:57 -0500 Subject: [PATCH] fix(gsr): fix gsr build --- devices/binto/modules/gpu-replay.nix | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/devices/binto/modules/gpu-replay.nix b/devices/binto/modules/gpu-replay.nix index 423def99..f28c49a5 100644 --- a/devices/binto/modules/gpu-replay.nix +++ b/devices/binto/modules/gpu-replay.nix @@ -5,12 +5,30 @@ gpu-screen-recorder-src, ... }: let - gsr = pkgs.gpu-screen-recorder.overrideAttrs (o: { + gsr = pkgs.stdenv.mkDerivation { + name = "gpu-screen-recorder"; version = gpu-screen-recorder-src.rev; src = gpu-screen-recorder-src; - postPatch = ""; + nativeBuildInputs = with pkgs; [ + pkg-config + makeWrapper + ]; + + buildInputs = with pkgs; [ + libpulseaudio + ffmpeg + wayland + libdrm + libva + xorg.libXcomposite + xorg.libXrandr + ]; + + buildPhase = '' + ./build.sh + ''; installPhase = '' strip gsr-kms-server @@ -25,7 +43,7 @@ pkgs.libglvnd ]}" ''; - }); + }; in { environment.systemPackages = with pkgs; [ pulseaudio # for getting audio sink