commit
bd616c0cd3
@ -1,3 +1,4 @@
|
||||
# nix name, luarocks name, server, version/additionnal args
|
||||
ansicolors,
|
||||
argparse,
|
||||
basexx,
|
||||
@ -17,15 +18,15 @@ lua-term,
|
||||
luabitop,
|
||||
luaevent,
|
||||
luacheck
|
||||
luaffi,http://luarocks.org/dev,
|
||||
luaffi,,http://luarocks.org/dev,
|
||||
luuid,
|
||||
penlight,
|
||||
say,
|
||||
luv,
|
||||
luasystem,
|
||||
mediator_lua,http://luarocks.org/manifests/teto
|
||||
mpack,http://luarocks.org/manifests/teto
|
||||
nvim-client,http://luarocks.org/manifests/teto
|
||||
busted,http://luarocks.org/manifests/teto
|
||||
luassert,http://luarocks.org/manifests/teto
|
||||
coxpcall,https://luarocks.org/manifests/hisham,1.17.0-1
|
||||
mediator_lua,,http://luarocks.org/manifests/teto
|
||||
mpack,,http://luarocks.org/manifests/teto
|
||||
nvim-client,,http://luarocks.org/manifests/teto
|
||||
busted,,http://luarocks.org/manifests/teto
|
||||
luassert,,http://luarocks.org/manifests/teto
|
||||
coxpcall,,https://luarocks.org/manifests/hisham,1.17.0-1
|
||||
|
|
@ -74,17 +74,18 @@ FOOTER="
|
||||
|
||||
|
||||
function convert_pkg () {
|
||||
pkg="$1"
|
||||
nix_pkg_name="$1"
|
||||
lua_pkg_name="$2"
|
||||
server=""
|
||||
if [ ! -z "$2" ]; then
|
||||
server=" --server=$2"
|
||||
if [ ! -z "$3" ]; then
|
||||
server=" --server=$3"
|
||||
fi
|
||||
|
||||
version="${3:-}"
|
||||
|
||||
echo "looking at $pkg (version $version) from server [$server]" >&2
|
||||
cmd="luarocks nix $server $pkg $version"
|
||||
drv="$($cmd)"
|
||||
echo "looking at $lua_pkg_name (version $version) from server [$server]" >&2
|
||||
cmd="luarocks nix $server $lua_pkg_name $version"
|
||||
drv="$nix_pkg_name = $($cmd)"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to convert $pkg" >&2
|
||||
echo "$drv" >&2
|
||||
@ -98,12 +99,17 @@ echo "$HEADER" | tee "$TMP_FILE"
|
||||
|
||||
# list of packages with format
|
||||
# name,server,version
|
||||
while IFS=, read -r pkg_name server version
|
||||
while IFS=, read -r nix_pkg_name lua_pkg_name server version
|
||||
do
|
||||
if [ -z "$pkg_name" ]; then
|
||||
echo "Skipping empty package name" >&2
|
||||
if [ "${nix_pkg_name:0:1}" == "#" ]; then
|
||||
echo "Skipping comment ${nix_pkg_name}" >&2
|
||||
continue
|
||||
fi
|
||||
convert_pkg "$pkg_name" "$server" "$version"
|
||||
if [ -z "$lua_pkg_name" ]; then
|
||||
echo "Using nix_name as lua_pkg_name" >&2
|
||||
lua_pkg_name="$nix_pkg_name"
|
||||
fi
|
||||
convert_pkg "$nix_pkg_name" "$lua_pkg_name" "$server" "$version"
|
||||
done < "$CSV_FILE"
|
||||
|
||||
# close the set
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 ];
|
||||
|
@ -1,9 +1,10 @@
|
||||
{ luarocks, fetchFromGitHub }:
|
||||
luarocks.overrideAttrs(old: {
|
||||
pname = "luarocks-nix";
|
||||
src = fetchFromGitHub {
|
||||
owner = "teto";
|
||||
repo = "luarocks";
|
||||
rev = "f9dc7892214bff6bce822d94aca3331048e61df0";
|
||||
sha256 = "117qqbiv87p2qw0zwapl7b0p4wgnn9f8k0qpppkj3653a1bwli05";
|
||||
rev = "8fb03a9bc8f4fa079d26c0f02804139bb2578848";
|
||||
sha256 = "09iwjvs9sbk6vwhrh7sijmfpji6wvg5bbdraw7l5lpnr9jj5wy91";
|
||||
};
|
||||
})
|
||||
|
@ -12,7 +12,6 @@
|
||||
, fetchFromGitHub, libmpack, which, fetchpatch, writeText
|
||||
, pkgs
|
||||
, fetchgit
|
||||
, overrides ? (self: super: {})
|
||||
, lib
|
||||
}:
|
||||
|
||||
@ -867,4 +866,4 @@ with self; {
|
||||
});
|
||||
|
||||
});
|
||||
in (lib.extends overrides packages)
|
||||
in packages
|
||||
|
Loading…
Reference in New Issue
Block a user