Merge staging-next into staging
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
# How to obtain `sha256`:
|
||||
# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz
|
||||
mkDerivation {
|
||||
version = "23.3.2";
|
||||
sha256 = "eU3BmBJqrcg3FmkuAIfB3UoSNfQQfvGNyC2jBffwm/w=";
|
||||
version = "23.3.4";
|
||||
sha256 = "EKewwcK1Gr84mmFVxVmOLaPiFtsG3r/1ubGOUwM/EYY=";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
--- a/Makefile 2021-05-14 22:39:14.407200562 +0300
|
||||
+++ b/Makefile 2021-05-14 22:36:23.828513407 +0300
|
||||
@@ -41,7 +41,7 @@
|
||||
# What to install.
|
||||
TO_BIN= lua luac
|
||||
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
|
||||
-TO_LIB= liblua.a
|
||||
+TO_LIB= liblua.${version}.dylib
|
||||
TO_MAN= lua.1 luac.1
|
||||
|
||||
# Lua version and release.
|
||||
@@ -60,6 +60,8 @@
|
||||
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
|
||||
cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
|
||||
cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
|
||||
+ ln -s -f liblua.${version}.dylib $(INSTALL_LIB)/liblua.${luaversion}.dylib
|
||||
+ ln -s -f liblua.${luaversion}.dylib $(INSTALL_LIB)/liblua.dylib
|
||||
|
||||
uninstall:
|
||||
cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
|
||||
--- a/src/Makefile 2021-05-14 22:35:38.575051882 +0300
|
||||
+++ b/src/Makefile 2021-05-14 22:35:33.584631206 +0300
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris
|
||||
|
||||
-LUA_A= liblua.a
|
||||
+LUA_A= liblua.${version}.dylib
|
||||
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
|
||||
LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
|
||||
BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
|
||||
@@ -57,11 +57,13 @@
|
||||
a: $(ALL_A)
|
||||
|
||||
$(LUA_A): $(BASE_O)
|
||||
- $(AR) $@ $(BASE_O)
|
||||
- $(RANLIB) $@
|
||||
+ $(CC) -dynamiclib -install_name $(out)/lib/liblua.${version}.dylib \
|
||||
+ -compatibility_version ${version} -current_version ${version} \
|
||||
+ -o liblua.${version}.dylib $^
|
||||
|
||||
$(LUA_T): $(LUA_O) $(LUA_A)
|
||||
- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
||||
+ $(CC) -fno-common $(MYLDFLAGS) \
|
||||
+ -o $@ $(LUA_O) $(LUA_A) -L. -llua.${version} $(LIBS)
|
||||
|
||||
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
||||
$(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
||||
@@ -5,6 +5,12 @@ rec {
|
||||
lua5_4 = callPackage ./interpreter.nix {
|
||||
sourceVersion = { major = "5"; minor = "4"; patch = "2"; };
|
||||
hash = "0ksj5zpj74n0jkamy3di1p6l10v4gjnd2zjnb453qc6px6bhsmqi";
|
||||
|
||||
patches = if stdenv.isDarwin then [ ./5.4.darwin.patch ] else [
|
||||
# build lua as a shared library as well, MIT-licensed from
|
||||
# https://github.com/archlinux/svntogit-packages/tree/packages/lua/trunk
|
||||
./liblua.so.patch
|
||||
];
|
||||
};
|
||||
|
||||
lua5_4_compat = lua5_4.override({
|
||||
|
||||
@@ -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' \
|
||||
|
||||
Reference in New Issue
Block a user