├── ethereum.rb ├── cpp-ethereum.rb ├── solidity.rb ├── solidity@7.rb ├── solidity@4.rb ├── solidity@5.rb ├── solidity@6.rb ├── .circleci └── config.yml └── README.md /ethereum.rb: -------------------------------------------------------------------------------- 1 | class Ethereum < Formula 2 | desc "Official Go implementation of the Ethereum protocol" 3 | homepage "https://github.com/ethereum/go-ethereum" 4 | url "https://github.com/ethereum/go-ethereum.git", :tag => "v1.16.7" 5 | 6 | head do 7 | url "https://github.com/ethereum/go-ethereum.git", :branch => "master" 8 | end 9 | 10 | # Require El Capitan at least 11 | depends_on :macos => :el_capitan 12 | 13 | # Is there a better way to ensure that frameworks (IOKit, CoreServices, etc) are installed? 14 | depends_on :xcode => :build 15 | 16 | depends_on "go" => :build 17 | 18 | def install 19 | ENV["GOROOT"] = "#{HOMEBREW_PREFIX}/opt/go/libexec" 20 | system "go", "env" # Debug env 21 | system "make", "all" 22 | bin.install "build/bin/evm" 23 | bin.install "build/bin/geth" 24 | bin.install "build/bin/rlpdump" 25 | end 26 | 27 | test do 28 | system "#{HOMEBREW_PREFIX}/bin/geth", "--version" 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /cpp-ethereum.rb: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # cpp-ethereum.rb 3 | # 4 | # Homebrew formula for cpp-ethereum. Homebrew (http://brew.sh/) is 5 | # the de-facto standard package manager for OS X, and this Ruby script 6 | # contains the metadata used to map command-line user settings used 7 | # with the 'brew' command onto build options. 8 | # 9 | # Our documentation for the cpp-ethereum Homebrew setup is at: 10 | # 11 | # http://cpp-ethereum.org/installing-binaries/osx-homebrew.html 12 | # 13 | # (c) 2014-2017 cpp-ethereum contributors. 14 | #------------------------------------------------------------------------------ 15 | 16 | class CppEthereum < Formula 17 | desc "Ethereum C++ client" 18 | homepage "http://cpp-ethereum.org" 19 | version "1.5.3" 20 | 21 | url "https://github.com/ethereum/aleth.git" 22 | 23 | opoo "Aleth (formerly cpp-ethereum) has been removed from Homebrew. Please install binary releases from https://github.com/ethereum/aleth/releases." 24 | end 25 | -------------------------------------------------------------------------------- /solidity.rb: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # solidity.rb 3 | # 4 | # Homebrew formula for solidity. Homebrew (http://brew.sh/) is 5 | # the de-facto standard package manager for OS X, and this Ruby script 6 | # contains the metadata used to map command-line user settings used 7 | # with the 'brew' command onto build options. 8 | # 9 | # Our documentation for the solidity Homebrew setup is at: 10 | # 11 | # http://solidity.readthedocs.io/en/latest/installing-solidity.html 12 | # 13 | # (c) 2014-2017 solidity contributors. 14 | #------------------------------------------------------------------------------ 15 | 16 | class Solidity < Formula 17 | desc "The Solidity Contract-Oriented Programming Language" 18 | homepage "https://docs.soliditylang.org" 19 | url "https://github.com/ethereum/solidity/releases/download/v0.8.21/solidity_0.8.21.tar.gz" 20 | version "0.8.21" 21 | sha256 "6d1bb8e72850320e72d788575f6bd25dd4930cb6dd9edd35a59266a46f610d13" 22 | 23 | depends_on "cmake" => :build 24 | depends_on "boost" => "c++11" 25 | # Note: due to a homebrew limitation, ccache will always be detected and cannot be turned off. 26 | depends_on "ccache" => :build 27 | depends_on "z3" 28 | 29 | def install 30 | system "cmake", ".", *std_cmake_args, "-DTESTS=OFF" 31 | system "make", "install" 32 | end 33 | 34 | test do 35 | system "#{bin}/solc", "--version" 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /solidity@7.rb: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # solidity.rb 3 | # 4 | # Homebrew formula for solidity. Homebrew (http://brew.sh/) is 5 | # the de-facto standard package manager for OS X, and this Ruby script 6 | # contains the metadata used to map command-line user settings used 7 | # with the 'brew' command onto build options. 8 | # 9 | # Our documentation for the solidity Homebrew setup is at: 10 | # 11 | # http://solidity.readthedocs.io/en/latest/installing-solidity.html 12 | # 13 | # (c) 2014-2017 solidity contributors. 14 | #------------------------------------------------------------------------------ 15 | 16 | class SolidityAT7 < Formula 17 | desc "The Solidity Contract-Oriented Programming Language" 18 | homepage "https://docs.soliditylang.org" 19 | url "https://github.com/ethereum/solidity/releases/download/v0.7.6/solidity_0.7.6.tar.gz" 20 | version "0.7.6" 21 | sha256 "89f6d7f2f1c8223aaa9db690a0087ed186109738923cfac1b9c4c48697102e30" 22 | 23 | depends_on "cmake" => :build 24 | depends_on "boost" => "c++11" 25 | # Note: due to a homebrew limitation, ccache will always be detected and cannot be turned off. 26 | depends_on "ccache" => :build 27 | depends_on "z3" 28 | 29 | def install 30 | system "cmake", ".", *std_cmake_args, "-DTESTS=OFF" 31 | system "make", "install" 32 | end 33 | 34 | test do 35 | system "#{bin}/solc", "--version" 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /solidity@4.rb: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # solidity.rb 3 | # 4 | # Homebrew formula for solidity. Homebrew (http://brew.sh/) is 5 | # the de-facto standard package manager for OS X, and this Ruby script 6 | # contains the metadata used to map command-line user settings used 7 | # with the 'brew' command onto build options. 8 | # 9 | # Our documentation for the solidity Homebrew setup is at: 10 | # 11 | # http://solidity.readthedocs.io/en/latest/installing-solidity.html 12 | # 13 | # (c) 2014-2017 solidity contributors. 14 | #------------------------------------------------------------------------------ 15 | 16 | class SolidityAT4 < Formula 17 | desc "The Solidity Contract-Oriented Programming Language" 18 | homepage "http://solidity.readthedocs.org" 19 | url "https://github.com/ethereum/solidity/releases/download/v0.4.26/solidity_0.4.26.tar.gz" 20 | version "0.4.26" 21 | sha256 "22fd4ce2480df4d55602e50dc1606bd7c4cf5bf4658d49ccf7a4644ca0edd5b3" 22 | 23 | depends_on "cmake" => :build 24 | depends_on "boost" => "1.60" 25 | # Note: due to a homebrew limitation, ccache will always be detected and cannot be turned off. 26 | depends_on "ccache" => :build 27 | depends_on "z3" 28 | 29 | def install 30 | system "cmake", ".", *std_cmake_args, "-DTESTS=OFF" 31 | system "make", "install" 32 | end 33 | 34 | test do 35 | system "#{bin}/solc", "--version" 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /solidity@5.rb: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # solidity.rb 3 | # 4 | # Homebrew formula for solidity. Homebrew (http://brew.sh/) is 5 | # the de-facto standard package manager for OS X, and this Ruby script 6 | # contains the metadata used to map command-line user settings used 7 | # with the 'brew' command onto build options. 8 | # 9 | # Our documentation for the solidity Homebrew setup is at: 10 | # 11 | # http://solidity.readthedocs.io/en/latest/installing-solidity.html 12 | # 13 | # (c) 2014-2017 solidity contributors. 14 | #------------------------------------------------------------------------------ 15 | 16 | class SolidityAT5 < Formula 17 | desc "The Solidity Contract-Oriented Programming Language" 18 | homepage "http://solidity.readthedocs.org" 19 | url "https://github.com/ethereum/solidity/releases/download/v0.5.17/solidity_0.5.17.tar.gz" 20 | version "0.5.17" 21 | sha256 "39da2fb508587f28bf01aef8134b98ddf35403984c1d9cc290745c6e7711e4f7" 22 | 23 | depends_on "cmake" => :build 24 | depends_on "boost" => "c++11" 25 | # Note: due to a homebrew limitation, ccache will always be detected and cannot be turned off. 26 | depends_on "ccache" => :build 27 | depends_on "z3" 28 | 29 | def install 30 | system "cmake", ".", *std_cmake_args, "-DTESTS=OFF" 31 | system "make", "install" 32 | end 33 | 34 | test do 35 | system "#{bin}/solc", "--version" 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /solidity@6.rb: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # solidity.rb 3 | # 4 | # Homebrew formula for solidity. Homebrew (http://brew.sh/) is 5 | # the de-facto standard package manager for OS X, and this Ruby script 6 | # contains the metadata used to map command-line user settings used 7 | # with the 'brew' command onto build options. 8 | # 9 | # Our documentation for the solidity Homebrew setup is at: 10 | # 11 | # http://solidity.readthedocs.io/en/latest/installing-solidity.html 12 | # 13 | # (c) 2014-2017 solidity contributors. 14 | #------------------------------------------------------------------------------ 15 | 16 | class SolidityAT6 < Formula 17 | desc "The Solidity Contract-Oriented Programming Language" 18 | homepage "http://solidity.readthedocs.org" 19 | url "https://github.com/ethereum/solidity/releases/download/v0.6.12/solidity_0.6.12.tar.gz" 20 | version "0.6.12" 21 | sha256 "214bd37867d59c0f2f22dbaf10fd8eea2a58c9055c853c5016d26ad7091d5776" 22 | 23 | depends_on "cmake" => :build 24 | depends_on "boost" => "c++11" 25 | # Note: due to a homebrew limitation, ccache will always be detected and cannot be turned off. 26 | depends_on "ccache" => :build 27 | depends_on "z3" 28 | 29 | def install 30 | system "cmake", ".", *std_cmake_args, "-DTESTS=OFF" 31 | system "make", "install" 32 | end 33 | 34 | test do 35 | system "#{bin}/solc", "--version" 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build: 4 | macos: 5 | xcode: "14.3.1" 6 | 7 | steps: 8 | - checkout 9 | 10 | - run: 11 | name: Install Solidity 12 | command: | 13 | brew unlink python@2 14 | brew update 15 | brew upgrade 16 | #brew tap ethereum/ethereum # Acutally we should use the rule from the pull request 17 | brew install ./solidity.rb 18 | 19 | - run: 20 | name: Test Formula 21 | command: brew test solidity.rb 22 | 23 | - run: 24 | name: Test Solidity 25 | command: solc --version 26 | 27 | - run: 28 | name: Cleanup 29 | command: brew uninstall boost cmake ccache solidity 30 | 31 | - run: 32 | name: Install Solidity 0.7 33 | command: | 34 | brew update 35 | #brew tap ethereum/ethereum # Acutally we should use the rule from the pull request 36 | brew install ./solidity@7.rb 37 | 38 | - run: 39 | name: Test Formula 40 | command: brew test solidity@7 41 | 42 | - run: 43 | name: Test Solidity 44 | command: solc --version 45 | 46 | - run: 47 | name: Cleanup 48 | command: brew uninstall boost cmake ccache solidity@7 49 | 50 | - run: 51 | name: Install Solidity 0.6 52 | command: | 53 | brew update 54 | #brew tap ethereum/ethereum # Acutally we should use the rule from the pull request 55 | brew install ./solidity@6.rb 56 | 57 | - run: 58 | name: Test Formula 59 | command: brew test solidity@6 60 | 61 | - run: 62 | name: Test Solidity 63 | command: solc --version 64 | 65 | - run: 66 | name: Cleanup 67 | command: brew uninstall boost cmake ccache solidity@6 68 | 69 | - run: 70 | name: Install Solidity 0.5 71 | command: | 72 | brew update 73 | #brew tap ethereum/ethereum # Acutally we should use the rule from the pull request 74 | brew install ./solidity@5.rb 75 | 76 | - run: 77 | name: Test Formula 78 | command: brew test solidity@5 79 | 80 | - run: 81 | name: Test Solidity 82 | command: solc --version 83 | 84 | - run: 85 | name: Cleanup 86 | command: brew uninstall boost cmake ccache solidity@5 87 | 88 | - run: 89 | name: Install Solidity 0.4 90 | command: | 91 | brew update 92 | #brew tap ethereum/ethereum # Acutally we should use the rule from the pull request 93 | brew install ./solidity@4.rb 94 | 95 | - run: 96 | name: Test Formula 97 | command: brew test solidity@4 98 | 99 | - run: 100 | name: Test Solidity 101 | command: solc --version 102 | 103 | - run: 104 | name: Install geth 105 | command: brew install ./ethereum.rb 106 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | homebrew-ethereum 2 | ================= 3 | 4 | Homebrew Tap for Ethereum 5 | 6 | **Important note: reporting issues with any of these brews should be done at their respective repositories ([Go client](https://github.com/ethereum/go-ethereum) and [Solidity](https://github.com/ethereum/solidity)).** 7 | 8 | ## Installation 9 | 10 | ``` 11 | brew tap ethereum/ethereum 12 | ``` 13 | 14 | ### Go client 15 | ``` 16 | brew install ethereum 17 | ``` 18 | 19 | ### Solidity 20 | 21 | To install the latest release: 22 | ``` 23 | brew install solidity 24 | ``` 25 | 26 | To install the latest 0.7.x release: 27 | ``` 28 | brew install solidity@7 29 | ``` 30 | 31 | To install the latest 0.6.x release: 32 | ``` 33 | brew install solidity@6 34 | ``` 35 | 36 | To install the latest 0.5.x release: 37 | ``` 38 | brew install solidity@5 39 | ``` 40 | 41 | To install the latest 0.4.x release: 42 | ``` 43 | brew install solidity@4 44 | ``` 45 | 46 | Note: the older releases are not maintained indefinitely, but are provided as a convenience. 47 | 48 | ## Running 49 | 50 | ### Go client 51 | `geth` 52 | 53 | ### Solidity 54 | `solc` 55 | 56 | ## Development 57 | Get the latest development version with the `--devel` flag. 58 | 59 | 60 | ### Go client 61 | ``` 62 | brew reinstall ethereum --devel 63 | ``` 64 | 65 | 66 | ### Current branches 67 | 68 | Go: 69 | * `--devel` is on develop branch 70 | * normal install is on master branch 71 | 72 | 73 | ## Upgrading 74 | 75 | ``` 76 | brew update && brew upgrade 77 | ``` 78 | 79 | ## Minor updates 80 | 81 | ### Go client 82 | ``` 83 | brew update && brew reinstall ethereum 84 | ``` 85 | 86 | 87 | ## Versions 88 | List available versions with: 89 | ``` 90 | ls -l /usr/local/Cellar/ethereum 91 | ``` 92 | 93 | If you have other versions installed, you can switch with: 94 | ``` 95 | brew switch ethereum 96 | ``` 97 | Or follow this [StackOverflow answer](http://stackoverflow.com/a/9832084/2639784) 98 | 99 | These brews can be installed via the raw GitHub URLs, or by cloning this 100 | repository locally with `brew tap ethereum/ethereum`. You can also install binary 101 | bottles directly with `brew install `, see [cpt-obvious](https://build.ethdev.com/waterfall) 102 | for previous builds. 103 | 104 | 105 | ## Troubleshooting 106 | 107 | * Use `--verbose` to get more info while installing. 108 | * Make sure to update XCode and the command line tools. 109 | * Run `brew update` and `brew upgrade` 110 | * Fix what the `brew doctor` says. 111 | * Reinstall dependencies: `brew reinstall boost --c++11 --with-python` 112 | * Make changes to `/usr/local/Library/Taps/ethereum/homebrew-ethereum/ethereum.rb` 113 | * Reinstall with `brew reinstall ethereum.rb` (send a pull request!) 114 | * Take a walk 115 | 116 | Note that the `ethereum` keg exists in [`homebrew-core`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/ethereum.rb). It's not always up to date in `homebrew-core` and you might want to prioritise the version from this tap. To do this, you can pin this tap by running the following command: 117 | 118 | ```shell 119 | brew tap-pin ethereum/ethereum 120 | ``` 121 | 122 | ## Patching 123 | 124 | First `cd /Library/Caches/Homebrew/ethereum--git/` and make your changes. Then `git diff > shiny.patch`, copy/paste the content of your patch under `__END__` of `ethereum.rb` and replace the `def patches` block with: 125 | 126 | ``` 127 | def patches 128 | DATA 129 | end 130 | ``` 131 | 132 | If you want to submit your change, save your patch in a gist, add your `option 'shiny-option', 'Shiny description'` and the URL to your gist in the patches block and submit a pull request. Make sure to send a pull request to Ethereum also! 133 | --------------------------------------------------------------------------------