From c37b8925ba6d1b23a892f99b8634c5b5f51f1688 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Thu, 7 Mar 2019 16:58:06 +0900 Subject: [PATCH] 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 --- .../tools/misc/luarocks/darwin.patch | 50 +++++++++---------- .../tools/misc/luarocks/default.nix | 9 ++-- 2 files changed, 28 insertions(+), 31 deletions(-) diff --git a/pkgs/development/tools/misc/luarocks/darwin.patch b/pkgs/development/tools/misc/luarocks/darwin.patch index ec7f924987a2..a5e4ac461b48 100644 --- a/pkgs/development/tools/misc/luarocks/darwin.patch +++ b/pkgs/development/tools/misc/luarocks/darwin.patch @@ -1,27 +1,27 @@ -diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua -index 55cd4c9..060a6f1 100644 ---- a/src/luarocks/cfg.lua -+++ b/src/luarocks/cfg.lua -@@ -587,9 +587,9 @@ if cfg.platforms.macosx then - defaults.external_lib_extension = "dylib" - defaults.arch = "macosx-"..cfg.target_cpu - defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load" -- defaults.variables.STAT = "/usr/bin/stat" -+ defaults.variables.STAT = "stat" - defaults.variables.STATFLAG = "-f '%A'" -- local version = io.popen("sw_vers -productVersion"):read("*l") -+ local version = "10.10" - version = tonumber(version and version:match("^[^.]+%.([^.]+)")) or 3 - if version >= 10 then - version = 8 -@@ -598,8 +598,8 @@ if cfg.platforms.macosx then - else - defaults.gcc_rpath = false +diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua +index f93e67a..2eb2db9 100644 +--- a/src/luarocks/core/cfg.lua ++++ b/src/luarocks/core/cfg.lua +@@ -425,9 +425,9 @@ local function make_defaults(lua_version, target_cpu, platforms, home) + defaults.external_lib_extension = "dylib" + defaults.arch = "macosx-"..target_cpu + defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load" +- defaults.variables.STAT = "/usr/bin/stat" ++ defaults.variables.STAT = "stat" + defaults.variables.STATFLAG = "-f '%A'" +- local version = util.popen_read("sw_vers -productVersion") ++ local version = "10.10" + version = tonumber(version and version:match("^[^.]+%.([^.]+)")) or 3 + if version >= 10 then + version = 8 +@@ -436,8 +436,8 @@ local function make_defaults(lua_version, target_cpu, platforms, home) + else + 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 -- 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 diff --git a/pkgs/development/tools/misc/luarocks/default.nix b/pkgs/development/tools/misc/luarocks/default.nix index 5e418fcfdcfd..7edcb79388ab 100644 --- a/pkgs/development/tools/misc/luarocks/default.nix +++ b/pkgs/development/tools/misc/luarocks/default.nix @@ -7,16 +7,13 @@ , cmake }: -let -in - stdenv.mkDerivation rec { - pname="luarocks"; - version="2.4.4"; + pname = "luarocks"; + version = "3.0.4"; src = fetchurl { url="http://luarocks.org/releases/luarocks-${version}.tar.gz"; - sha256="0d7rl60dwh52qh5pfsphgx5ypp7k190h9ri6qpr2yx9kvqrxyf1r"; + sha256="1pqfzwvjy8dzqg4fqjq2cgqcr00fgrdd7nwzxm7nqmawr83s6dhj"; }; patches = [ ./darwin.patch ];