Last active
December 20, 2015 13:39
-
-
Save rbehrends/6140600 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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