package minisock, a minimal Lua socket library

This commit is contained in:
Daniel Barlow 2024-04-20 15:09:17 +01:00
parent 8af4e9fd5b
commit 73abf952d5
2 changed files with 22 additions and 0 deletions

View file

@ -82,6 +82,7 @@ in {
zyxel-bootconfig = callPackage ./zyxel-bootconfig {};
min-collect-garbage = callPackage ./min-collect-garbage {};
min-copy-closure = callPackage ./min-copy-closure {};
minisock = callPackage ./minisock {};
nellie = callPackage ./nellie {};
netlink-lua = callPackage ./netlink-lua {};
odhcp-script = callPackage ./odhcp-script {};

21
pkgs/minisock/default.nix Normal file
View file

@ -0,0 +1,21 @@
{ lua, lib, fetchFromGitHub }:
let pname = "minisock";
in lua.pkgs.buildLuaPackage {
inherit pname;
version = "0.1"; # :shrug:
src = fetchFromGitHub {
repo = "minisock";
owner = "philanc";
rev = "a20db2aaa871653c61045019633279167cf1b458";
hash = "sha256-zB9KSt0WEGCSYTLA6W9QrsVRFEZYaoBBeXx9VEXmsGY=";
};
makeFlags = [ "LUADIR=." "minisock.so" ];
installPhase = ''
mkdir -p "$out/lib/lua/${lua.luaversion}"
cp ${pname}.so "$out/lib/lua/${lua.luaversion}/"
'';
}