2008-04-11 10:23:33 +01:00
|
|
|
args : with args;
|
|
|
|
rec {
|
2009-06-30 15:29:17 +01:00
|
|
|
|
|
|
|
# some packages (eg ruby-debug) still require 1.8. So let's stick to that for
|
|
|
|
# now if nobody has different requirements
|
|
|
|
|
|
|
|
version = "1.3.4";
|
2008-04-11 10:23:33 +01:00
|
|
|
src = fetchurl {
|
2009-06-30 15:29:17 +01:00
|
|
|
url = "http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz";
|
|
|
|
sha256 = "1z5vvwdf7cwiq669amfxzqd88bn576yq6d9c5c6c92fm9sib1d0y";
|
2008-04-11 10:23:33 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ruby makeWrapper];
|
|
|
|
configureFlags = [];
|
|
|
|
|
2009-05-20 00:25:58 +01:00
|
|
|
doInstall = fullDepEntry (''
|
2008-04-11 10:23:33 +01:00
|
|
|
ruby setup.rb --prefix=$out/
|
|
|
|
wrapProgram $out/bin/gem --prefix RUBYLIB : $out/lib:$out/lib
|
|
|
|
'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
|
|
|
|
|
|
|
|
/* doConfigure should be specified separately */
|
|
|
|
phaseNames = ["doInstall"];
|
|
|
|
|
|
|
|
name = "rubygems-" + version;
|
|
|
|
meta = {
|
2008-08-02 23:25:54 +01:00
|
|
|
description = "Ruby gems package collection";
|
2008-10-19 13:59:34 +01:00
|
|
|
longDescription = ''
|
|
|
|
Example usage:
|
2009-06-30 15:29:17 +01:00
|
|
|
export GEM_HOME=~/.gem_home
|
|
|
|
export RUBYLIB=~/.nix-profile/lib
|
2008-10-19 13:59:34 +01:00
|
|
|
gem install -i .ruby-gems json
|
|
|
|
ruby -I ~/.ruby-gems/gems/json-1.1.3/lib your-script.rb
|
|
|
|
Probably there are better ways to handle this all. Go on and fix it.
|
|
|
|
'';
|
2008-04-11 10:23:33 +01:00
|
|
|
};
|
|
|
|
}
|