nixos/frigate: don't assume grep is on path

This commit is contained in:
Martin Weinelt 2026-03-11 22:26:11 +01:00
commit f37b8622ce
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -761,7 +761,7 @@ in
++ lib.optionals (!config.systemd.services.frigate.environment ? LIBAVFORMAT_VERSION_MAJOR) [
# Extract libavformat version to enable version-dependent flags in ffmpeg
(pkgs.writeShellScript "frigate-libavformat-major-version" ''
echo "LIBAVFORMAT_VERSION_MAJOR=$(${cfg.settings.ffmpeg.path}/bin/ffmpeg -version | grep -Po "libavformat\W+\K\d+")" > /run/frigate/ffmpeg-env
echo "LIBAVFORMAT_VERSION_MAJOR=$(${cfg.settings.ffmpeg.path}/bin/ffmpeg -version | ${lib.getExe pkgs.gnugrep} -Po "libavformat\W+\K\d+")" > /run/frigate/ffmpeg-env
echo "Detected $(cat /run/frigate/ffmpeg-env)"
'')
];