Skip to content

Instantly share code, notes, and snippets.

@creationix creationix/lit.rb
Last active Aug 29, 2015

Embed
What would you like to do?
Homebrew
class Lit < Formula
desc "Toolkit for developing, sharing, and running luvit/lua programs and libraries."
homepage "https://github.com/luvit/lit"
url "https://lit.luvit.io/packages/luvit/lit/v2.2.4.zip"
sha256 "73216738ff9d25f14c53633c4b7786bd007a95c6e2aa536cafc846744cc0950f"
depends_on "luvi" => :build
def install
system "luvi", buildpath, "--", "make"
bin.install "lit"
end
test do
system "#{BIN}/lit"
end
end
class Luvi < Formula
desc "A project in-between luv and luvit, lua packages."
homepage "https://github.com/luvit/luvi"
url "https://github.com/luvit/luvi/releases/download/v2.1.8/luvi-src-v2.1.8.tar.gz"
sha256 "1ef449c6a76bcf7a03c8bbcdd5423b0366d63b10c52fd463ca2ba8aaf9248781"
depends_on "cmake" => :build
def install
system "make", "regular-asm"
system "make"
bin.install "build/luvi"
end
test do
system "make", "test"
end
end
class Luvit < Formula
desc "Asynchronous I/O for Lua (node.js style powered by luajit and libuv)"
homepage "https://luvit.io/"
url "https://lit.luvit.io/packages/luvit/luvit/v2.4.2.zip"
sha256 "f81cc4de2324c750aa65bd8fff588f9cd21dbeba731288dbe49a7006380c8aab"
depends_on "lit" => :build
def install
system "lit", "make", buildpath
bin.install "luvit"
end
test do
system "#{BIN}/luvit", "-v"
end
end
@creationix

This comment has been minimized.

Copy link
Owner Author

creationix commented Feb 19, 2015

To test this, create these on your local homebrew with brew create lit, brew create luvi, brew create luvit. Replace the template with these files.

Once you've created then, run brew install luvit to test.

@creationix

This comment has been minimized.

Copy link
Owner Author

creationix commented Feb 19, 2015

Currently this builds luvi and lit for me, but ssl seems broken.

➜  lit git:(master) ✗ lit publish modules/git.lua
lit version: 0.9.1
command: publish modules/git.lua
load config: /Users/timc/.litconfig
no change: creationix/git/v0.1.0
connecting: wss://lit.luvit.io
fail: [string "bundle:modules/coro-tls.lua"]:14: attempt to call method 'set_verify' (a nil value)
stack traceback:
    [string "bundle:modules/coro-tls.lua"]:14: in function 'tlsWrap'
    [string "bundle:lib/rdb.lua"]:28: in function 'connectRemote'
    [string "bundle:lib/rdb.lua"]:68: in function 'connect'
    [string "bundle:lib/rdb.lua"]:88: in function 'readRemote'
    [string "bundle:lib/core.lua"]:98: in function 'publish'
    [string "bundle:commands/publish.lua"]:8: in function 'fn'
    [string "bundle:modules/require.lua"]:189: in function 'formatter'
    [string "bundle:modules/require.lua"]:172: in function 'loader'
    [string "bundle:modules/require.lua"]:98: in function 'finder'
    [string "bundle:modules/require.lua"]:251: in function 'require'
    [string "bundle:main.lua"]:12: in function <[string "bundle:main.lua"]:8>
    [C]: in function 'xpcall'
    [string "bundle:main.lua"]:8: in function <[string "bundle:main.lua"]:6>
@creationix

This comment has been minimized.

Copy link
Owner Author

creationix commented Feb 25, 2015

Fixed and updated for luvi 0.7.1 and lit 0.10.0.

@creationix

This comment has been minimized.

Copy link
Owner Author

creationix commented Jul 31, 2015

Updated to luvi 2.1.7 and lit 2.1.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.