From 55282bd6f60f9a10dbbce7a35c20bc78f0b3b7d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 14 May 2021 22:08:38 +0200 Subject: [PATCH] lua5_1: fixup a recent regression Commit 57832e625c (PR #119860) switched to using SYSCFLAGS, but lua 5.1 calls it MYCFLAGS. We noticed due to broken luarocks build: https://hydra.nixos.org/build/142663274 --- pkgs/development/interpreters/lua-5/interpreter.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/lua-5/interpreter.nix b/pkgs/development/interpreters/lua-5/interpreter.nix index 973e9296435..506f9ca7207 100644 --- a/pkgs/development/interpreters/lua-5/interpreter.nix +++ b/pkgs/development/interpreters/lua-5/interpreter.nix @@ -61,7 +61,8 @@ self = stdenv.mkDerivation rec { configurePhase = '' runHook preConfigure - makeFlagsArray+=(CFLAGS='-O2 -fPIC${lib.optionalString compat " -DLUA_COMPAT_ALL"} $(SYSCFLAGS)' ) + makeFlagsArray+=(CFLAGS='-O2 -fPIC${lib.optionalString compat " -DLUA_COMPAT_ALL"} $(${ + if lib.versionAtLeast luaversion "5.2" then "SYSCFLAGS" else "MYCFLAGS"})' ) makeFlagsArray+=(${lib.optionalString stdenv.isDarwin "CC=\"$CC\""}${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) " 'AR=${stdenv.cc.targetPrefix}ar rcu'"}) installFlagsArray=( TO_BIN="lua luac" INSTALL_DATA='cp -d' \