2023-05-29 19:20:12 +00:00
|
|
|
let
|
2024-10-06 14:55:01 +00:00
|
|
|
overlay = import <liminix/overlay.nix>;
|
2025-02-10 21:55:08 +00:00
|
|
|
pkgs = import <nixpkgs> { overlays = [ overlay ]; };
|
|
|
|
script = pkgs.writeFennel "foo" { } ./hello.fnl;
|
2023-07-02 17:19:54 +00:00
|
|
|
inherit (pkgs.lua.pkgs) fifo;
|
|
|
|
netlink = pkgs.netlink-lua;
|
2025-02-10 21:55:08 +00:00
|
|
|
script2 = pkgs.writeFennel "foo2" {
|
|
|
|
packages = [
|
|
|
|
fifo
|
|
|
|
netlink
|
|
|
|
];
|
|
|
|
} ./hello.fnl;
|
|
|
|
in
|
|
|
|
pkgs.runCommand "check"
|
|
|
|
{
|
|
|
|
}
|
|
|
|
''
|
|
|
|
set -e
|
|
|
|
# test that it works
|
|
|
|
test $(${script}) = "hello"
|
|
|
|
# test that lua path, cpath are set
|
|
|
|
grep -q ${fifo}/share/lua/5.3 ${script2}
|
|
|
|
grep -q ${netlink}/lib/lua/5.3 ${script2}
|
|
|
|
date > $out
|
|
|
|
''
|