Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 3e18b3e

Browse files
bcomnesMikeMcQuaid
authored andcommitted
iojs 1.0.4 (new formula)
Closes #34658. Closes #35853. Closes #35854. Closes #36039. Closes #36193. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
1 parent 6e8bd0d commit 3e18b3e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Library/Formula/iojs.rb

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
class Iojs < Formula
2+
homepage "https://iojs.org/"
3+
url "https://iojs.org/dist/v1.0.4/iojs-v1.0.4.tar.xz"
4+
sha256 "c902f5abbd59c56346680f0b4a71056c51610847b9576acf83a9c210bf664e98"
5+
6+
keg_only "`iojs` symlinks conflict with `node` but can be used by prepending your PATH"
7+
8+
option "with-debug", "Build with debugger hooks"
9+
10+
depends_on :python => :build
11+
12+
def install
13+
args = %W[--prefix=#{prefix} --without-npm]
14+
args << "--debug" if build.with? "debug"
15+
16+
system "./configure", *args
17+
system "make", "install"
18+
end
19+
20+
def caveats; <<-EOS.undent
21+
`iojs` was installed without `npm`.
22+
23+
To intall `npm` and have it use `iojs`, install `node` and add
24+
iojs to the front of your path:
25+
export PATH=#{Formula["iojs"].opt_bin}:$PATH
26+
EOS
27+
end
28+
29+
test do
30+
path = testpath/"test.js"
31+
path.write "console.log('hello');"
32+
33+
output = `#{bin}/iojs #{path}`.strip
34+
assert_equal "hello", output
35+
assert_equal 0, $?.exitstatus
36+
end
37+
end

0 commit comments

Comments
 (0)