chore: fix update script and update flake.lock

This commit is contained in:
matt1432 2024-06-11 16:42:47 -04:00
parent 31c3cd5f7d
commit b869da9668
13 changed files with 318 additions and 131 deletions
pkgs
default.nix
gpu-screen-recorder

View file

@ -1,6 +1,7 @@
{
pkgs,
curseforge-server-downloader-src,
gpu-screen-recorder-src,
pam-fprint-grosshack-src,
pokemon-colorscripts-src,
...
@ -11,6 +12,10 @@
inherit curseforge-server-downloader-src;
};
gpu-screen-recorder = pkgs.callPackage ./gpu-screen-recorder {
inherit gpu-screen-recorder-src;
};
pam-fprint-grosshack = pkgs.callPackage ./pam-fprint-grosshack {
inherit pam-fprint-grosshack-src;
};

View file

@ -0,0 +1,66 @@
{
addOpenGLRunpath,
stdenv,
ffmpeg,
gpu-screen-recorder-src,
lib,
libdrm,
libglvnd,
libpulseaudio,
libva,
makeWrapper,
meson,
ninja,
pkg-config,
wayland,
xorg,
...
}: let
inherit (lib) makeLibraryPath;
inherit (builtins) fromTOML readFile;
tag =
(fromTOML (readFile "${gpu-screen-recorder-src}/project.conf"))
.package
.version;
in
stdenv.mkDerivation {
name = "gpu-screen-recorder";
version = "${tag}+${gpu-screen-recorder-src.shortRev}";
src = gpu-screen-recorder-src;
nativeBuildInputs = [
pkg-config
makeWrapper
meson
ninja
];
buildInputs = [
libpulseaudio
ffmpeg
wayland
libdrm
libva
xorg.libXcomposite
xorg.libXrandr
];
postPatch = ''
# don't try to setcap/suid in a nix builder
substituteInPlace ./meson.build --replace \
"meson.add_install_script('extra/meson_post_install.sh')" \
"# meson.add_install_script('extra/meson_post_install.sh')"
'';
fixupPhase = ''
wrapProgram $out/bin/gpu-screen-recorder \
--prefix LD_LIBRARY_PATH : "${
makeLibraryPath [
addOpenGLRunpath.driverLink
libglvnd
]
}"
'';
}