Unverified Commit 90dfc4d3 authored by DontEatOreo's avatar DontEatOreo
Browse files

gpu-screen-recorder: unstable-2024-07-05 -> 4.1.11

parent 7686035a
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
From cd8c6561079ee4c53b4bed390edd75a730ac685d Mon Sep 17 00:00:00 2001
From: Tim Schumacher <timschumi@gmx.de>
Date: Thu, 4 Jul 2024 16:26:36 +0200
Subject: [PATCH] Don't install systemd unit files using absolute paths

---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index a188f16..7807abe 100644
--- a/meson.build
+++ b/meson.build
@@ -54,7 +54,7 @@ executable('gsr-kms-server', 'kms/server/kms_server.c', dependencies : dependenc
 executable('gpu-screen-recorder', src, dependencies : dep, install : true)
 
 if get_option('systemd') == true
-    install_data(files('extra/gpu-screen-recorder.service'), install_dir : '/usr/lib/systemd/user')
+    install_data(files('extra/gpu-screen-recorder.service'), install_dir : 'lib/systemd/user')
 endif
 
 if get_option('capabilities') == true
-- 
2.45.1
+23 −14
Original line number Diff line number Diff line
@@ -5,11 +5,14 @@
  makeWrapper,
  meson,
  ninja,
  addDriverRunpath,
  pkg-config,
  libXcomposite,
  libpulseaudio,
  dbus,
  ffmpeg,
  wayland,
  pipewire,
  libdrm,
  libva,
  libglvnd,
@@ -22,14 +25,13 @@

stdenv.mkDerivation {
  pname = "gpu-screen-recorder";
  version = "unstable-2024-07-05";
  version = "4.1.11";

  # Snapshot tarballs use the following versioning format:
  # printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  src = fetchurl {
    url = "https://dec05eba.com/snapshot/gpu-screen-recorder.git.r641.48cd80f.tar.gz";
    hash = "sha256-hIEK8EYIxQTTiFePPZf4V0nsxqxkfcDeOG9GK9whn+0=";
    url = "https://dec05eba.com/snapshot/gpu-screen-recorder.git.4.1.11.tar.gz";
    hash = "sha256-XCs40MzObfNtErxnN3rYQ722TAiREcbaJZet+VJfimg=";
  };

  sourceRoot = ".";

  nativeBuildInputs = [
@@ -42,7 +44,9 @@ stdenv.mkDerivation {
  buildInputs = [
    libXcomposite
    libpulseaudio
    dbus
    ffmpeg
    pipewire
    wayland
    libdrm
    libva
@@ -52,22 +56,27 @@ stdenv.mkDerivation {
    libXfixes
  ];

  patches = [ ./0001-Don-t-install-systemd-unit-files-using-absolute-path.patch ];

  mesonFlags = [
    "-Dsystemd=true"

    # Capabilities are handled by security.wrappers if possible.
    "-Dcapabilities=false"
    # Enable Wayland support
    (lib.mesonBool "portal" true)
    # Handle by the module
    (lib.mesonBool "capabilities" false)
    (lib.mesonBool "systemd" false)
    (lib.mesonBool "nvidia_suspend_fix" false)
  ];

  postInstall = ''
    mkdir $out/bin/.wrapped
    mv $out/bin/gpu-screen-recorder $out/bin/.wrapped/
    makeWrapper "$out/bin/.wrapped/gpu-screen-recorder" "$out/bin/gpu-screen-recorder" \
    --prefix LD_LIBRARY_PATH : ${libglvnd}/lib \
    --prefix PATH : ${wrapperDir} \
    --suffix PATH : $out/bin
      --prefix LD_LIBRARY_PATH : "${
        lib.makeLibraryPath [
          libglvnd
          addDriverRunpath.driverLink
        ]
      }" \
      --prefix PATH : "${wrapperDir}" \
      --suffix PATH : "$out/bin"
  '';

  meta = {