2012-01-11 00:49:24 +01:00
|
|
|
{ fetchurl, writeScript, ruby, ncurses, sqlite, libxml2, libxslt, libffi
|
2013-11-21 04:46:02 +01:00
|
|
|
, zlib, libuuid, gems, jdk, python, stdenv, libiconvOrEmpty, imagemagick
|
|
|
|
, pkgconfig }:
|
2011-01-21 09:25:02 +01:00
|
|
|
|
|
|
|
let
|
2012-01-11 00:49:24 +01:00
|
|
|
|
2011-01-21 09:25:02 +01:00
|
|
|
patchUsrBinEnv = writeScript "path-usr-bin-env" ''
|
|
|
|
#!/bin/sh
|
|
|
|
echo "==================="
|
|
|
|
find "$1" -type f -name "*.rb" | xargs sed -i "s@/usr/bin/env@$(type -p env)@g"
|
|
|
|
find "$1" -type f -name "*.mk" | xargs sed -i "s@/usr/bin/env@$(type -p env)@g"
|
|
|
|
'';
|
2012-01-11 00:49:24 +01:00
|
|
|
|
2011-01-21 09:25:02 +01:00
|
|
|
in
|
2012-01-11 00:49:24 +01:00
|
|
|
|
2011-01-21 09:25:02 +01:00
|
|
|
{
|
2013-06-14 10:06:14 +02:00
|
|
|
iconv = { buildInputs = [ libiconvOrEmpty ]; };
|
2013-03-15 13:55:48 +01:00
|
|
|
|
2013-03-21 13:56:33 +01:00
|
|
|
libv8 = {
|
|
|
|
# This fix is needed to fool scons, which clears the environment by default.
|
|
|
|
# It's ugly, but it works.
|
|
|
|
#
|
|
|
|
# We create a gcc wrapper wrapper, which reexposes the environment variables
|
|
|
|
# that scons hides. Furthermore, they treat warnings as errors causing the
|
|
|
|
# build to fail, due to an unused variable.
|
|
|
|
#
|
|
|
|
# Finally, we must set CC and AR explicitly to allow scons to find the
|
|
|
|
# compiler and archiver
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
cat > $TMPDIR/g++ <<EOF
|
|
|
|
#! ${stdenv.shell}
|
|
|
|
$(export)
|
|
|
|
|
|
|
|
g++ \$(echo \$@ | sed 's/-Werror//g')
|
|
|
|
EOF
|
|
|
|
chmod +x $TMPDIR/g++
|
|
|
|
|
|
|
|
export CXX=$TMPDIR/g++
|
|
|
|
export AR=$(type -p ar)
|
|
|
|
'';
|
|
|
|
buildInputs = [ python ];
|
2013-06-18 17:14:17 +02:00
|
|
|
NIX_POST_EXTRACT_FILES_HOOK = writeScript "patch-scons" ''
|
|
|
|
#!/bin/sh
|
|
|
|
for i in `find "$1" -name scons`
|
|
|
|
do
|
|
|
|
sed -i -e "s@/usr/bin/env@$(type -p env)@g" $i
|
|
|
|
done
|
|
|
|
'';
|
2013-03-21 13:56:33 +01:00
|
|
|
};
|
2012-01-11 00:49:24 +01:00
|
|
|
|
2011-01-21 09:25:02 +01:00
|
|
|
sqlite3 = { propagatedBuildInputs = [ sqlite ]; };
|
2012-01-11 00:49:24 +01:00
|
|
|
|
2011-01-21 09:25:02 +01:00
|
|
|
rails = { gemFlags = "--no-ri --no-rdoc"; };
|
2012-01-11 00:49:24 +01:00
|
|
|
|
2011-01-21 09:25:02 +01:00
|
|
|
ncurses = { propagatedBuildInputs = [ ncurses ]; };
|
2013-03-04 16:43:20 +01:00
|
|
|
|
|
|
|
nix = {
|
|
|
|
postInstall = ''
|
|
|
|
cd $out/${ruby.gemPath}/gems/nix*
|
|
|
|
patch -Np1 -i ${./fix-gem-nix-versions.patch}
|
|
|
|
'';
|
|
|
|
};
|
2012-01-11 00:49:24 +01:00
|
|
|
|
2011-01-21 09:25:02 +01:00
|
|
|
ncursesw = { propagatedBuildInputs = [ ncurses ]; };
|
2012-01-11 00:49:24 +01:00
|
|
|
|
2011-01-21 09:25:02 +01:00
|
|
|
nokogiri = {
|
2012-01-11 00:49:24 +01:00
|
|
|
buildFlags =
|
|
|
|
[ "--with-xml2-dir=${libxml2} --with-xml2-include=${libxml2}/include/libxml2"
|
|
|
|
"--with-xslt-dir=${libxslt}"
|
|
|
|
];
|
2011-01-21 09:25:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
ffi = {
|
|
|
|
postUnpack = "onetuh";
|
2012-01-11 00:49:24 +01:00
|
|
|
buildFlags = ["--with-ffi-dir=${libffi}"];
|
2011-01-21 09:25:02 +01:00
|
|
|
NIX_POST_EXTRACT_FILES_HOOK = patchUsrBinEnv;
|
|
|
|
};
|
|
|
|
|
2013-11-21 04:46:02 +01:00
|
|
|
rmagick = {
|
|
|
|
buildInputs = [ imagemagick pkgconfig ];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-I${imagemagick}/include/ImageMagick-6";
|
|
|
|
};
|
|
|
|
|
2011-01-21 09:25:02 +01:00
|
|
|
xrefresh_server =
|
2012-01-11 00:49:24 +01:00
|
|
|
let
|
|
|
|
patch = fetchurl {
|
|
|
|
url = "http://mawercer.de/~nix/xrefresh.diff.gz";
|
|
|
|
sha256 = "1f7bnmn1pgkmkml0ms15m5lx880hq2sxy7vsddb3sbzm7n1yyicq";
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
propagatedBuildInputs = [ gems.rb_inotify ];
|
2011-01-21 09:25:02 +01:00
|
|
|
|
2012-01-11 00:49:24 +01:00
|
|
|
# monitor implementation for Linux
|
|
|
|
postInstall = ''
|
|
|
|
cd $out/${ruby.gemPath}/gems/*
|
|
|
|
zcat ${patch} | patch -p 1
|
|
|
|
''; # */
|
|
|
|
};
|
2011-01-21 09:25:02 +01:00
|
|
|
|
|
|
|
xapian_full = {
|
|
|
|
buildInputs = [ gems.rake zlib libuuid ];
|
|
|
|
gemFlags = "--no-rdoc --no-ri";
|
|
|
|
};
|
2012-01-11 00:50:31 +01:00
|
|
|
|
2013-06-12 04:24:04 +02:00
|
|
|
xapian_full_alaveteli = {
|
|
|
|
buildInputs = [ zlib libuuid ];
|
|
|
|
};
|
|
|
|
|
2013-06-20 02:09:15 +02:00
|
|
|
xapian_ruby = {
|
|
|
|
buildInputs = [ zlib libuuid ];
|
|
|
|
};
|
|
|
|
|
2012-01-11 00:50:31 +01:00
|
|
|
rjb = {
|
|
|
|
buildInputs = [ jdk ];
|
|
|
|
JAVA_HOME = jdk;
|
|
|
|
};
|
2012-02-26 12:10:00 +01:00
|
|
|
|
|
|
|
buildr = {
|
|
|
|
# Many Buildfiles rely on RUBYLIB containing the current directory
|
|
|
|
# (as was the default in Ruby < 1.9.2).
|
|
|
|
extraWrapperFlags = "--prefix RUBYLIB : .";
|
|
|
|
};
|
|
|
|
|
2013-08-31 18:39:58 +02:00
|
|
|
pry = { gemFlags = "--no-ri --no-rdoc"; };
|
2013-09-04 22:42:20 +02:00
|
|
|
|
|
|
|
fakes3 = {
|
|
|
|
postInstall = ''
|
|
|
|
cd $out/${ruby.gemPath}/gems/*
|
|
|
|
patch -Np1 -i ${../../ruby-modules/fake-s3-list-bucket.patch}
|
|
|
|
'';
|
|
|
|
};
|
2011-01-21 09:25:02 +01:00
|
|
|
}
|