2011-04-26 22:57:16 +02:00
|
|
|
{ stdenv, composableDerivation, fetchurl, xapian, pkgconfig, zlib
|
|
|
|
, python ? null, php ? null, ruby ? null }:
|
|
|
|
|
|
|
|
let inherit (composableDerivation) wwf; in
|
|
|
|
|
|
|
|
composableDerivation.composableDerivation {} rec {
|
|
|
|
|
2016-03-31 20:54:13 +02:00
|
|
|
name = "xapian-bindings-1.2.23";
|
2011-04-26 22:57:16 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-03-31 20:54:13 +02:00
|
|
|
url = "http://oligarchy.co.uk/xapian/1.2.23/${name}.tar.xz";
|
|
|
|
sha256 = "05929d9bq9df25kh2i6gk2w09w7p5qknf9cc7mrm2g46finbbd0r";
|
2011-04-26 22:57:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ xapian pkgconfig zlib ];
|
|
|
|
|
|
|
|
# most interpreters aren't tested yet.. (see python for example how to do it)
|
|
|
|
flags =
|
|
|
|
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 21:16:00 +01:00
|
|
|
mkdir -p $out/nix-support
|
2016-03-31 20:32:27 +02: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
|
2011-04-26 22:57:16 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// 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 ];
|
|
|
|
preConfigure = ''
|
|
|
|
export RUBY_LIB=$out/${ruby.libPath}
|
|
|
|
export RUBY_LIB_ARCH=$RUBY_LIB
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/nix-support
|
2016-03-31 20:32:27 +02:00
|
|
|
echo "export RUBYLIB=\"$RUBY_LIB:\$RUBYLIB\"" >> $out/nix-support/setup-hook
|
|
|
|
echo "export GEM_PATH=\"$out:\$GEM_PATH\"" >> $out/nix-support/setup-hook
|
2011-04-26 22:57:16 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
# 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;
|
2016-03-31 21:05:20 +02:00
|
|
|
phpSupport = false;
|
2011-04-26 22:57:16 +02:00
|
|
|
rubySupport = true;
|
|
|
|
};
|
|
|
|
|
2016-03-31 20:32:27 +02:00
|
|
|
meta = {
|
2011-04-26 22:57:16 +02:00
|
|
|
description = "Bindings for the Xapian library";
|
|
|
|
homepage = xapian.meta.homepage;
|
2011-11-20 22:49:13 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2011-04-26 22:57:16 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.chaoflow ];
|
|
|
|
};
|
|
|
|
}
|