Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions nixos/modules/programs/gpu-screen-recorder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ in
capabilities = "cap_sys_admin+ep";
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 ];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
stdenv,
lib,
fetchurl,
fetchgit,
pkg-config,
addDriverRunpath,
desktop-file-utils,
Expand All @@ -19,19 +19,19 @@
wayland,
wrapGAppsHook3,
wrapperDir ? "/run/wrappers/bin",
gitUpdater,
}:

stdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {

https://discourse.nixos.org/t/avoid-rec-expresions-in-nixpkgs/8293

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using finalAttrs instead of rec for version here would lead to #310373. I don't think there is a consensus on the best solution, but rec works fine here.

pname = "gpu-screen-recorder-gtk";
version = "5.1.6";
version = "5.7.0";

src = fetchurl {
url = "https://dec05eba.com/snapshot/gpu-screen-recorder-gtk.git.${finalAttrs.version}.tar.gz";
hash = "sha256-op5cDILQglVAW/oajc0rdrMC02JZZ8bdER1B1qWPkSk=";
src = fetchgit {
url = "https://repo.dec05eba.com/${pname}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
url = "https://repo.dec05eba.com/${pname}";
url = "https://repo.dec05eba.com/gpu-screen-recorder-gtk";

#277994

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rec being constant doesn't introduce any overriding traps here, so whether you use ${pname} or a literal value is a subjective choice. Imo this is nicer because it can be shared across all gpu-screen-recorder-* packages.

tag = version;
hash = "sha256-/s8FCV3hE7Gq1Ad6EhRNTZJwyskV+uRYvjJ43298AOw=";
};

sourceRoot = ".";

nativeBuildInputs = [
desktop-file-utils
pkg-config
Expand Down Expand Up @@ -68,13 +68,18 @@ stdenv.mkDerivation (finalAttrs: {
})
'';

passthru.updateScript = gitUpdater { };

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.";
homepage = "https://git.dec05eba.com/gpu-screen-recorder-gtk/about/";
license = lib.licenses.gpl3Only;
mainProgram = "gpu-screen-recorder-gtk";
maintainers = with lib.maintainers; [ babbaj ];
maintainers = with lib.maintainers; [
babbaj
js6pak
];
platforms = [ "x86_64-linux" ];
};
})
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
stdenv,
lib,
fetchurl,
fetchgit,
makeWrapper,
meson,
ninja,
Expand All @@ -12,6 +12,7 @@
dbus,
ffmpeg,
wayland,
wayland-scanner,
vulkan-headers,
pipewire,
libdrm,
Expand All @@ -22,19 +23,19 @@
libXrandr,
libXfixes,
wrapperDir ? "/run/wrappers/bin",
gitUpdater,
}:

stdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation rec {
pname = "gpu-screen-recorder";
version = "5.2.0";
version = "5.5.3";

src = fetchurl {
url = "https://dec05eba.com/snapshot/gpu-screen-recorder.git.${finalAttrs.version}.tar.gz";
hash = "sha256-7aUW0WhoTpkJhj9WjjI2lnq+vOCG53vl/4DckHmLPBo=";
src = fetchgit {
url = "https://repo.dec05eba.com/${pname}";
tag = version;
hash = "sha256-XXSHTS/WWqGblbBLuzHSYCY5FVTDSHBHfBWubmoNSy0=";
};

sourceRoot = ".";

nativeBuildInputs = [
pkg-config
makeWrapper
Expand All @@ -49,6 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
ffmpeg
pipewire
wayland
wayland-scanner
vulkan-headers
libdrm
libva
Expand Down Expand Up @@ -82,12 +84,17 @@ stdenv.mkDerivation (finalAttrs: {
--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 = [ lib.maintainers.babbaj ];
maintainers = with lib.maintainers; [
babbaj
js6pak
];
platforms = [ "x86_64-linux" ];
};
})
}
6 changes: 0 additions & 6 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12721,12 +12721,6 @@ with pkgs;
withDoc = true;
};

gpu-screen-recorder = callPackage ../applications/video/gpu-screen-recorder { };

gpu-screen-recorder-gtk =
callPackage ../applications/video/gpu-screen-recorder/gpu-screen-recorder-gtk.nix
{ };

gpxsee-qt5 = libsForQt5.callPackage ../applications/misc/gpxsee { };

gpxsee-qt6 = qt6Packages.callPackage ../applications/misc/gpxsee { };
Expand Down