add anoia.net.constants for SOCK_{STREAM,DGRAM} etc

we use an ugly bit of C preprocessor to get the values from
header files, because certain constants are different on MIPS
than on other architectures
This commit is contained in:
Daniel Barlow
2024-04-26 16:43:09 +01:00
parent 9795f03da4
commit 74cf3e0711
3 changed files with 19 additions and 3 deletions

View File

@@ -4,13 +4,14 @@
, linotify
, lua
, lualinux
, cpio
}:
let pname = "anoia";
in stdenv.mkDerivation {
inherit pname;
version = "0.1";
src = ./.;
nativeBuildInputs = [ fennel ];
nativeBuildInputs = [ fennel cpio ];
buildInputs = with lua.pkgs; [ linotify lualinux ];
outputs = [ "out" "dev" ];
@@ -18,7 +19,7 @@ in stdenv.mkDerivation {
installPhase = ''
mkdir -p "$out/share/lua/${lua.luaversion}/${pname}"
cp *.lua "$out/share/lua/${lua.luaversion}/${pname}"
find . -name \*.lua | cpio -p -d "$out/share/lua/${lua.luaversion}/${pname}"
mkdir -p "$dev/share/lua/${lua.luaversion}/${pname}"
cp assert.fnl "$dev/share/lua/${lua.luaversion}/${pname}"