Add configuration
This commit is contained in:
1 parent
eb62e19766
commit
3b4fe6f60c
16 files changed
+1488
No files matched your search
Executable
+105
@@ -0,0 +1,105 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchgit,
|
||||
makeWrapper,
|
||||
meson,
|
||||
ninja,
|
||||
addDriverRunpath,
|
||||
pkg-config,
|
||||
libxcomposite,
|
||||
libpulseaudio,
|
||||
dbus,
|
||||
ffmpeg,
|
||||
wayland,
|
||||
wayland-scanner,
|
||||
vulkan-headers,
|
||||
pipewire,
|
||||
libdrm,
|
||||
libva,
|
||||
libglvnd,
|
||||
libxdamage,
|
||||
libxi,
|
||||
libxrandr,
|
||||
libxfixes,
|
||||
libjpeg_turbo,
|
||||
wrapperDir ? "/run/wrappers/bin",
|
||||
gitUpdater,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gpu-screen-recorder";
|
||||
version = "5.12.4";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://repo.dec05eba.com/${pname}";
|
||||
tag = version;
|
||||
hash = "sha256-VceAqiWeDJEAqx96Y4WHUTsPLeb4HvkNbl4fmMi296g=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
makeWrapper
|
||||
meson
|
||||
ninja
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libxcomposite
|
||||
libpulseaudio
|
||||
dbus
|
||||
ffmpeg
|
||||
pipewire
|
||||
wayland
|
||||
wayland-scanner
|
||||
vulkan-headers
|
||||
libdrm
|
||||
libva
|
||||
libxdamage
|
||||
libxi
|
||||
libxrandr
|
||||
libxfixes
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
# Install the upstream systemd unit
|
||||
(lib.mesonBool "systemd" true)
|
||||
# Enable Wayland support
|
||||
(lib.mesonBool "portal" true)
|
||||
# Handle by the module
|
||||
(lib.mesonBool "capabilities" true)
|
||||
(lib.mesonBool "nvidia_suspend_fix" true)
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/capture/v4l2.c \
|
||||
--replace-fail "libturbojpeg.so.0" "${lib.getLib libjpeg_turbo}/lib/libturbojpeg.so.0"
|
||||
'';
|
||||
|
||||
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 : "${
|
||||
lib.makeLibraryPath [
|
||||
libglvnd
|
||||
addDriverRunpath.driverLink
|
||||
]
|
||||
}" \
|
||||
--prefix PATH : "${wrapperDir}" \
|
||||
--suffix PATH : "$out/bin"
|
||||
'';
|
||||
|
||||
passthru.updateScript = gitUpdater {};
|
||||
|
||||
meta = {
|
||||
description = "Screen recorder that has minimal impact on system performance by recording a window using the GPU only";
|
||||
homepage = "https://git.dec05eba.com/gpu-screen-recorder/about/";
|
||||
license = lib.licenses.gpl3Only;
|
||||
mainProgram = "gpu-screen-recorder";
|
||||
maintainers = with lib.maintainers; [
|
||||
babbaj
|
||||
js6pak
|
||||
];
|
||||
platforms = ["x86_64-linux"];
|
||||
};
|
||||
}
|
||||
Executable
+60
@@ -0,0 +1,60 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchgit,
|
||||
pkg-config,
|
||||
meson,
|
||||
ninja,
|
||||
libx11,
|
||||
libxrender,
|
||||
libxrandr,
|
||||
libxext,
|
||||
libglvnd,
|
||||
wayland,
|
||||
wayland-scanner,
|
||||
gitUpdater,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gpu-screen-recorder-notification";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://repo.dec05eba.com/gpu-screen-recorder-notification";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-WMuHiXNdGPMLlf6DZJGNC/PJgnycRAvRhnW8m104/t0=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace depends/mglpp/depends/mgl/src/gl.c \
|
||||
--replace-fail "libGL.so.1" "${lib.getLib libglvnd}/lib/libGL.so.1" \
|
||||
--replace-fail "libGLX.so.0" "${lib.getLib libglvnd}/lib/libGLX.so.0" \
|
||||
--replace-fail "libEGL.so.1" "${lib.getLib libglvnd}/lib/libEGL.so.1"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
meson
|
||||
ninja
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libx11
|
||||
libxrender
|
||||
libxrandr
|
||||
libxext
|
||||
libglvnd
|
||||
wayland
|
||||
wayland-scanner
|
||||
];
|
||||
|
||||
passthru.updateScript = gitUpdater {};
|
||||
|
||||
meta = {
|
||||
description = "Notification in the style of ShadowPlay";
|
||||
homepage = "https://git.dec05eba.com/gpu-screen-recorder-notification/about/";
|
||||
license = lib.licenses.gpl3Only;
|
||||
mainProgram = "gsr-notify";
|
||||
maintainers = with lib.maintainers; [js6pak];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
diff --git a/meson.build b/meson.build
|
||||
index cf16e81..7c3629d 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -147,9 +147,6 @@ install_subdir('translations', install_dir : gsr_ui_resources_path)
|
||||
if get_option('desktop-files') == true
|
||||
install_data(files('gpu-screen-recorder.desktop'), install_dir : join_paths(prefix, datadir, 'applications'))
|
||||
install_subdir('icons/hicolor', install_dir : icons_path)
|
||||
-
|
||||
- gnome = import('gnome')
|
||||
- gnome.post_install(update_desktop_database : true)
|
||||
endif
|
||||
|
||||
if get_option('systemd') == true
|
||||
Executable
+105
@@ -0,0 +1,105 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchgit,
|
||||
pkg-config,
|
||||
meson,
|
||||
ninja,
|
||||
makeWrapper,
|
||||
gpu-screen-recorder,
|
||||
gpu-screen-recorder-notification,
|
||||
libx11,
|
||||
libxrender,
|
||||
libxrandr,
|
||||
libxcomposite,
|
||||
libxi,
|
||||
libxcursor,
|
||||
libglvnd,
|
||||
libpulseaudio,
|
||||
libdrm,
|
||||
dbus,
|
||||
wayland,
|
||||
wayland-scanner,
|
||||
wrapperDir ? "/run/wrappers/bin",
|
||||
gitUpdater,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gpu-screen-recorder-ui";
|
||||
version = "1.10.8";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://repo.dec05eba.com/gpu-screen-recorder-ui";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-x7MBTUWDKCzClq4ukgtFazOD/RLkX5lgmm9slN5BjVk=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./remove-gnome-postinstall.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace depends/mglpp/depends/mgl/src/gl.c \
|
||||
--replace-fail "libGL.so.1" "${lib.getLib libglvnd}/lib/libGL.so.1" \
|
||||
--replace-fail "libGLX.so.0" "${lib.getLib libglvnd}/lib/libGLX.so.0" \
|
||||
--replace-fail "libEGL.so.1" "${lib.getLib libglvnd}/lib/libEGL.so.1"
|
||||
|
||||
substituteInPlace extra/gpu-screen-recorder-ui.service \
|
||||
--replace-fail "ExecStart=gsr-ui" "ExecStart=$out/bin/gsr-ui"
|
||||
|
||||
substituteInPlace gpu-screen-recorder.desktop \
|
||||
--replace-fail "Exec=gsr-ui" "Exec=$out/bin/gsr-ui"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
meson
|
||||
ninja
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libx11
|
||||
libxrender
|
||||
libxrandr
|
||||
libxcomposite
|
||||
libxi
|
||||
libxcursor
|
||||
libglvnd
|
||||
libpulseaudio
|
||||
libdrm
|
||||
dbus
|
||||
wayland
|
||||
wayland-scanner
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
# Handled by the module
|
||||
(lib.mesonBool "capabilities" true)
|
||||
];
|
||||
|
||||
postInstall = let
|
||||
gpu-screen-recorder-wrapped = gpu-screen-recorder.override {
|
||||
inherit wrapperDir;
|
||||
};
|
||||
in ''
|
||||
wrapProgram "$out/bin/gsr-ui" \
|
||||
--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; [js6pak];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
Reference in new issue
Block a user