Skip to content

Instantly share code, notes, and snippets.

@rbehrends
Last active December 20, 2015 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbehrends/6140600 to your computer and use it in GitHub Desktop.
Save rbehrends/6140600 to your computer and use it in GitHub Desktop.
require 'formula'
class Nimrod < Formula
homepage 'http://nimrod-code.org/'
url 'http://nimrod-code.org/download/nimrod_0.9.2.zip'
sha1 '326ecd61d6df45afdc04cb8685ef46f8fb8f9e47'
#head 'https://github.com/Araq/Nimrod.git'
# Install to libexec until an upstream fix appears for
# https://github.com/Araq/Nimrod/issues/459
def install
system "/bin/sh", "./build.sh"
system "/bin/sh", "./install.sh", libexec
system "mkdir #{bin}"
File.open("#{bin}/nimrod", "w") do |fp|
fp.write "#!/bin/sh\nexec #{libexec}/nimrod/bin/nimrod \"\$@\"\n"
fp.chmod(0755)
end
end
test do
(testpath/'hello.nim').write <<-EOS.undent
echo("Hi!")
EOS
system "#{prefix}/bin/nimrod compile --run hello.nim"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment