liminix

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

test.nix (578B)


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