liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 72789984ce76c25bd7bd59eb41fb00036a1815fd
parent 90d9d0e8119cd9d8a2ce822acb34e75cbb90ac89
Author: Daniel Barlow <dan@telent.net>
Date:   Tue, 23 Apr 2024 22:41:38 +0100

add lualinux package

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/lualinux/default.nix | 22++++++++++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -71,6 +71,7 @@ in { levitate = callPackage ./levitate {}; libubootenv = callPackage ./libubootenv {}; linotify = callPackage ./linotify {}; + lualinux = callPackage ./lualinux {}; # we need to build real lzma instead of using xz, because the lzma # decoder in u-boot doesn't understand streaming lzma archives diff --git a/pkgs/lualinux/default.nix b/pkgs/lualinux/default.nix @@ -0,0 +1,22 @@ +{ lua, lib, fetchFromGitHub }: +let + pname = "lualinux"; + src = fetchFromGitHub { + repo = "lualinux"; + owner = "philanc"; + rev = "1d4c962aad9cbe01c05df741b91e8b39c356362c"; + hash = "sha256-+Ys4sERG+TI8nRzG38UP+KqbH0efspaX0j4IHCt56RI="; + }; +in lua.pkgs.buildLuaPackage { + inherit pname; + version = "0.1"; # :shrug: + + inherit src; + makeFlags = [ "LUADIR=." "lualinux.so" ]; + + installPhase = '' + mkdir -p "$out/lib/lua/${lua.luaversion}" + cp ${pname}.so "$out/lib/lua/${lua.luaversion}/" + ''; + +}