ffmpeg: work around ld64 hardening issue (#537840)

This commit is contained in:
Emily 2026-07-02 16:09:11 +00:00 committed by GitHub
commit 93c02ccb3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -367,6 +367,9 @@
libnpp,
# Testing
testers,
# TODO: Clean up on `staging`.
llvmPackages,
}:
/*
@ -832,7 +835,9 @@ stdenv.mkDerivation (
# Texinfo version 7.1 introduced breaking changes, which older versions of ffmpeg do not handle.
++ optionals (lib.versionAtLeast version "6") [ texinfo ]
++ optionals withCudaLLVM [ clang.cc ]
++ optionals withCudaNVCC [ cuda_nvcc ];
++ optionals withCudaNVCC [ cuda_nvcc ]
# TODO: Clean up on `staging`.
++ optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ];
buildInputs =
[ ]
@ -976,12 +981,17 @@ stdenv.mkDerivation (
buildFlags = [ "all" ] ++ optional buildQtFaststart "tools/qt-faststart"; # Build qt-faststart executable
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=incompatible-pointer-types"
"-Wno-error=int-conversion"
];
};
env =
lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=incompatible-pointer-types"
"-Wno-error=int-conversion"
];
}
# TODO: Clean up on `staging`.
// lib.optionalAttrs stdenv.hostPlatform.isDarwin {
NIX_CFLAGS_LINK = "-fuse-ld=lld";
};
# tests linking broken with shaderc after https://github.com/NixOS/nixpkgs/pull/477464/changes/5a47b12dfcd1b909ba35778a866394430054319a
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform && !withShaderc;