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
|
|
|
|
|
2010-01-15 19:35:06 +00:00
|
|
|
version = "1.3.5";
|
2008-04-11 10:23:33 +01:00
|
|
|
src = fetchurl {
|
2010-01-15 19:35:06 +00:00
|
|
|
url = "http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz";
|
|
|
|
sha256 = "1b26fn9kmyd6394m1gqppi10xyf1hac85lvsynsxzpjlmv0qr4n0";
|
2008-04-11 10:23:33 +01:00
|
|
|
};
|
|
|
|
|
2010-01-15 19:35:06 +00:00
|
|
|
|
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
|
2010-01-15 19:35:06 +00:00
|
|
|
find $out -type f -name "*.rb" | xargs sed -i "s@/usr/bin/env@$(type -p env)@g"
|
2008-04-11 10:23:33 +01:00
|
|
|
'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
|
|
|
|
|
|
|
|
/* doConfigure should be specified separately */
|
2010-01-15 19:35:06 +00:00
|
|
|
phaseNames = ["doPatch" "doInstall"];
|
2008-04-11 10:23:33 +01:00
|
|
|
|
|
|
|
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 = ''
|
2009-06-30 15:29:20 +01:00
|
|
|
see comment in rubyLibs to get to know how to use ruby gems in nix
|
2008-10-19 13:59:34 +01:00
|
|
|
'';
|
2008-04-11 10:23:33 +01:00
|
|
|
};
|
2009-06-30 15:29:20 +01:00
|
|
|
|
|
|
|
# TODO don't resolve 302 redirects but make nix resolve in fetchurl and
|
|
|
|
# nix-prefetch-url. This should be done on stdenv-updates.
|
|
|
|
patches = [ ./gem_nix_command.patch /* see longDescription above */ ];
|
2008-04-11 10:23:33 +01:00
|
|
|
}
|