diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-04-28 14:39:00 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-10 08:52:36 +0000 |
commit | 693e64ef7421374338ddb1dc12b9573feec75972 (patch) | |
tree | 2526ac075d248699c35d63e04499890ee4381f5f /nixpkgs/pkgs/development/tools/misc/luarocks | |
parent | 7014df2256694d97093d6f2bb1db340d346dea88 (diff) | |
parent | 8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17 (diff) | |
download | nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.gz nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.bz2 nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.lz nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.xz nixlib-693e64ef7421374338ddb1dc12b9573feec75972.tar.zst nixlib-693e64ef7421374338ddb1dc12b9573feec75972.zip |
Merge commit '8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17'
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/luarocks')
-rw-r--r-- | nixpkgs/pkgs/development/tools/misc/luarocks/darwin-3.1.3.patch | 2 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/tools/misc/luarocks/default.nix | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/luarocks/darwin-3.1.3.patch b/nixpkgs/pkgs/development/tools/misc/luarocks/darwin-3.1.3.patch index 4ba883f01130..8070af173aaf 100644 --- a/nixpkgs/pkgs/development/tools/misc/luarocks/darwin-3.1.3.patch +++ b/nixpkgs/pkgs/development/tools/misc/luarocks/darwin-3.1.3.patch @@ -7,7 +7,7 @@ index c5af5a2..1949fdc 100644 defaults.arch = "macosx-"..target_cpu defaults.variables.LIBFLAG = "-bundle -undefined dynamic_lookup -all_load" - 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 if version >= 10 then version = 8 diff --git a/nixpkgs/pkgs/development/tools/misc/luarocks/default.nix b/nixpkgs/pkgs/development/tools/misc/luarocks/default.nix index 77f34cca7dec..d4f2ec4ded98 100644 --- a/nixpkgs/pkgs/development/tools/misc/luarocks/default.nix +++ b/nixpkgs/pkgs/development/tools/misc/luarocks/default.nix @@ -19,6 +19,11 @@ stdenv.mkDerivation rec { }; 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 = '' lua -e "" || { luajit -e "" && { |