From a486739e74654ff7cca0408fa3d5531f97cd865c Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Mon, 1 Sep 2025 22:28:33 +0000 Subject: [PATCH 1/2] lcevcdec: 3.3.8 -> 4.0.1 --- pkgs/by-name/lc/lcevcdec/package.nix | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/lc/lcevcdec/package.nix b/pkgs/by-name/lc/lcevcdec/package.nix index 6ca495b21718..29c6acb14aae 100644 --- a/pkgs/by-name/lc/lcevcdec/package.nix +++ b/pkgs/by-name/lc/lcevcdec/package.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "lcevcdec"; - version = "3.3.8"; + version = "4.0.1"; outputs = [ "out" @@ -26,16 +26,9 @@ stdenv.mkDerivation (finalAttrs: { owner = "v-novaltd"; repo = "LCEVCdec"; tag = finalAttrs.version; - hash = "sha256-s7gY3l5ML+7T7i6DsstC75XXgxQgTWyITfa+8OhHl+w="; + hash = "sha256-azY4xle2wwopT9qEHa4+nXPkGzscWz9tYof1qN7Nw8c="; }; - patches = [ - (fetchpatch { - url = "https://aur.archlinux.org/cgit/aur.git/plain/010-lcevcdec-fix-pkgconfig-libs.patch?h=lcevcdec&id=a3470fad7d64dfc9d5ebd7ed0c09cb1fb5e2488f"; - hash = "sha256-z65W3k2OA/QDX0jJu4nmXtpi8kTcUFN7cK82PsI4jrQ="; - }) - ]; - postPatch = '' substituteInPlace cmake/tools/version_files.py \ --replace-fail "args.git_version" '"${finalAttrs.version}"' \ @@ -43,20 +36,11 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail "args.git_date" '"1970-01-01"' substituteInPlace cmake/templates/lcevc_dec.pc.in \ --replace-fail "@GIT_SHORT_VERSION@" "${finalAttrs.version}" - - '' - + lib.optionalString (!stdenv.hostPlatform.avxSupport) '' - substituteInPlace cmake/modules/Compiler/GNU.cmake \ - --replace-fail "-mavx" "" - - substituteInPlace src/core/decoder/src/common/simd.c \ - --replace-fail "((_xgetbv(kControlRegister) & kOSXSaveMask) == kOSXSaveMask)" "false" ''; env = { includedir = "${placeholder "dev"}/include"; libdir = "${placeholder "out"}/lib"; - NIX_CFLAGS_COMPILE = "-Wno-error=unused-variable"; }; nativeBuildInputs = [ @@ -78,6 +62,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "VN_CORE_AVX2" stdenv.hostPlatform.avx2Support) # Requires avx for checking on runtime (lib.cmakeBool "VN_CORE_SSE" stdenv.hostPlatform.avxSupport) + (lib.cmakeBool "VN_SDK_SIMD" stdenv.hostPlatform.avxSupport) ]; passthru = { From f703f1e4b6007b3fc10ff61754b1f2f2e5337276 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Sat, 6 Sep 2025 17:02:02 +0200 Subject: [PATCH 2/2] ffmpeg: fix build against newer lcevcdec lib --- pkgs/development/libraries/ffmpeg/generic.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 940dd6c9ffc2..27216ea5142e 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -512,6 +512,11 @@ stdenv.mkDerivation ( url = "https://gitlab.archlinux.org/archlinux/packaging/packages/ffmpeg/-/raw/a02c1a15706ea832c0d52a4d66be8fb29499801a/add-av_stream_get_first_dts-for-chromium.patch"; hash = "sha256-DbH6ieJwDwTjKOdQ04xvRcSLeeLP2Z2qEmqeo8HsPr4="; }) + (fetchpatch2 { + name = "lcevcdec-4.0.0-compat.patch"; + url = "https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/fa23202cc7baab899894e8d22d82851a84967848.patch"; + hash = "sha256-Ixkf1xzuDGk5t8J/apXKtghY0X9cfqSj/q987zrUuLQ="; + }) ] ++ optionals (lib.versionOlder version "7.2") [ (fetchpatch2 {