rename luaSmall package to lua

This commit is contained in:
Daniel Barlow 2023-07-02 18:19:54 +01:00
parent 3900683413
commit 41687e916d
5 changed files with 13 additions and 17 deletions

View file

@ -1,10 +1,7 @@
{ {
writeFennelScript writeFennelScript
, luaSmall
, linotify , linotify
}: }:
writeFennelScript "acquire-delegated-prefix" writeFennelScript "acquire-delegated-prefix"
[ [ linotify ]
(linotify.override { lua = luaSmall; })
]
./acquire-delegated-prefix.fnl ./acquire-delegated-prefix.fnl

View file

@ -39,6 +39,7 @@ let
(if o ? patches then o.patches else []) ++ (if o ? patches then o.patches else []) ++
(if patch_needed then [ patch ] else []); (if patch_needed then [ patch ] else []);
}); });
lua = let s = lua_no_readline.override { self = s; }; in s;
in in
extraPkgs // { extraPkgs // {
mtdutils = prev.mtdutils.overrideAttrs(o: { mtdutils = prev.mtdutils.overrideAttrs(o: {
@ -97,7 +98,8 @@ extraPkgs // {
]; ];
}); });
luaSmall = let s = lua_no_readline.override { self = s; }; in s; luaFull = prev.lua;
inherit lua;
inherit s6; inherit s6;
s6-linux-init = prev.s6-linux-init.override { s6-linux-init = prev.s6-linux-init.override {

View file

@ -1,13 +1,10 @@
{ {
luaSmall lua
, netlink-lua , netlink-lua
, writeFennelScript , writeFennelScript
, runCommand , runCommand
}: }:
let runCommand "ifwait" {} ''
lua = luaSmall;
netlink = netlink-lua.override {inherit lua;};
in runCommand "ifwait" {} ''
mkdir -p $out/bin mkdir -p $out/bin
cp -p ${writeFennelScript "ifwait" [netlink] ./ifwait.fnl} $out/bin/ifwait cp -p ${writeFennelScript "ifwait" [netlink-lua] ./ifwait.fnl} $out/bin/ifwait
'' ''

View file

@ -1,6 +1,6 @@
{ {
runCommand runCommand
, luaSmall , lua
, runtimeShell , runtimeShell
, fetchurl , fetchurl
, lib , lib
@ -14,15 +14,15 @@ in name : packages : source :
hash = "sha256-hYSD3rBYF8iTjBOA1m+TvUu8BSp8q6uIMUXi0xwo/dU="; hash = "sha256-hYSD3rBYF8iTjBOA1m+TvUu8BSp8q6uIMUXi0xwo/dU=";
}; };
luapath = builtins.map (f: "${f}/share/lua/${luaSmall.luaversion}/?.lua;") packages; luapath = builtins.map (f: "${f}/share/lua/${lua.luaversion}/?.lua;") packages;
luacpath = builtins.map (f: "${f}/lib/lua/${luaSmall.luaversion}/?.so;") packages; luacpath = builtins.map (f: "${f}/lib/lua/${lua.luaversion}/?.so;") packages;
in runCommand name { in runCommand name {
nativeBuildInputs = [ lua ]; nativeBuildInputs = [ lua ];
} '' } ''
echo $PATH echo $PATH
#!${runtimeShell} #!${runtimeShell}
( (
echo "#!${luaSmall}/bin/lua" echo "#!${lua}/bin/lua"
echo "package.path = ${lib.strings.escapeShellArg luapath} .. package.path" echo "package.path = ${lib.strings.escapeShellArg luapath} .. package.path"
echo "package.cpath = ${lib.strings.escapeShellArg luacpath} .. package.cpath" echo "package.cpath = ${lib.strings.escapeShellArg luacpath} .. package.cpath"
lua ${fennel} --correlate --compile ${source} lua ${fennel} --correlate --compile ${source}

View file

@ -6,8 +6,8 @@ let
overlay = import "${liminix}/overlay.nix"; overlay = import "${liminix}/overlay.nix";
pkgs = import <nixpkgs> { overlays = [overlay]; }; pkgs = import <nixpkgs> { overlays = [overlay]; };
script = pkgs.writeFennelScript "foo" [] ./hello.fnl; script = pkgs.writeFennelScript "foo" [] ./hello.fnl;
inherit (pkgs.luaSmall.pkgs) fifo; inherit (pkgs.lua.pkgs) fifo;
netlink = pkgs.netlink-lua.override { lua = pkgs.luaSmall; }; netlink = pkgs.netlink-lua;
script2 = pkgs.writeFennelScript "foo2" [fifo netlink] ./hello.fnl; script2 = pkgs.writeFennelScript "foo2" [fifo netlink] ./hello.fnl;
in pkgs.runCommand "check" { in pkgs.runCommand "check" {
} '' } ''