From 5aa3d00b178b0f9165c87f006e919375bf637f25 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Thu, 6 Mar 2025 12:12:48 -0700 Subject: [PATCH] openh264: fix build for FreeBSD --- pkgs/by-name/op/openh264/package.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/op/openh264/package.nix b/pkgs/by-name/op/openh264/package.nix index c4518d3124ae..f62ea69a3e21 100644 --- a/pkgs/by-name/op/openh264/package.nix +++ b/pkgs/by-name/op/openh264/package.nix @@ -1,6 +1,7 @@ { lib, fetchFromGitHub, + fetchpatch, gtest, meson, nasm, @@ -26,6 +27,15 @@ stdenv.mkDerivation (finalAttrs: { "dev" ]; + patches = [ + # https://github.com/cisco/openh264/pull/3867 + (fetchpatch { + name = "freebsd-configure.patch"; + url = "https://github.com/cisco/openh264/commit/ea8a1ad5791ee5c4e2ecf459aec235128d69b35b.patch"; + hash = "sha256-pJvh9eRxFZQ+ob4WPu/x+jr1CCpgnug1uBViLfAtBDg="; + }) + ]; + nativeBuildInputs = [ meson nasm @@ -58,6 +68,6 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.platforms.aarch64 ++ lib.platforms.loongarch64 ++ lib.platforms.riscv64 - ) (lib.platforms.linux ++ lib.platforms.darwin); + ) lib.platforms.unix; }; })