Skip to content

Commit

Permalink
ruby: exorcise the last few remaining rubyPackages
Browse files Browse the repository at this point in the history
  • Loading branch information
cstrahan committed Jan 22, 2015
1 parent 65c7c61 commit 8085f08
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 2,682 deletions.
2 changes: 1 addition & 1 deletion pkgs/applications/version-management/redmine/bootstrap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in stdenv.mkDerivation rec {
sha256 = "0x0zwxyj4dwbk7l64s3lgny10mjf0ba8jwrbafsm4d72sncmacv0";
};
buildInputs = [
ruby rubyPackages.bundler libiconv libxslt libxml2 pkgconfig
ruby bundler libiconv libxslt libxml2 pkgconfig
libffi imagemagickBig postgresql which stdenv
];
installPhase = ''
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/version-management/redmine/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, ruby, rubyPackages, bundler, libiconv, libiconvOrNull, libiconvOrLibc, libxslt, libxml2, pkgconfig, libffi, glibc, imagemagickBig, postgresql }:
{ stdenv, fetchurl, ruby, bundler, libiconv, libiconvOrNull, libiconvOrLibc, libxslt, libxml2, pkgconfig, libffi, glibc, imagemagickBig, postgresql }:

let
gemspec = map (gem: fetchurl { url=gem.url; sha256=gem.hash; }) (import ./Gemfile.nix);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)"
Expand Down
Loading

0 comments on commit 8085f08

Please sign in to comment.