2008-04-11 10:23:33 +01:00
|
|
|
args : with args;
|
|
|
|
rec {
|
2009-06-30 15:29:17 +01:00
|
|
|
|
2013-12-04 03:10:30 +00:00
|
|
|
version = "1.8.25";
|
2008-04-11 10:23:33 +01:00
|
|
|
src = fetchurl {
|
2010-09-08 10:56:53 +01:00
|
|
|
url = "http://production.cf.rubygems.org/rubygems/${name}.tgz";
|
2013-12-04 03:10:30 +00:00
|
|
|
sha256 = "1j0wiy829nsfrpdzr9xzs39jf1lga3f5b7773vxqfs3lz3fli4v4";
|
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/
|
2011-01-21 08:24:57 +00:00
|
|
|
wrapProgram $out/bin/gem --prefix RUBYLIB : $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"
|
2011-01-21 08:24:46 +00:00
|
|
|
mkdir -pv $out/nix-support
|
|
|
|
cat > $out/nix-support/setup-hook <<EOF
|
|
|
|
export RUBYOPT=rubygems
|
|
|
|
addToSearchPath RUBYLIB $out/lib
|
|
|
|
EOF'') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
|
2008-04-11 10:23:33 +01:00
|
|
|
|
|
|
|
/* 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 = ''
|
2011-01-21 08:24:57 +00:00
|
|
|
Nix can create nix packages from gems.
|
|
|
|
|
2014-09-11 23:26:13 +01:00
|
|
|
To use it by installing gem-nix package.
|
2008-10-19 13:59:34 +01:00
|
|
|
'';
|
2008-04-11 10:23:33 +01:00
|
|
|
};
|
2009-06-30 15:29:20 +01:00
|
|
|
|
2011-01-21 08:24:57 +00:00
|
|
|
patches = [ ./gem_hook.patch ];
|
2008-04-11 10:23:33 +01:00
|
|
|
}
|