Unverified Commit 590eff31 authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

ffmpeg_8{,-headless,-full}: init at 8.0 (#435958)

parents 75a69094 ded0cc94
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -114,6 +114,8 @@

- `lisp-modules` were brought in sync with the [June 2025 Quicklisp release](http://blog.quicklisp.org/2025/07/june-2025-quicklisp-dist-now-available.html).

- `ffmpeg_8`, `ffmpeg_8-headless`, and `ffmpeg_8-full` have been added. The default version of FFmpeg remains ffmpeg_7 for now, though this may change before release.

- `searx` was updated to use `envsubst` instead of `sed` for parsing secrets from environment variables.
  If your previous configuration included a secret reference like `server.secret_key = "@SEARX_SECRET_KEY@"`, you must migrate to the new envsubst syntax: `server.secret_key = "$SEARX_SECRET_KEY"`.

+37 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  writeText,
  fetchFromGitHub,
  cmake,
}:
let
  # Requires an /etc/os-release file, so we override it with this.
  osRelease = writeText "os-release" ''ID=NixOS'';
in
stdenv.mkDerivation (finalAttrs: {
  pname = "openapv";
  version = "0.2.0.1";

  src = fetchFromGitHub {
    owner = "AcademySoftwareFoundation";
    repo = "openapv";
    tag = "v${finalAttrs.version}";
    hash = "sha256-Edj3xQ7AcHcdIbg4o2FidAGZ06fUBltW+1ojJPoIktA=";
  };

  postPatch = ''
    substituteInPlace CMakeLists.txt \
      --replace-fail "/etc/os-release" "${osRelease}"
  '';

  nativeBuildInputs = [ cmake ];

  meta = {
    changelog = "https://github.com/AcademySoftwareFoundation/openapv/releases/tag/v${finalAttrs.version}";
    description = "Reference implementation of the APV codec";
    homepage = "https://github.com/AcademySoftwareFoundation/openapv";
    license = [ lib.licenses.bsd3 ];
    maintainers = with lib.maintainers; [ pyrox0 ];
  };
})
+8 −0
Original line number Diff line number Diff line
@@ -29,6 +29,10 @@ let
    version = "7.1.1";
    hash = "sha256-GyS8imOqfOUPxXrzCiQtzCQIIH6bvWmQAB0fKUcRsW4=";
  };
  v8 = {
    version = "8.0";
    hash = "sha256-okNZ1/m/thFAY3jK/GSV0+WZFnjrMr8uBPsOdH6Wq9E=";
  };
in

