From a7ba7b6d01958b31c15cc530b8a6a19ad3185067 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 6 Feb 2023 16:43:21 +0000 Subject: [PATCH] Revert "Revert Merge #214786: libvmaf: fix build for BSD" This reverts commit 8030c64577a7973d07537e2bb446c14ccedaa14c. Reverted due to an accidental mass rebuild. Relanding on staging. --- pkgs/development/libraries/libvmaf/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libvmaf/default.nix b/pkgs/development/libraries/libvmaf/default.nix index e7add08871a..c0fc4d1556f 100644 --- a/pkgs/development/libraries/libvmaf/default.nix +++ b/pkgs/development/libraries/libvmaf/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, meson, ninja, nasm }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, meson, ninja, nasm }: stdenv.mkDerivation rec { pname = "libvmaf"; @@ -13,6 +13,15 @@ stdenv.mkDerivation rec { 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 ]; mesonFlags = [ "-Denable_avx512=true" ];