2011-04-26 20:57:11 +00:00
|
|
|
{ stdenv, composableDerivation, fetchurl, xapian10, pkgconfig
|
2010-07-30 14:47:23 +00:00
|
|
|
, python ? null, php ? null, ruby ? null }:
|
2009-08-20 20:18:58 +00:00
|
|
|
|
2010-07-30 14:47:23 +00:00
|
|
|
let inherit (composableDerivation) wwf; in
|
2009-08-20 20:18:58 +00:00
|
|
|
|
2011-02-13 00:49:07 +00:00
|
|
|
composableDerivation.composableDerivation {} rec {
|
2009-08-20 20:18:58 +00:00
|
|
|
|
2011-02-13 00:49:07 +00:00
|
|
|
name = "xapian-bindings-1.0.23";
|
2009-08-20 20:18:58 +00:00
|
|
|
|
2010-07-30 14:47:23 +00:00
|
|
|
src = fetchurl {
|
2011-02-13 00:49:07 +00:00
|
|
|
url = "http://oligarchy.co.uk/xapian/1.0.23/${name}.tar.gz";
|
|
|
|
sha256 = "6028123c3cd9bfc380b672b89f5420f7d5c063fc3511dee4dd5d34033ccb6911";
|
2010-07-30 14:47:23 +00:00
|
|
|
};
|
|
|
|
|
2011-04-26 20:57:11 +00:00
|
|
|
buildInputs = [ xapian10 pkgconfig ];
|
2009-08-20 20:18:58 +00:00
|
|
|
|
2010-07-30 14:47:23 +00:00
|
|
|
# most interpreters aren't tested yet.. (see python for example how to do it)
|
|
|
|
flags =
|
2009-08-20 20:18:58 +00:00
|
|
|
wwf {
|
|
|
|
name = "python";
|
|
|
|
enable = {
|
|
|
|
buildInputs = [ python ];
|
|
|
|
# export same env vars as in pythonNew
|
|
|
|
preConfigure = ''
|
|
|
|
export PYTHON_LIB=$out/lib/${python.libPrefix}/site-packages
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/nix-support
|
2009-08-20 20:18:58 +00:00
|
|
|
echo "export NIX_PYTHON_SITES=\"$out:\$NIX_PYTHON_SITES\"" >> $out/nix-support/setup-hook
|
|
|
|
echo "export PYTHONPATH=\"$PYTHON_LIB:\$PYTHONPATH\"" >> $out/nix-support/setup-hook
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// wwf {
|
|
|
|
name = "php";
|
|
|
|
enable = {
|
|
|
|
buildInputs = [ php ];
|
|
|
|
preConfigure = ''
|
|
|
|
export PHP_EXTENSION_DIR=$out/lib/php # TODO use a sane directory. Its not used anywhere by now
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// wwf {
|
|
|
|
name = "ruby";
|
|
|
|
enable = {
|
|
|
|
buildInputs = [ ruby ];
|
|
|
|
# export same env vars as in rubyLibs
|
|
|
|
preConfigure = ''
|
|
|
|
export RUBY_LIB=$out/${ruby.libPath}
|
|
|
|
export RUBY_LIB_ARCH=$RUBY_LIB
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/nix-support
|
2009-08-20 20:18:58 +00:00
|
|
|
echo "export RUBYLIB=\"$RUBY_LIB:\$RUBYLIB\"" >> $out/nix-support/setup-hook
|
|
|
|
echo "export GEM_PATH=\"$out:\$GEM_PATH\"" >> $out/nix-support/setup-hook
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
# note: see configure --help to get see which env vars can be used
|
|
|
|
# // wwf { name = "tcl"; enable = { buildInputs = [ tcl ];};}
|
|
|
|
# // wwf { name = "csharp"; }
|
|
|
|
# // wwf { name = "java"; }
|
|
|
|
;
|
|
|
|
|
|
|
|
cfg = {
|
|
|
|
pythonSupport = true;
|
|
|
|
phpSupport = true;
|
|
|
|
rubySupport = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
2010-07-30 14:47:23 +00:00
|
|
|
description = "Bindings for the Xapian library";
|
2011-04-26 20:57:11 +00:00
|
|
|
homepage = xapian10.meta.homepage;
|
2011-04-27 12:49:55 +00:00
|
|
|
license = "GPLv2+";
|
2011-04-26 20:57:04 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.chaoflow ];
|
2009-08-20 20:18:58 +00:00
|
|
|
};
|
|
|
|
}
|