libvmaf: fix build for BSD

Tested by building for FreeBSD and NetBSD.
This commit is contained in:
Alyssa Ross 2023-01-23 11:48:44 +00:00
parent d528d7c8d7
commit aafbe47972
No known key found for this signature in database
GPG key ID: F9DBED4859B271C0

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, meson, ninja, nasm }: { lib, stdenv, fetchFromGitHub, fetchpatch, meson, ninja, nasm }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libvmaf"; pname = "libvmaf";
@ -13,6 +13,15 @@ stdenv.mkDerivation rec {
sourceRoot = "source/libvmaf"; sourceRoot = "source/libvmaf";
patches = [
# Backport fix for non-Linux, non-Darwin platforms.
(fetchpatch {
url = "https://github.com/Netflix/vmaf/commit/f47640f9ffee9494571bd7c9622e353660c93fc4.patch";
stripLen = 1;
sha256 = "rsTKuqp8VJG5DBDpixPke3LrdfjKzUO945i+iL0n7CY=";
})
];
nativeBuildInputs = [ meson ninja nasm ]; nativeBuildInputs = [ meson ninja nasm ];
mesonFlags = [ "-Denable_avx512=true" ]; mesonFlags = [ "-Denable_avx512=true" ];