forked from DGNum/liminix
add writeFennelScript function, make ifwait use it
This commit is contained in:
parent
fa7e682e87
commit
fdffdbb22a
6 changed files with 51 additions and 27 deletions
|
@ -5,4 +5,5 @@
|
|||
pppoe = import ./pppoe/test.nix;
|
||||
jffs2 = import ./jffs2/test.nix;
|
||||
min-copy-closure = import ./min-copy-closure/test.nix;
|
||||
fennel = import ./fennel/test.nix;
|
||||
}
|
||||
|
|
1
tests/fennel/hello.fnl
Normal file
1
tests/fennel/hello.fnl
Normal file
|
@ -0,0 +1 @@
|
|||
(print "hello")
|
21
tests/fennel/test.nix
Normal file
21
tests/fennel/test.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
liminix
|
||||
, nixpkgs
|
||||
}:
|
||||
let
|
||||
overlay = import "${liminix}/overlay.nix";
|
||||
pkgs = import <nixpkgs> { overlays = [overlay]; };
|
||||
script = pkgs.writeFennelScript "foo" [] ./hello.fnl;
|
||||
inherit (pkgs.luaSmall.pkgs) fifo;
|
||||
netlink = pkgs.netlink-lua.override { lua = pkgs.luaSmall; };
|
||||
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
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue