From 56acc4566e22310e3ddd72c749c2b93865977a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 19 Dec 2022 08:40:49 +0100 Subject: [PATCH] luajit_openresty: init at 2.1-20220915 --- pkgs/development/interpreters/lua-5/default.nix | 4 ++++ pkgs/development/interpreters/luajit/2.0.nix | 2 +- pkgs/development/interpreters/luajit/2.1.nix | 3 ++- pkgs/development/interpreters/luajit/default.nix | 10 +++++----- pkgs/development/interpreters/luajit/openresty.nix | 14 ++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 6 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 pkgs/development/interpreters/luajit/openresty.nix diff --git a/pkgs/development/interpreters/lua-5/default.nix b/pkgs/development/interpreters/lua-5/default.nix index 3cf436419f34..dd471c9de40c 100644 --- a/pkgs/development/interpreters/lua-5/default.nix +++ b/pkgs/development/interpreters/lua-5/default.nix @@ -163,4 +163,8 @@ rec { inherit callPackage fetchFromGitHub passthruFun; }; + luajit_openresty = import ../luajit/openresty.nix { + self = luajit_openresty; + inherit callPackage fetchFromGitHub passthruFun; + }; } diff --git a/pkgs/development/interpreters/luajit/2.0.nix b/pkgs/development/interpreters/luajit/2.0.nix index daa298761762..78abb742c407 100644 --- a/pkgs/development/interpreters/luajit/2.0.nix +++ b/pkgs/development/interpreters/luajit/2.0.nix @@ -2,7 +2,7 @@ callPackage ./default.nix { version = "2.0.5-2022-09-13"; - isStable = true; + src = fetchFromGitHub { owner = "LuaJIT"; repo = "LuaJIT"; diff --git a/pkgs/development/interpreters/luajit/2.1.nix b/pkgs/development/interpreters/luajit/2.1.nix index 8362aab55e0f..8efb86ab0174 100644 --- a/pkgs/development/interpreters/luajit/2.1.nix +++ b/pkgs/development/interpreters/luajit/2.1.nix @@ -1,7 +1,8 @@ { self, callPackage, fetchFromGitHub, passthruFun }: + callPackage ./default.nix { version = "2.1.0-2022-10-04"; - isStable = false; + src = fetchFromGitHub { owner = "LuaJIT"; repo = "LuaJIT"; diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix index 64aa0345e80b..d1211ce0a928 100644 --- a/pkgs/development/interpreters/luajit/default.nix +++ b/pkgs/development/interpreters/luajit/default.nix @@ -2,7 +2,6 @@ , stdenv , fetchFromGitHub , buildPackages -, isStable , version , src , extraMeta ? { } @@ -71,7 +70,7 @@ stdenv.mkDerivation rec { } >> src/luaconf.h ''; - configurePhase = false; + dontConfigure = true; buildInputs = lib.optional enableValgrindSupport valgrind; @@ -91,8 +90,9 @@ stdenv.mkDerivation rec { postInstall = '' ( cd "$out/include"; ln -s luajit-*/* . ) ln -s "$out"/bin/luajit-* "$out"/bin/lua - '' + lib.optionalString (!isStable) '' - ln -s "$out"/bin/luajit-* "$out"/bin/luajit + if [[ ! -e "$out"/bin/luajit ]]; then + ln -s "$out"/bin/luajit* "$out"/bin/luajit + fi ''; LuaPathSearchPaths = luaPackages.luaLib.luaPathList; @@ -117,7 +117,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "High-performance JIT compiler for Lua 5.1"; - homepage = "http://luajit.org"; + homepage = "https://luajit.org/"; license = licenses.mit; platforms = platforms.linux ++ platforms.darwin; # See https://github.com/LuaJIT/LuaJIT/issues/628 diff --git a/pkgs/development/interpreters/luajit/openresty.nix b/pkgs/development/interpreters/luajit/openresty.nix new file mode 100644 index 000000000000..372d9233bf1f --- /dev/null +++ b/pkgs/development/interpreters/luajit/openresty.nix @@ -0,0 +1,14 @@ +{ self, callPackage, fetchFromGitHub, passthruFun }: + +callPackage ./default.nix rec { + version = "2.1-20220915"; + + src = fetchFromGitHub { + owner = "openresty"; + repo = "luajit2"; + rev = "v${version}"; + hash = "sha256-kMHE4iQtm2CujK9TVut1jNhY2QxYP514jfBsxOCyd4s="; + }; + + inherit self passthruFun; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1cd035820397..1803485dad69 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15993,7 +15993,7 @@ with pkgs; ### LUA interpreters luaInterpreters = callPackage ./../development/interpreters/lua-5 {}; - inherit (luaInterpreters) lua5_1 lua5_2 lua5_2_compat lua5_3 lua5_3_compat lua5_4 lua5_4_compat luajit_2_1 luajit_2_0; + inherit (luaInterpreters) lua5_1 lua5_2 lua5_2_compat lua5_3 lua5_3_compat lua5_4 lua5_4_compat luajit_2_1 luajit_2_0 luajit_openresty; lua5 = lua5_2_compat; lua = lua5;