Running Sailor on the Haiku Operating System

Edited in 15 april 2015:

If you never heard of Haiku according with Wikipedia: Haiku is a free and open-source operating system compatible with the now discontinued BeOS. Since it implements the POSIX API we can run many Unix compatible software like the Lua interpreter, LuaRocks and some Lua libraries.

First thing we need to do is to get the last nightly version of Haiku in (direct download link).

Boot on VirtualBox and use the app HaikuDepot to install lua and lua_devel

open Haiku's package manager

Search for lua

Search for Lua

Check the option Develop Packages on the menu Show

Check the devel package option

Install the package lua_devel and you will probable be asked to install the package lua too, if not do it yourself.

Install lua devel package

Building LuaRocks

Since git is pre installed you can go on and clone LuaRocks and build it. You will need to pass three flags, --with-lua for where is the bin folder where the Lua interpreter binary is, --with-lua-include for the Lua headers and --prefix for where you want things to be installed.

$ git clone
$ cd luarocks
$ ./configure --with-lua=/system --with-lua-include=/system/develop/headers --prefix=/Haiku/home/.lua
$ make -j3 build
$ make install

Use LuaRocks's command path to set Lua's path and cpath, and add LuaRocks bin folder to PATH

eval `./.lua/bin/luarocks path`
export PATH=$PATH:~/.lua/bin/

Installing LuaSocket

Clone LuaSocket and install with luarocks:

$ git clone
$ cd luasocket
$ luarocks make luasocket-scm-0.rockspec 

Create a test app to see if we succeeded

$ cd ~
$ sailor create sailor_test
$ cd sailor_test
$ lua start-server.lua

Sailor app running on the WebPositive browser