liminix

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

test.nix (541B)


      1 {
      2   liminix
      3 , nixpkgs
      4 }:
      5 let
      6   overlay = import "${liminix}/overlay.nix";
      7   pkgs = import <nixpkgs> { overlays = [overlay]; };
      8   script = pkgs.writeFennelScript "foo" [] ./hello.fnl;
      9   inherit (pkgs.lua.pkgs) fifo;
     10   netlink = pkgs.netlink-lua;
     11   script2 = pkgs.writeFennelScript "foo2" [fifo netlink] ./hello.fnl;
     12 in pkgs.runCommand "check" {
     13   } ''
     14 set -e
     15 # test that it works
     16 test $(${script}) = "hello"
     17 # test that lua path, cpath are set
     18 grep -q ${fifo}/share/lua/5.3 ${script2}
     19 grep -q ${netlink}/lib/lua/5.3 ${script2}
     20 date > $out
     21 ''