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.xorg.xrandr
gpu-screen-recorder
gsr-kms-server
hyprPkgs
];

View file

@ -17,6 +17,7 @@
vulkan-headers,
wayland,
xorg,
pname,
...
}: let
inherit (lib) makeLibraryPath;
@ -28,7 +29,7 @@
.version;
in
stdenv.mkDerivation {
pname = "gpu-screen-recorder";
inherit pname;
version = "${tag}+${gpu-screen-recorder-src.shortRev}";
src = gpu-screen-recorder-src;
@ -75,10 +76,27 @@ in
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 = {
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;
platforms = ["x86_64-linux"];
mainProgram = pname;
};
}

View file

@ -2,15 +2,8 @@
callPackage,
gpu-screen-recorder-src,
...
}: let
gsr = callPackage ./generic.nix {inherit gpu-screen-recorder-src;};
in
gsr.overrideAttrs (o: {
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;};
})
}:
callPackage ./generic.nix {
pname = "gpu-screen-recorder";
inherit gpu-screen-recorder-src;
}

View file

@ -2,19 +2,8 @@
callPackage,
gpu-screen-recorder-src,
...
}: let
}:
callPackage ./generic.nix {
pname = "gsr-kms-server";
gsr = callPackage ./generic.nix {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;};
})
inherit gpu-screen-recorder-src;
}