2023-05-29 21:20:12 +02:00
|
|
|
{
|
|
|
|
liminix
|
|
|
|
, nixpkgs
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
overlay = import "${liminix}/overlay.nix";
|
|
|
|
pkgs = import <nixpkgs> { overlays = [overlay]; };
|
|
|
|
script = pkgs.writeFennelScript "foo" [] ./hello.fnl;
|
2023-07-02 19:19:54 +02:00
|
|
|
inherit (pkgs.lua.pkgs) fifo;
|
|
|
|
netlink = pkgs.netlink-lua;
|
2023-05-29 21:20:12 +02:00
|
|
|
script2 = pkgs.writeFennelScript "foo2" [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
|
|
|
|
''
|