parent
d6f88c1f6c
commit
7997bf68a6
|
@ -7,9 +7,27 @@ class Nimrod < Formula
|
|||
|
||||
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"
|
||||
inreplace 'install.sh', '$1/nimrod', '$1'
|
||||
system "/bin/sh", "./install.sh", prefix
|
||||
system "/bin/sh", "./install.sh", libexec
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/'hello.nim').write <<-EOS.undent
|
||||
echo("Hi!")
|
||||
EOS
|
||||
system "#{libexec}/bin/nimrod compile --run hello.nim"
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
Nimrod has been installed to #{libexec}.
|
||||
The compiler will currently fail to find system.nim if called through a
|
||||
symlink. To compile nim files, specify the full path to the compiler:
|
||||
|
||||
#{libexec}/bin/nimrod compile --run hello.nim
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue