liminix

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

default.nix (429B)


      1 {
      2   lua,
      3   runCommand,
      4 }:
      5 let
      6   fennel = lua.pkgs.fennel;
      7 in
      8 runCommand "build-fennelc"
      9   {
     10     nativeBuildInputs = [ fennel ];
     11   }
     12   ''
     13     LUAPATH=$(ls -d ${fennel}/share/lua/*)
     14     mkdir -p $out/bin
     15     (
     16     exec > $out/bin/fennelc
     17     echo '#! ${lua}/bin/lua'
     18     echo "package.path = \"''${LUAPATH}/?.lua;''${LLPATH}/?.lua;\" .. package.path"
     19     fennel  --compile ${./fennelc.fnl}
     20     )
     21     chmod +x $out/bin/fennelc
     22   ''