Chromebrew

Chromebrew

The missing package manager for Chrome OS

Chromebrew installs what you need with its dependencies:

$ crew install vim

It also registers the changes being made, so you can easily remove anything:

$ crew remove vim

See which packages are currently available:

$ crew search

Look for a package:

$ crew search vim

Update software lists:

$ crew update

Update Chromebrew packages:

$ crew upgrade

Install Chromebrew (along with Ruby and Git).

Available on aarch64, armv7l, i686 and x86_64.
wget -q -O - https://raw.github.com/skycocker/chromebrew/master/install.sh | bash

What is it?

Chromebrew is a package manager / source builder hybrid targeted for Chromebooks with Chrome OS.

What does it do?

It installs the software you need that hasn't been provided by Google. Many important packages are already precompiled and it's enough to just type crew install package_name, but if something's not already there, you can easily build and install it from source.

How does it work?

In fact, Chromebrew is a simple Ruby script. There's also some Git involved, so we needed both of these things to run it on a bare Chrome OS. We have prebuilt them along with their dependencies to install into your system during installation. So, basically, after installing Chromebrew, you will have fully functional Ruby with Rubygems, Git and a package manager dedicated just for your Chromebook. Cool, huh?

How is it different from Crouton?

Well, Chromebrew doesn't install an operating system. :p

The idea is that you may be on a weak internet connection and cannot download too much data, but you don't have Crouton and need just a few small packages. Also, you may be on a good internet connection and need just a few small packages. Also, why not use Chrome OS as the operating system?

How can I help?

If you have a compatible Chromebook, you can fork my Github repo and add new packages to the packages directory if you managed to build them from source successfully on your device. Package recipes are simple Ruby files - here is an example:

require 'package'

class Vim < Package
  description 'Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient.'
  homepage 'http://www.vim.org/'
  version '8.0-1'
  source_url 'ftp://ftp.vim.org/pub/vim/unix/vim-8.0.tar.bz2'
  source_sha1 '54bb7fe631ed8eaea5675ec934e88b0da1f1eca0'

  depends_on 'ncurses'
  # vim uses shared library of following languages, so need them isntalled at run-time
  depends_on 'perl'
  depends_on 'python27'
  depends_on 'ruby'

  def self.build
    system './configure --prefix=/usr/local --enable-gui=no --with-features=huge --without-x --disable-nls --enable-multibyte  --with-tlib=ncurses --enable-perlinterp --enable-pythoninterp  --enable-rubyinterp --with-ruby-command=/usr/local/bin/ruby --disable-selinux'
    system "make"
  end

  def self.install
    system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
    system "strip", "#{CREW_DEST_DIR}/usr/local/bin/vim"

    puts "Make sure to put your .vim directory in a subdirectory of /usr/local so it has execute permissions"
    puts "You can then symlink to your home directory so vim can see it"
    puts "ln -s /usr/local/vim ~/.vim"
    puts "ln -s ~/.vim/vimrc ~/.vimrc"
  end
end