rec {
@@ -47,6 +51,10 @@ rec {
  ffmpeg_7-headless = mkFFmpeg v7 "headless";
  ffmpeg_7-full = mkFFmpeg v7 "full";

  ffmpeg_8 = mkFFmpeg v8 "small";
  ffmpeg_8-headless = mkFFmpeg v8 "headless";
  ffmpeg_8-full = mkFFmpeg v8 "full";

  # Please make sure this is updated to new major versions once they
  # build and work on all the major platforms. If absolutely necessary
  # due to severe breaking changes, the bump can wait a little bit to
+27 −2
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
  texinfo,
  texinfo6,
  yasm,
  nasm,

  # You can fetch any upstream version using this derivation by specifying version and hash
  # NOTICE: Always use this argument to override the version. Do not use overrideAttrs.
@@ -108,6 +109,7 @@
  withNvdec ? withHeadlessDeps && withNvcodec,
  withNvenc ? withHeadlessDeps && withNvcodec,
  withOpenal ? withFullDeps, # OpenAL 1.1 capture support
  withOpenapv ? withHeadlessDeps && lib.versionAtLeast version "8.0", # APV encoding support
  withOpencl ? withHeadlessDeps,
  withOpencoreAmrnb ? withFullDeps && withVersion3, # AMR-NB de/encoder
  withOpencoreAmrwb ? withFullDeps && withVersion3, # AMR-WB decoder
@@ -152,6 +154,7 @@
  withVulkan ? withHeadlessDeps && !stdenv.hostPlatform.isDarwin,
  withVvenc ? withFullDeps && lib.versionAtLeast version "7.1", # H.266/VVC encoding
  withWebp ? withHeadlessDeps, # WebP encoder
  withWhisper ? withFullDeps && lib.versionAtLeast version "8.0", # Whisper speech recognition
  withX264 ? withHeadlessDeps && withGPL, # H.264/AVC encoder
  withX265 ? withHeadlessDeps && withGPL, # H.265/HEVC encoder
  withXavs ? withFullDeps && withGPL, # AVS encoder
@@ -206,7 +209,9 @@
  # https://github.com/NixOS/nixpkgs/pull/211834#issuecomment-1417435991)
  buildAvresample ? withHeadlessDeps && lib.versionOlder version "5", # Build avresample library
  buildAvutil ? withHeadlessDeps, # Build avutil library
  buildPostproc ? withHeadlessDeps, # Build postproc library
  # Libpostproc is only available on versions lower than 8.0
  # https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/8c920c4c396163e3b9a0b428dd550d3c986236aa
  buildPostproc ? withHeadlessDeps && lib.versionOlder version "8.0", # Build postproc library
  buildSwresample ? withHeadlessDeps, # Build swresample library
  buildSwscale ? withHeadlessDeps, # Build swscale library
  withLib ?
@@ -313,6 +318,7 @@
  nv-codec-headers-12,
  ocl-icd, # OpenCL ICD
  openal,
  openapv,
  opencl-headers, # OpenCL headers
  opencore-amr,
  openh264,
@@ -338,6 +344,7 @@
  vulkan-headers,
  vulkan-loader,
  vvenc,
  whisper-cpp,
  x264,
  x265,
  xavs,
@@ -570,7 +577,12 @@ stdenv.mkDerivation (
    ]
    ++ [
      (enableFeature buildAvutil "avutil")
    ]
    ++ optionals (lib.versionOlder version "8.0") [
      # FFMpeg >= 8 doesn't know about the flag anymore
      (enableFeature (buildPostproc && withGPL) "postproc")
    ]
    ++ [
      (enableFeature buildSwresample "swresample")
      (enableFeature buildSwscale "swscale")
    ]
@@ -678,6 +690,11 @@ stdenv.mkDerivation (
      (enableFeature withNvdec "nvdec")
      (enableFeature withNvenc "nvenc")
      (enableFeature withOpenal "openal")
    ]
    ++ optionals (versionAtLeast version "8.0") [
      (enableFeature withOpenapv "liboapv")
    ]
    ++ [
      (enableFeature withOpencl "opencl")
      (enableFeature withOpencoreAmrnb "libopencore-amrnb")
      (enableFeature withOpencoreAmrwb "libopencore-amrwb")
@@ -742,6 +759,11 @@ stdenv.mkDerivation (
    ]
    ++ [
      (enableFeature withWebp "libwebp")
    ]
    ++ optionals (versionAtLeast version "8.0") [
      (enableFeature withWhisper "whisper")
    ]
    ++ [
      (enableFeature withX264 "libx264")
      (enableFeature withX265 "libx265")
      (enableFeature withXavs "libxavs")
@@ -803,8 +825,9 @@ stdenv.mkDerivation (
      addDriverRunpath
      perl
      pkg-config
      yasm
    ]
    # 8.0 is only compatible with nasm, and we don't want to rebuild all older ffmpeg builds at this moment.
    ++ (if versionOlder version "8.0" then [ yasm ] else [ nasm ])
    # Texinfo version 7.1 introduced breaking changes, which older versions of ffmpeg do not handle.
    ++ (if versionOlder version "5" then [ texinfo6 ] else [ texinfo ])
    ++ optionals withCudaLLVM [ clang ]
@@ -874,6 +897,7 @@ stdenv.mkDerivation (
        cuda_nvcc
      ]
      ++ optionals withOpenal [ openal ]
      ++ optionals withOpenapv [ openapv ]
      ++ optionals withOpencl [
        ocl-icd
        opencl-headers
@@ -928,6 +952,7 @@ stdenv.mkDerivation (
      ]
      ++ optionals withVvenc [ vvenc ]
      ++ optionals withWebp [ libwebp ]
      ++ optionals withWhisper [ whisper-cpp ]
      ++ optionals withX264 [ x264 ]
      ++ optionals withX265 [ x265 ]
      ++ optionals withXavs [ xavs ]
+3 −0
Original line number Diff line number Diff line
@@ -7579,6 +7579,9 @@ with pkgs;
    ffmpeg_7
    ffmpeg_7-headless
    ffmpeg_7-full
    ffmpeg_8
    ffmpeg_8-headless
    ffmpeg_8-full
    ffmpeg
    ffmpeg-headless
    ffmpeg-full