-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
gpu-screen-recorder-ui: init at 1.10.8 #369574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
js6pak
wants to merge
3
commits into
NixOS:master
Choose a base branch
from
js6pak:gpu-screen-recorder-ui/init
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| { | ||
| config, | ||
| lib, | ||
| pkgs, | ||
| ... | ||
| }: | ||
|
|
||
| let | ||
| cfg = config.programs.gpu-screen-recorder-ui; | ||
| package = cfg.package.override { | ||
| inherit (config.security) wrapperDir; | ||
| }; | ||
| in | ||
| { | ||
| options = { | ||
| programs.gpu-screen-recorder-ui = { | ||
| package = lib.mkPackageOption pkgs "gpu-screen-recorder-ui" { }; | ||
|
|
||
| enable = lib.mkOption { | ||
| type = lib.types.bool; | ||
| default = false; | ||
| description = '' | ||
| Whether to install gpu-screen-recorder-ui and generate setcap | ||
| wrappers for global hotkeys. | ||
| ''; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| config = lib.mkIf cfg.enable { | ||
| programs.gpu-screen-recorder.enable = lib.mkDefault true; | ||
|
|
||
| environment.systemPackages = [ package ]; | ||
|
|
||
| systemd.packages = [ package ]; | ||
|
|
||
| security.wrappers."gsr-global-hotkeys" = { | ||
| owner = "root"; | ||
| group = "root"; | ||
| capabilities = "cap_setuid+ep"; | ||
| source = lib.getExe' package "gsr-global-hotkeys"; | ||
| }; | ||
| }; | ||
|
|
||
| meta.maintainers = with lib.maintainers; [ js6pak ]; | ||
| } | ||
61 changes: 61 additions & 0 deletions
61
pkgs/by-name/gp/gpu-screen-recorder-notification/package.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| { | ||
| 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.0"; | ||
|
|
||
| src = fetchgit { | ||
| url = "https://repo.dec05eba.com/gpu-screen-recorder-notification"; | ||
| tag = finalAttrs.version; | ||
| hash = "sha256-ODifZ046DEBNiGT3+S6pQyF8ekrb6LIHWton8nv1MBo="; | ||
| }; | ||
|
|
||
| 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" | ||
| ''; | ||
js6pak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 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"; | ||
js6pak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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; | ||
| }; | ||
| }) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| { | ||
| lib, | ||
| stdenv, | ||
| fetchgit, | ||
| pkg-config, | ||
| meson, | ||
| ninja, | ||
| makeWrapper, | ||
| gpu-screen-recorder, | ||
| gpu-screen-recorder-notification, | ||
| libx11, | ||
| libxrender, | ||
| libxrandr, | ||
| libxcomposite, | ||
| libxi, | ||
| libxcursor, | ||
| libglvnd, | ||
js6pak marked this conversation as resolved.
Show resolved
Hide resolved
js6pak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| libpulseaudio, | ||
| libdrm, | ||
| dbus, | ||
| wayland, | ||
| wayland-scanner, | ||
| wrapperDir ? "/run/wrappers/bin", | ||
js6pak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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" | ||
| ''; | ||
js6pak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| nativeBuildInputs = [ | ||
| pkg-config | ||
| meson | ||
| ninja | ||
| makeWrapper | ||
| ]; | ||
|
|
||
| buildInputs = [ | ||
| libx11 | ||
| libxrender | ||
| libxrandr | ||
| libxcomposite | ||
| libxi | ||
| libxcursor | ||
| libglvnd | ||
js6pak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| libpulseaudio | ||
js6pak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| libdrm | ||
| dbus | ||
| wayland | ||
| wayland-scanner | ||
| ]; | ||
|
|
||
| mesonFlags = [ | ||
| # Handled by the module | ||
| (lib.mesonBool "capabilities" false) | ||
| ]; | ||
|
|
||
| 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; | ||
| }; | ||
| }) | ||
14 changes: 14 additions & 0 deletions
14
pkgs/by-name/gp/gpu-screen-recorder-ui/remove-gnome-postinstall.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on having this be in
programs.gpu-screen-recorder.uior something similar instead of clogging up the namespace.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking is that
gpu-screen-recorder/gpu-screen-recorder-uiare designed in a way to be independent of each other, so it makes sense to treat them as separate projects. The frontend could have very well been made by a different person, in which case it would feel weird to merge the options.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gpu-screen-recorder-uiassumes that it can callgpu-screen-recorderwith very specific options, so that sounds highly dependent to me (and we are even settingprograms.gpu-screen-recorder.enabledifprograms.gpu-screen-recorder-ui.enabledis given). Further, even if someone makes a compatible third-party backend in the future then the contract would still feasibly be namedgpu-screen-recorder, since that is what the compatibility is measured by.Therefore, it would be reasonable to have everything in
programs.gpu-screen-recorder, since there will beprograms.gpu-screen-recorder.packageto adjust the backend implementation andprograms.gpu-screen-recorder.ui.packageto adjust the frontend implementation (and the respectiveenableoptions, obviously).That said, according to the derivation,
gpu-screen-recorder-uicurrently strictly depends on thegpu-screen-recorderderivation with no way of changing that, so any argument about them being any kind of independent is moot anyway.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current
programs.gpu-screen-recorder/programs.gpu-screen-recorder-uimodules are really only for the setuid wrappers, so an alternative frontend wouldn't have a reason to reuse it. Like in my mind, what you are suggesting would be akin to adding aprograms.ffmpeg.{vlc,mpv}.enable.