ruby: exorcise the last few remaining rubyPackages

This commit is contained in:
Charles Strahan
2015-01-21 20:46:50 -05:00
parent 65c7c61841
commit 8085f088cb
12 changed files with 28 additions and 2682 deletions

View File

@@ -28,35 +28,21 @@ let
in
{
bundler = attrs: {
dontPatchShebangs = true;
};
gpgme = attrs: {
buildInputs = [ gpgme ];
};
libv8 = attrs: {
buildInputs = [ which v8 python ];
# The "--with-system-v8" flag doesn't seem to work...
buildFlags = [
"--with-system-v8=true"
];
patches = [
(fetchpatch {
url = https://github.com/cowboyd/libv8/pull/161.patch;
sha256 = "1l6572cmigc22g249jj8h0xlbig88mj43kdqdbimhw2pmpv3q0rs";
})
];
postPatch = ''
rm -r vendor
cat <<-EOF > ext/libv8/extconf.rb
require 'mkmf'
create_makefile('libv8')
require File.expand_path '../location', __FILE__
location = Libv8::Location::System.new
exit location.install!
EOF
'';
};
ncursesw = attrs: {
@@ -110,19 +96,6 @@ in
};
therubyracer = attrs: {
#preInstall = ''
# ln -s ${clang}/bin/clang $TMPDIR/gcc
# ln -s ${clang}/bin/clang++ $TMPDIR/g++
# export PATH=$TMPDIR:$PATH
#'';
#buildInputs = [
# utillinux # for `flock`
#];
#postInstall = ''
#'';
buildFlags = [
"--with-v8-dir=${v8}"
"--with-v8-include=${v8}/include"

View File

@@ -264,10 +264,6 @@ stdenv.mkDerivation {
];
installPhase = ''
# Copy the Gemfile and Gemfile.lock
#mkdir out
#out=$(pwd -P)/out
mkdir -p $bundle
export BUNDLE_GEMFILE=$bundle/Gemfile
cp ${gemfile} $BUNDLE_GEMFILE
@@ -280,20 +276,21 @@ stdenv.mkDerivation {
export GEM_PATH=$GEM_HOME
mkdir -p $GEM_HOME
${allBuildFlags}
#export
mkdir gems
${copyGems}
mkdir env
${runPreInstallers}
${allBuildFlags}
${lib.optionalString (!documentation) ''
mkdir home
HOME="$(pwd -P)/home"
echo "gem: --no-rdoc --no-ri" > $HOME/.gemrc
''}
mkdir env
${runPreInstallers}
mkdir $out/bin
cp ${./monkey_patches.rb} monkey_patches.rb
export RUBYOPT="-rmonkey_patches.rb -I $(pwd -P)"

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +0,0 @@
{ ruby, rubygemsFun, callPackage }:
{
# Nix utilities
gemFixes = callPackage ../development/interpreters/ruby/fixes.nix { };
buildRubyGem = callPackage ../development/interpreters/ruby/gem.nix { inherit ruby; };
loadRubyEnv = callPackage ../development/interpreters/ruby/load-ruby-env.nix { inherit ruby; };
# Gems
rubygems = rubygemsFun ruby;
}