From f83cd5b0ac2797f17757da91e97c4d974b8eafe6 Mon Sep 17 00:00:00 2001 From: Bakhtiyar Neyman Date: Tue, 24 Feb 2026 23:20:34 -0800 Subject: [PATCH] nixos/frigate: use upstream grep command for LIBAVFORMAT_VERSION_MAJOR Co-Authored-By: Claude Opus 4.6 --- nixos/modules/services/video/frigate.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nixos/modules/services/video/frigate.nix b/nixos/modules/services/video/frigate.nix index 82795e50deef..517d2b3b7f53 100644 --- a/nixos/modules/services/video/frigate.nix +++ b/nixos/modules/services/video/frigate.nix @@ -704,9 +704,7 @@ in LIBAVFORMAT_VERSION_MAJOR = lib.strings.trim ( builtins.readFile ( pkgs.runCommandLocal "libavformat-major-version" { } '' - ${cfg.settings.ffmpeg.path}/bin/ffmpeg -version 2>&1 \ - | sed -n 's/.*libavformat[[:space:]]*\([0-9]*\).*/\1/p' \ - | head -1 > $out + ${cfg.settings.ffmpeg.path}/bin/ffmpeg -version | grep -Po "libavformat\W+\K\d+" > $out '' ) );