From f1e0e18868dbc36b830faffc0f079dffba2c5dfc Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 10 Oct 2024 13:05:57 +0200 Subject: [PATCH] rtmpdump: fix cross with Clang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "clang" is not the correct value for CC when cross compiling — it should be the prefixed, wrapped clang for the host platform. Let's force the use of our original CC in all cases. --- pkgs/tools/video/rtmpdump/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/video/rtmpdump/default.nix b/pkgs/tools/video/rtmpdump/default.nix index 8c5942d85210..4ecddd6b68af 100644 --- a/pkgs/tools/video/rtmpdump/default.nix +++ b/pkgs/tools/video/rtmpdump/default.nix @@ -31,14 +31,17 @@ stdenv.mkDerivation { }) ]; + preBuild = '' + makeFlagsArray+=(CC="$CC") + ''; + makeFlags = [ "prefix=$(out)" "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ] ++ lib.optional gnutlsSupport "CRYPTO=GNUTLS" ++ lib.optional opensslSupport "CRYPTO=OPENSSL" - ++ lib.optional stdenv.hostPlatform.isDarwin "SYS=darwin" - ++ lib.optional stdenv.cc.isClang "CC=clang"; + ++ lib.optional stdenv.hostPlatform.isDarwin "SYS=darwin"; propagatedBuildInputs = [ zlib ] ++ lib.optionals gnutlsSupport [ gnutls nettle ]