[Nix-dev] announce: Ruby & Nixpkgs
Marc Weber
marco-oweber at gmx.de
Wed Nov 24 23:20:15 CET 2010
I updated the gemnix patch. This time it creates a huge file containing
all known specs by rubygems. A very trivial Nix implementation resolves
dependencies (hopefully) the way rubygems does it.
This means that you can install almost all Ruby packages using the nix
package manager.
The nix code (and the .nix file containing the specs):
http://gitorious.org/nixpkgs-ruby-overlay
the gem patch:
http://gitorious.org/rubygems-nix-patch/rubygems-nix-patch
usage looks like this:
tested18 = rubyPackages18 [
"nokogiri" "rake" "escape"
"git"
"hoe"
"rubyforge"
"json_pure"
"chronic"
"rubygems_update"
"jeweler"
"rake"
"ncursesw"
"trollop"
"gettext"
"locale"
"lockfile"
"rmail"
"highline"
"net_ssh"
"mime_types"
"sup" # curses is distributed with ruby
"xrefresh-server"
];
which creates an attr set of those ruby packages. Next step is to add
support for Ruby-1.9.
Right now there is a catch. The nix code depends on some additional
patches:
- support for nixpkgs overlays: add some lines to nixpkgs making it
easier to put additional derivations into extra repos.
Its used by nixpkgs-haskell-overlay and nixpkgs-ruby-overlay.
I chose to put code into additional repos because they cause huge
amounts of data which can change often (such as hackage dumps or
rubygems dumps)
- support for arbitrary strings in attr names in particular when
declaring attrs. Example: { "foo": "bar" }
I tried getting feedback about the implementation details multiple
times to no avail.
Because I'd like to share those changes I'm going to setup and maintain
git mirrors - see other mail.
If you're interested in using Ruby packages using the nix package
manager let me know so that I can help you setting it up.
Marc Weber
More information about the nix-dev
mailing list