feat: init luasocket at 3.1.0
This commit is contained in:
parent
825a749f74
commit
61e9b6d73e
2 changed files with 52 additions and 0 deletions
|
@ -73,6 +73,7 @@ in {
|
||||||
libubootenv = callPackage ./libubootenv {};
|
libubootenv = callPackage ./libubootenv {};
|
||||||
linotify = callPackage ./linotify {};
|
linotify = callPackage ./linotify {};
|
||||||
lualinux = callPackage ./lualinux {};
|
lualinux = callPackage ./lualinux {};
|
||||||
|
luasocket = callPackage ./luasocket {};
|
||||||
|
|
||||||
# we need to build real lzma instead of using xz, because the lzma
|
# we need to build real lzma instead of using xz, because the lzma
|
||||||
# decoder in u-boot doesn't understand streaming lzma archives
|
# decoder in u-boot doesn't understand streaming lzma archives
|
||||||
|
|
51
pkgs/luasocket/default.nix
Normal file
51
pkgs/luasocket/default.nix
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
lua,
|
||||||
|
gcc,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "luasocket";
|
||||||
|
version = "3.1.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "lunarmodules";
|
||||||
|
repo = "luasocket";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-sKSzCrQpS+9reN9IZ4wkh4dB50wiIfA87xN4u1lyHo4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
gcc
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
lua
|
||||||
|
];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
substituteInPlace src/makefile \
|
||||||
|
--replace-fail "gcc" "$CC"
|
||||||
|
'';
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
export LUAV=${lua.luaversion}
|
||||||
|
'';
|
||||||
|
|
||||||
|
preInstall = ''
|
||||||
|
export DESTDIR=$out
|
||||||
|
export prefix=
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Network support for the Lua language";
|
||||||
|
homepage = "https://github.com/lunarmodules/luasocket";
|
||||||
|
changelog = "https://github.com/lunarmodules/luasocket/blob/${src.rev}/CHANGELOG.md";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
maintainers = with lib.maintainers; [ soyouzpanda ];
|
||||||
|
mainProgram = "luasocket";
|
||||||
|
platforms = lib.platforms.all;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue