From 9fec61a048a9695f86aeeedd9d3e4e49ff9b3cf1 Mon Sep 17 00:00:00 2001 From: AhmedAmrNabil Date: Thu, 18 Jun 2026 23:49:42 +0300 Subject: [PATCH] gpu-screen-recorder-ui: init at 1.13.5 (cherry picked from commit 437771eb5962731b2242e67192f96f163d4be27a) --- .../gp/gpu-screen-recorder-ui/package.nix | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 pkgs/by-name/gp/gpu-screen-recorder-ui/package.nix diff --git a/pkgs/by-name/gp/gpu-screen-recorder-ui/package.nix b/pkgs/by-name/gp/gpu-screen-recorder-ui/package.nix new file mode 100644 index 000000000000..c75a408d14fa --- /dev/null +++ b/pkgs/by-name/gp/gpu-screen-recorder-ui/package.nix @@ -0,0 +1,120 @@ +{ + dbus, + desktop-file-utils, + fetchgit, + gitUpdater, + gpu-screen-recorder, + gpu-screen-recorder-notification, + gsettings-desktop-schemas, + lib, + libcap, + libdrm, + libglvnd, + libpulseaudio, + libx11, + libxcomposite, + libxcursor, + libxext, + libxfixes, + libxi, + libxkbcommon, + libxrandr, + libxrender, + linuxHeaders, + makeWrapper, + meson, + ninja, + pango, + pkg-config, + stdenv, + wayland-scanner, + wayland, + wrapperDir ? "/run/wrappers/bin", +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "gpu-screen-recorder-ui"; + version = "1.13.5"; + + src = fetchgit { + url = "https://repo.dec05eba.com/gpu-screen-recorder-ui"; + tag = finalAttrs.version; + hash = "sha256-ObIN8qD+34nXZv6v6vLK3f6bezVSXqOd0xPGci52awU="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + makeWrapper + desktop-file-utils + wayland-scanner + ]; + + depsBuildBuild = [ pkg-config ]; + + buildInputs = [ + libx11 + libxrandr + libxrender + libxkbcommon + libxcomposite + libxfixes + libxext + libxi + libxcursor + libglvnd + libpulseaudio + libdrm + dbus + linuxHeaders + wayland + pango + libcap + gsettings-desktop-schemas + ]; + + __structuredAttrs = true; + strictDeps = true; + + mesonBuildType = "release"; + + mesonFlags = [ + # must be handled in the nixos module as extra file permissions are stripped in the nix store + (lib.mesonBool "capabilities" false) + ]; + + postInstall = + let + gpu-screen-recorder-wrapped = gpu-screen-recorder.override { + inherit wrapperDir; + }; + in + '' + wrapProgram "$out/bin/gsr-ui" \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libglvnd ]}" \ + --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \ + --prefix PATH : "${wrapperDir}" \ + --suffix PATH : "${ + lib.makeBinPath [ + gpu-screen-recorder-wrapped + gpu-screen-recorder-notification + ] + }" + ''; + + passthru.updateScript = gitUpdater { }; + + meta = { + description = "Fullscreen overlay UI for GPU Screen Recorder in the style of ShadowPlay"; + homepage = "https://git.dec05eba.com/gpu-screen-recorder-ui/about"; + license = lib.licenses.gpl3Only; + mainProgram = "gsr-ui"; + maintainers = with lib.maintainers; [ + AhmedAmr + keenanweaver + ]; + platforms = lib.platforms.linux; + sourceProvenance = with lib.sourceTypes; [ fromSource ]; + }; +})