diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2019-02-11 21:10:30 +0100 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2019-02-11 21:38:09 +0100 |
commit | be1291e11b3ab0b481471970bffd40385b55a0bf (patch) | |
tree | 35f02b6f144393ff4c0b690db9961f627cb52c54 /pkgs/development/tools/misc/luarocks/darwin.patch | |
parent | 1a88aa9e0cdcbc12acc5cbdc379c0804d208e913 (diff) | |
download | nixpkgs-be1291e11b3ab0b481471970bffd40385b55a0bf.tar nixpkgs-be1291e11b3ab0b481471970bffd40385b55a0bf.tar.gz nixpkgs-be1291e11b3ab0b481471970bffd40385b55a0bf.tar.bz2 nixpkgs-be1291e11b3ab0b481471970bffd40385b55a0bf.tar.lz nixpkgs-be1291e11b3ab0b481471970bffd40385b55a0bf.tar.xz nixpkgs-be1291e11b3ab0b481471970bffd40385b55a0bf.tar.zst nixpkgs-be1291e11b3ab0b481471970bffd40385b55a0bf.zip |
luarocks: patch sw_vers and gcc on darwin
The sw_vers binary is not part of the stdenv and it would make builds impure based on what macOS version they where built on.
Diffstat (limited to 'pkgs/development/tools/misc/luarocks/darwin.patch')
-rw-r--r-- | pkgs/development/tools/misc/luarocks/darwin.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/luarocks/darwin.patch b/pkgs/development/tools/misc/luarocks/darwin.patch new file mode 100644 index 00000000000..ec7f924987a --- /dev/null +++ b/pkgs/development/tools/misc/luarocks/darwin.patch @@ -0,0 +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 + 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 + |