mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 12:45:27 +03:00
{nixos/gpu-screen-recorder,gpu-screen-recorder{-,gtk}}: update to 4.1.11, remove cap_sys_nice
(#339874)
This commit is contained in:
commit
18760e4c99
4 changed files with 82 additions and 88 deletions
|
@ -1,14 +1,20 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.programs.gpu-screen-recorder;
|
cfg = config.programs.gpu-screen-recorder;
|
||||||
package = cfg.package.override {
|
package = cfg.package.override {
|
||||||
inherit (config.security) wrapperDir;
|
inherit (config.security) wrapperDir;
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
programs.gpu-screen-recorder = {
|
programs.gpu-screen-recorder = {
|
||||||
package = lib.mkPackageOption pkgs "gpu-screen-recorder" {};
|
package = lib.mkPackageOption pkgs "gpu-screen-recorder" { };
|
||||||
|
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
|
@ -28,12 +34,6 @@ in {
|
||||||
capabilities = "cap_sys_admin+ep";
|
capabilities = "cap_sys_admin+ep";
|
||||||
source = "${package}/bin/gsr-kms-server";
|
source = "${package}/bin/gsr-kms-server";
|
||||||
};
|
};
|
||||||
security.wrappers."gpu-screen-recorder" = {
|
|
||||||
owner = "root";
|
|
||||||
group = "root";
|
|
||||||
capabilities = "cap_sys_nice+ep";
|
|
||||||
source = "${package}/bin/gpu-screen-recorder";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
meta.maintainers = with lib.maintainers; [ timschumi ];
|
meta.maintainers = with lib.maintainers; [ timschumi ];
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
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
|
|
||||||
|
|
|
@ -5,11 +5,15 @@
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
meson,
|
meson,
|
||||||
ninja,
|
ninja,
|
||||||
|
addDriverRunpath,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
libXcomposite,
|
libXcomposite,
|
||||||
libpulseaudio,
|
libpulseaudio,
|
||||||
|
dbus,
|
||||||
ffmpeg,
|
ffmpeg,
|
||||||
wayland,
|
wayland,
|
||||||
|
vulkan-headers,
|
||||||
|
pipewire,
|
||||||
libdrm,
|
libdrm,
|
||||||
libva,
|
libva,
|
||||||
libglvnd,
|
libglvnd,
|
||||||
|
@ -20,16 +24,15 @@
|
||||||
wrapperDir ? "/run/wrappers/bin",
|
wrapperDir ? "/run/wrappers/bin",
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "gpu-screen-recorder";
|
pname = "gpu-screen-recorder";
|
||||||
version = "unstable-2024-07-05";
|
version = "4.2.1";
|
||||||
|
|
||||||
# Snapshot tarballs use the following versioning format:
|
|
||||||
# printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://dec05eba.com/snapshot/gpu-screen-recorder.git.r641.48cd80f.tar.gz";
|
url = "https://dec05eba.com/snapshot/gpu-screen-recorder.git.${finalAttrs.version}.tar.gz";
|
||||||
hash = "sha256-hIEK8EYIxQTTiFePPZf4V0nsxqxkfcDeOG9GK9whn+0=";
|
hash = "sha256-eCjAlPEg8lkL8T0lgxr0F8ouFGwqfsRxDSQuG6RbpZE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -42,8 +45,11 @@ stdenv.mkDerivation {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libXcomposite
|
libXcomposite
|
||||||
libpulseaudio
|
libpulseaudio
|
||||||
|
dbus
|
||||||
ffmpeg
|
ffmpeg
|
||||||
|
pipewire
|
||||||
wayland
|
wayland
|
||||||
|
vulkan-headers
|
||||||
libdrm
|
libdrm
|
||||||
libva
|
libva
|
||||||
libXdamage
|
libXdamage
|
||||||
|
@ -52,30 +58,35 @@ stdenv.mkDerivation {
|
||||||
libXfixes
|
libXfixes
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [ ./0001-Don-t-install-systemd-unit-files-using-absolute-path.patch ];
|
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dsystemd=true"
|
# Enable Wayland support
|
||||||
|
(lib.mesonBool "portal" true)
|
||||||
# Capabilities are handled by security.wrappers if possible.
|
# Handle by the module
|
||||||
"-Dcapabilities=false"
|
(lib.mesonBool "capabilities" false)
|
||||||
|
(lib.mesonBool "systemd" false)
|
||||||
|
(lib.mesonBool "nvidia_suspend_fix" false)
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir $out/bin/.wrapped
|
mkdir $out/bin/.wrapped
|
||||||
mv $out/bin/gpu-screen-recorder $out/bin/.wrapped/
|
mv $out/bin/gpu-screen-recorder $out/bin/.wrapped/
|
||||||
makeWrapper "$out/bin/.wrapped/gpu-screen-recorder" "$out/bin/gpu-screen-recorder" \
|
makeWrapper "$out/bin/.wrapped/gpu-screen-recorder" "$out/bin/gpu-screen-recorder" \
|
||||||
--prefix LD_LIBRARY_PATH : ${libglvnd}/lib \
|
--prefix LD_LIBRARY_PATH : "${
|
||||||
--prefix PATH : ${wrapperDir} \
|
lib.makeLibraryPath [
|
||||||
--suffix PATH : $out/bin
|
libglvnd
|
||||||
|
addDriverRunpath.driverLink
|
||||||
|
]
|
||||||
|
}" \
|
||||||
|
--prefix PATH : "${wrapperDir}" \
|
||||||
|
--suffix PATH : "$out/bin"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Screen recorder that has minimal impact on system performance by recording a window using the GPU only";
|
description = "Screen recorder that has minimal impact on system performance by recording a window using the GPU only";
|
||||||
mainProgram = "gpu-screen-recorder";
|
|
||||||
homepage = "https://git.dec05eba.com/gpu-screen-recorder/about/";
|
homepage = "https://git.dec05eba.com/gpu-screen-recorder/about/";
|
||||||
license = lib.licenses.gpl3Only;
|
license = lib.licenses.gpl3Only;
|
||||||
|
mainProgram = "gpu-screen-recorder";
|
||||||
maintainers = [ lib.maintainers.babbaj ];
|
maintainers = [ lib.maintainers.babbaj ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
|
@ -1,34 +1,35 @@
|
||||||
{ stdenv
|
{
|
||||||
, lib
|
stdenv,
|
||||||
, fetchurl
|
lib,
|
||||||
, pkg-config
|
fetchurl,
|
||||||
, desktop-file-utils
|
pkg-config,
|
||||||
, makeWrapper
|
addDriverRunpath,
|
||||||
, meson
|
desktop-file-utils,
|
||||||
, ninja
|
makeWrapper,
|
||||||
, gtk3
|
meson,
|
||||||
, libayatana-appindicator
|
ninja,
|
||||||
, libpulseaudio
|
gtk3,
|
||||||
, libdrm
|
libayatana-appindicator,
|
||||||
, gpu-screen-recorder
|
libpulseaudio,
|
||||||
, libglvnd
|
libdrm,
|
||||||
, libX11
|
gpu-screen-recorder,
|
||||||
, libXrandr
|
libglvnd,
|
||||||
, wayland
|
libX11,
|
||||||
, wrapGAppsHook3
|
libXrandr,
|
||||||
, wrapperDir ? "/run/wrappers/bin"
|
wayland,
|
||||||
|
wrapGAppsHook3,
|
||||||
|
wrapperDir ? "/run/wrappers/bin",
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "gpu-screen-recorder-gtk";
|
pname = "gpu-screen-recorder-gtk";
|
||||||
version = "unstable-2024-07-05";
|
version = "4.2.1";
|
||||||
|
|
||||||
# Snapshot tarballs use the following versioning format:
|
|
||||||
# printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://dec05eba.com/snapshot/gpu-screen-recorder-gtk.git.r311.c611c51.tar.gz";
|
url = "https://dec05eba.com/snapshot/gpu-screen-recorder-gtk.git.${finalAttrs.version}.tar.gz";
|
||||||
hash = "sha256-86EdmeZ2dlffSfJOrTVGPtYyL3j6DmCQIALX2rpeS1Y=";
|
hash = "sha256-qk5bI23fypvv0yN9Ql7TOerBhoRzj65EcoAy3lMGMqc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -50,23 +51,30 @@ stdenv.mkDerivation {
|
||||||
wayland
|
wayland
|
||||||
];
|
];
|
||||||
|
|
||||||
preFixup = let
|
preFixup =
|
||||||
gpu-screen-recorder-wrapped = gpu-screen-recorder.override {
|
let
|
||||||
inherit wrapperDir;
|
gpu-screen-recorder-wrapped = gpu-screen-recorder.override {
|
||||||
};
|
inherit wrapperDir;
|
||||||
in ''
|
};
|
||||||
gappsWrapperArgs+=(--prefix PATH : ${wrapperDir})
|
in
|
||||||
gappsWrapperArgs+=(--suffix PATH : ${lib.makeBinPath [ gpu-screen-recorder-wrapped ]})
|
''
|
||||||
# we also append /run/opengl-driver/lib as it otherwise fails to find libcuda.
|
gappsWrapperArgs+=(--prefix PATH : ${wrapperDir})
|
||||||
gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libglvnd ]}:/run/opengl-driver/lib)
|
gappsWrapperArgs+=(--suffix PATH : ${lib.makeBinPath [ gpu-screen-recorder-wrapped ]})
|
||||||
'';
|
gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ${
|
||||||
|
lib.makeLibraryPath [
|
||||||
|
libglvnd
|
||||||
|
addDriverRunpath.driverLink
|
||||||
|
]
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
changelog = "https://git.dec05eba.com/gpu-screen-recorder-gtk/tree/com.dec05eba.gpu_screen_recorder.appdata.xml#n82";
|
||||||
description = "GTK frontend for gpu-screen-recorder.";
|
description = "GTK frontend for gpu-screen-recorder.";
|
||||||
mainProgram = "gpu-screen-recorder-gtk";
|
|
||||||
homepage = "https://git.dec05eba.com/gpu-screen-recorder-gtk/about/";
|
homepage = "https://git.dec05eba.com/gpu-screen-recorder-gtk/about/";
|
||||||
license = lib.licenses.gpl3Only;
|
license = lib.licenses.gpl3Only;
|
||||||
|
mainProgram = "gpu-screen-recorder-gtk";
|
||||||
maintainers = with lib.maintainers; [ babbaj ];
|
maintainers = with lib.maintainers; [ babbaj ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue