Skip to content

Commit

Permalink
lua: don't always set LUA_USE_LINUX
Browse files Browse the repository at this point in the history
This is supposed to be automatically set by Lua's Makefile if PLAT is
set appropriately, but it was being overridden by us overridding
CFLAGS.  Setting it manually was a hack.  The correct thing to do was
to make sure SYSCFLAGS (where Lua's Makefile puts LUA_USE_LINUX) was
still included in our custom CFLAGS.
  • Loading branch information
alyssais committed Apr 19, 2021
1 parent 7742d40 commit 57832e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/development/interpreters/lua-5/interpreter.nix
Expand Up @@ -49,7 +49,7 @@ self = stdenv.mkDerivation rec {
configurePhase = ''
runHook preConfigure
makeFlagsArray+=(CFLAGS="-DLUA_USE_LINUX -O2 -fPIC${if compat then " -DLUA_COMPAT_ALL" else ""}" )
makeFlagsArray+=(CFLAGS='-O2 -fPIC${lib.optionalString compat " -DLUA_COMPAT_ALL"} $(SYSCFLAGS)' )
makeFlagsArray+=(${lib.optionalString stdenv.isDarwin "CC=\"$CC\""}${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) " 'AR=${stdenv.hostPlatform.config}-ar rcu'"})
installFlagsArray=( TO_BIN="lua luac" INSTALL_DATA='cp -d' \
Expand Down

1 comment on commit 57832e6

@vcunat
Copy link
Member

@vcunat vcunat commented on 57832e6 May 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross-ref: 55282bd.

Pushed directly so staging-next doesn't really need to wait; feel free to improve afterwards.

Please sign in to comment.