luarocks: 2.4.4 -> 3.0.4

Some new features like test_dependencies/build_dependencies and flags ( --lua-versions)
that should make nix integration easier:
https://github.com/luarocks/luarocks/blob/master/CHANGELOG.md
This commit is contained in:
Matthieu Coudron 2019-03-07 16:58:06 +09:00
parent 992364d34e
commit c37b8925ba
2 changed files with 28 additions and 31 deletions

@ -1,27 +1,27 @@
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua
index 55cd4c9..060a6f1 100644 index f93e67a..2eb2db9 100644
--- a/src/luarocks/cfg.lua --- a/src/luarocks/core/cfg.lua
+++ b/src/luarocks/cfg.lua +++ b/src/luarocks/core/cfg.lua
@@ -587,9 +587,9 @@ if cfg.platforms.macosx then @@ -425,9 +425,9 @@ local function make_defaults(lua_version, target_cpu, platforms, home)
defaults.external_lib_extension = "dylib" defaults.external_lib_extension = "dylib"
defaults.arch = "macosx-"..cfg.target_cpu defaults.arch = "macosx-"..target_cpu
defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load" defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load"
- defaults.variables.STAT = "/usr/bin/stat" - defaults.variables.STAT = "/usr/bin/stat"
+ defaults.variables.STAT = "stat" + defaults.variables.STAT = "stat"
defaults.variables.STATFLAG = "-f '%A'" defaults.variables.STATFLAG = "-f '%A'"
- local version = io.popen("sw_vers -productVersion"):read("*l") - local version = util.popen_read("sw_vers -productVersion")
+ local version = "10.10" + local version = "10.10"
version = tonumber(version and version:match("^[^.]+%.([^.]+)")) or 3 version = tonumber(version and version:match("^[^.]+%.([^.]+)")) or 3
if version >= 10 then if version >= 10 then
version = 8 version = 8
@@ -598,8 +598,8 @@ if cfg.platforms.macosx then @@ -436,8 +436,8 @@ local function make_defaults(lua_version, target_cpu, platforms, home)
else else
defaults.gcc_rpath = false defaults.gcc_rpath = false
end
- defaults.variables.CC = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." gcc"
- defaults.variables.LD = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." gcc"
+ defaults.variables.CC = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." clang"
+ defaults.variables.LD = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." clang"
defaults.web_browser = "open"
end end
- defaults.variables.CC = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." gcc"
- defaults.variables.LD = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." gcc"
+ defaults.variables.CC = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." clang"
+ defaults.variables.LD = "env MACOSX_DEPLOYMENT_TARGET=10."..version.." clang"
defaults.web_browser = "open"
end

@ -7,16 +7,13 @@
, cmake , cmake
}: }:
let
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname="luarocks"; pname = "luarocks";
version="2.4.4"; version = "3.0.4";
src = fetchurl { src = fetchurl {
url="http://luarocks.org/releases/luarocks-${version}.tar.gz"; url="http://luarocks.org/releases/luarocks-${version}.tar.gz";
sha256="0d7rl60dwh52qh5pfsphgx5ypp7k190h9ri6qpr2yx9kvqrxyf1r"; sha256="1pqfzwvjy8dzqg4fqjq2cgqcr00fgrdd7nwzxm7nqmawr83s6dhj";
}; };
patches = [ ./darwin.patch ]; patches = [ ./darwin.patch ];