mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
Merge pull request #18692 from Mic92/luasocket
luasocket: fix non-5.1 builds
This commit is contained in:
commit
5000f5050a
@ -189,19 +189,26 @@ let
|
||||
sha256 = "0j8jx8bjicvp9khs26xjya8c495wrpb7parxfnabdqa5nnsxjrwb";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
sed -e "s,^LUAPREFIX_linux.*,LUAPREFIX_linux=$out," \
|
||||
-i src/makefile
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
export PLAT=macosx
|
||||
export LUAPREFIX_macosx=$out
|
||||
substituteInPlace src/Makefile --replace gcc cc \
|
||||
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace src/makefile --replace gcc cc \
|
||||
--replace 10.3 10.5
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
makeFlagsArray=(
|
||||
LUAV=${lua.luaversion}
|
||||
PLAT=${if stdenv.isDarwin then "macosx"
|
||||
else if stdenv.isFreeBSD then "freebsd"
|
||||
else if stdenv.isLinux then "linux"
|
||||
else if stdenv.isSunOS then "solaris"
|
||||
else throw "unsupported platform"}
|
||||
prefix=$out
|
||||
);
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://w3.impa.br/~diego/software/luasocket/";
|
||||
hydraPlatforms = stdenv.lib.platforms.linux;
|
||||
hydraPlatforms = with platforms; [darwin linux freebsd illumos];
|
||||
maintainers = with maintainers; [ mornfall ];
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user