nixpkgs/pkgs/development/libraries/xapian/bindings/1.0.14.nix
Eelco Dolstra 7f5b839524 * Removed selectVersion. There's no good reason to write
`selectVersion ./foo "bar"' instead of `import ./foo/bar.nix'.
* Replaced `with args' with formal function arguments in several
  packages.
* Renamed several files to `default.nix'.  As a general rule, version
  numbers should only be included in the filename when there is a
  reason to keep multiple versions of a package in Nixpkgs.
  Otherwise, it just makes it harder to update the package.

svn path=/nixpkgs/trunk/; revision=18403
2009-11-18 09:39:59 +00:00

73 lines
2.2 KiB
Nix

args: with args;
let inherit (args.composableDerivation) composableDerivation wwf; in
composableDerivation {} {
name = "xapian-bindings-1.0.14";
src = fetchurl {
url = http://oligarchy.co.uk/xapian/1.0.14/xapian-bindings-1.0.14.tar.gz;
sha256 = "060jjwddv6ws8iy3jkpl4zcrzzinkjvdblkl0gcja90qzl2j81q5";
};
buildInputs = [xapian pkgconfig];
# 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
ensureDir $out/nix-support
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
ensureDir $out/nix-support
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 = {
description = "bindings for the xapian library";
homepage = xapian.meta.homepage;
license = "GPLv2";
};
}