Flake Inputs: • Updated input 'gpu-screen-recorder-src': 'git+https://repo.dec05eba.com/gpu-screen-recorder' (2025-04-04) rev: 4e614a18bc8268f72b290a67b66fdc22cc50643d → 'git+https://repo.dec05eba.com/gpu-screen-recorder' (2025-04-04) rev: 01040796ee93d342622b258c2668ad7ba9e989bb • Updated input 'home-manager': 'github:nix-community/home-manager' (2025-04-04) rev: 0f5908daf890c3d7e7052bef1d6deb0f2710aaa1 → 'github:nix-community/home-manager' (2025-04-05) rev: d094c6763c6ddb860580e7d3b4201f8f496a6836 • Updated input 'hyprland': 'github:hyprwm/Hyprland' (2025-04-03) rev: ff97d18c4c61ae14f8f3b80178e6b72c8a4b7901 → 'github:hyprwm/Hyprland' (2025-04-05) rev: ed05f14300adecfa2c289d2100a00ca60da72992 • Updated input 'hyprland-plugins': 'github:hyprwm/hyprland-plugins' (2025-03-30) rev: 6dca4ece21864e329394b81cfc767778089097e2 → 'github:hyprwm/hyprland-plugins' (2025-04-05) rev: cef1854a542f6d121817a33fd6a3611d59d3e0af • Updated input 'jovian': 'github:Jovian-Experiments/Jovian-NixOS' (2025-04-03) rev: c7ade1c8fe2bdb70d38b3b9a97b874dcaf33b755 → 'github:Jovian-Experiments/Jovian-NixOS' (2025-04-05) rev: 96a7fbb4a892696ff89d3d42fc743ab5d6714222 • Updated input 'nix-fast-build': 'github:Mic92/nix-fast-build' (2025-04-04) rev: 65f8b77cb4c212749885bc79bafaec9b9d5c33e6 → 'github:Mic92/nix-fast-build' (2025-04-05) rev: 2fadd8696095bde39531e3815deea894a00b9b4a • Updated input 'nixcord': 'github:kaylorben/nixcord' (2025-04-04) rev: 48e192d4592a6c33e596fdc127e5025bee53bf3d → 'github:kaylorben/nixcord' (2025-04-05) rev: 2903d897d5939324a758bd3f2cee1fbcb118b5d1 • Updated input 'nixos-jellyfin': 'github:matt1432/nixos-jellyfin' (2025-03-21) rev: c067c4c74b6579c38dc4f205b74a801cbea12019 → 'github:matt1432/nixos-jellyfin' (2025-04-05) rev: f44bfb41d40e9038116fa7f6dabf34eac6845bd9 • Updated input 'tuya-local-src': 'github:make-all/tuya-local' (2025-04-04) rev: 58815f19a48a4b0c566420e4e35321c5389f5140 → 'github:make-all/tuya-local' (2025-04-05) rev: 11304d6acd978ffd433ca8a26959c79f50fd9134 Docker Images: • ghcr.io/linuxserver/sonarr latest: sha256:aa566541ea012f41dd0eedc8bbc67910456713b750d1ace663950ce934269036 → sha256:7342ef32dd9cd6d13638765cfb8034edd4c80b0584f427159fd7f5ddeef5399d Node modules: eslint: 9.23.0 -> 9.24.0 typescript: 5.8.2 -> 5.8.3 @eslint/js: 9.23.0 -> 9.24.0
116 lines
2.2 KiB
Nix
116 lines
2.2 KiB
Nix
{
|
|
# params
|
|
pname,
|
|
description,
|
|
isKmsServer ? false,
|
|
# nix build inputs
|
|
lib,
|
|
stdenv,
|
|
addDriverRunpath,
|
|
makeWrapper,
|
|
gpu-screen-recorder-src,
|
|
# deps
|
|
dbus,
|
|
ffmpeg,
|
|
libdrm,
|
|
libglvnd,
|
|
libpulseaudio,
|
|
libva,
|
|
meson,
|
|
ninja,
|
|
pipewire,
|
|
pkg-config,
|
|
vulkan-headers,
|
|
wayland,
|
|
wayland-scanner,
|
|
xorg,
|
|
...
|
|
}: let
|
|
inherit (lib) makeLibraryPath optionalString;
|
|
inherit (builtins) fromTOML readFile;
|
|
|
|
tag =
|
|
(fromTOML (readFile "${gpu-screen-recorder-src}/project.conf"))
|
|
.package
|
|
.version;
|
|
in
|
|
stdenv.mkDerivation {
|
|
inherit pname;
|
|
version = "${tag}+${gpu-screen-recorder-src.shortRev}";
|
|
|
|
src = gpu-screen-recorder-src;
|
|
|
|
# Get rid of useless warning due to how I install the package
|
|
postPatch = ''
|
|
sed -i 's/.*gsr-kms-server is not installed in the same directory.*//' ./kms/client/kms_client.c
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
dbus
|
|
ffmpeg
|
|
libdrm
|
|
libpulseaudio
|
|
libva
|
|
pipewire
|
|
vulkan-headers
|
|
wayland
|
|
wayland-scanner
|
|
xorg.libXcomposite
|
|
xorg.libXdamage
|
|
xorg.libXi
|
|
xorg.libXrandr
|
|
];
|
|
|
|
mesonFlags = [
|
|
"-Dcapabilities=false"
|
|
"-Dnvidia_suspend_fix=false"
|
|
"-Dsystemd=false"
|
|
];
|
|
|
|
fixupPhase =
|
|
optionalString (!isKmsServer)
|
|
# bash
|
|
''
|
|
runHook preFixup
|
|
|
|
wrapProgram $out/bin/gpu-screen-recorder \
|
|
--prefix LD_LIBRARY_PATH : "${
|
|
makeLibraryPath [
|
|
addDriverRunpath.driverLink
|
|
libglvnd
|
|
]
|
|
}"
|
|
|
|
runHook postFixup
|
|
'';
|
|
|
|
# This is needed to force gsr to lookup kms in PATH
|
|
# to get the security wrapper
|
|
postFixup =
|
|
if isKmsServer
|
|
then
|
|
# bash
|
|
''
|
|
rm $out/bin/gpu-screen-recorder
|
|
''
|
|
else
|
|
# bash
|
|
''
|
|
rm $out/bin/gsr-kms-server
|
|
'';
|
|
|
|
meta = {
|
|
mainProgram = pname;
|
|
license = lib.licenses.gpl3Only;
|
|
platforms = ["x86_64-linux"];
|
|
homepage = "https://git.dec05eba.com/gpu-screen-recorder/about";
|
|
inherit description;
|
|
};
|
|
}
|