fix(gsr): remove from path of script
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-11-26 20:48:07 -05:00
parent 441cb331e2
commit e221c4178f
4 changed files with 28 additions and 30 deletions

View file

@ -48,8 +48,6 @@ in {
pkgs.pulseaudio pkgs.pulseaudio
pkgs.xorg.xrandr pkgs.xorg.xrandr
gpu-screen-recorder
gsr-kms-server
hyprPkgs hyprPkgs
]; ];

View file

@ -17,6 +17,7 @@
vulkan-headers, vulkan-headers,
wayland, wayland,
xorg, xorg,
pname,
... ...
}: let }: let
inherit (lib) makeLibraryPath; inherit (lib) makeLibraryPath;
@ -28,7 +29,7 @@
.version; .version;
in in
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "gpu-screen-recorder"; inherit pname;
version = "${tag}+${gpu-screen-recorder-src.shortRev}"; version = "${tag}+${gpu-screen-recorder-src.shortRev}";
src = gpu-screen-recorder-src; src = gpu-screen-recorder-src;
@ -75,10 +76,27 @@ in
runHook postFixup runHook postFixup
''; '';
# This is needed to force gsr to lookup kms in PATH
# to get the security wrapper
postFixup =
if pname == "gpu-screen-recorder"
then
# bash
''
rm $out/bin/gsr-kms-server
''
else
# bash
''
rm $out/bin/gpu-screen-recorder
rm $out/bin/.gpu-screen-recorder-wrapped
'';
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";
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;
platforms = ["x86_64-linux"]; platforms = ["x86_64-linux"];
mainProgram = pname;
}; };
} }

View file

@ -2,15 +2,8 @@
callPackage, callPackage,
gpu-screen-recorder-src, gpu-screen-recorder-src,
... ...
}: let }:
gsr = callPackage ./generic.nix {inherit gpu-screen-recorder-src;}; callPackage ./generic.nix {
in pname = "gpu-screen-recorder";
gsr.overrideAttrs (o: { inherit gpu-screen-recorder-src;
postFixup = '' }
# This is needed to force gsr to lookup kms in PATH
# to get the security wrapper
rm $out/bin/gsr-kms-server
'';
meta = o.meta // {mainProgram = o.pname;};
})

View file

@ -2,19 +2,8 @@
callPackage, callPackage,
gpu-screen-recorder-src, gpu-screen-recorder-src,
... ...
}: let }:
callPackage ./generic.nix {
pname = "gsr-kms-server"; pname = "gsr-kms-server";
gsr = callPackage ./generic.nix {inherit gpu-screen-recorder-src;}; inherit gpu-screen-recorder-src;
in }
gsr.overrideAttrs (o: {
inherit pname;
postFixup = ''
# This is needed to force gsr to lookup kms in PATH
# to get the security wrapper
rm $out/bin/gpu-screen-recorder
rm $out/bin/.gpu-screen-recorder-wrapped
'';
meta = o.meta // {mainProgram = pname;};
})