luarocks: use targetPlatform.darwinMinVersion as default
This commit is contained in:
parent
6605fadc68
commit
2316ada93f
@ -7,7 +7,7 @@ index c5af5a2..1949fdc 100644
|
|||||||
defaults.arch = "macosx-"..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"
|
||||||
- local version = util.popen_read("sw_vers -productVersion")
|
- local version = util.popen_read("sw_vers -productVersion")
|
||||||
+ local version = os.getenv("MACOSX_DEPLOYMENT_TARGET") or "10.12"
|
+ local version = os.getenv("MACOSX_DEPLOYMENT_TARGET") or "@darwinMinVersion@"
|
||||||
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
|
||||||
|
@ -19,6 +19,11 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./darwin-3.1.3.patch ];
|
patches = [ ./darwin-3.1.3.patch ];
|
||||||
|
|
||||||
|
postPatch = lib.optionalString stdenv.targetPlatform.isDarwin ''
|
||||||
|
substituteInPlace src/luarocks/core/cfg.lua --subst-var-by 'darwinMinVersion' '${stdenv.targetPlatform.darwinMinVersion}'
|
||||||
|
'';
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
lua -e "" || {
|
lua -e "" || {
|
||||||
luajit -e "" && {
|
luajit -e "" && {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user