Author: chaoflow
Date: Tue Apr 26 20:57:16 2011
New Revision: 26980
URL: https://svn.nixos.org/websvn/nix/?rev=26980&sc=1

Log:
xapian and xapianBindings 1.2.5

Added:
   nixpkgs/trunk/pkgs/development/libraries/xapian/bindings/default.nix
   nixpkgs/trunk/pkgs/development/libraries/xapian/default.nix
Modified:
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Added: nixpkgs/trunk/pkgs/development/libraries/xapian/bindings/default.nix
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/development/libraries/xapian/bindings/default.nix        
Tue Apr 26 20:57:16 2011        (r26980)
@@ -0,0 +1,74 @@
+{ stdenv, composableDerivation, fetchurl, xapian, pkgconfig, zlib
+, python ? null, php ? null, ruby ? null }:
+
+let inherit (composableDerivation) wwf; in
+
+composableDerivation.composableDerivation {} rec {
+
+  name = "xapian-bindings-1.2.5";
+
+  src = fetchurl {
+    url = "http://oligarchy.co.uk/xapian/1.2.5/${name}.tar.gz";;
+    sha256 = 
"0d723af62b8d633cd49fdf92058a4985061659454b390c0c08db05fa4f7fb09c";
+  };
+
+  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
+              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 = "GPL";
+    maintainers = [ stdenv.lib.maintainers.chaoflow ];
+  };
+}

Added: nixpkgs/trunk/pkgs/development/libraries/xapian/default.nix
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/development/libraries/xapian/default.nix Tue Apr 26 
20:57:16 2011        (r26980)
@@ -0,0 +1,19 @@
+{ stdenv, fetchurl, libuuid, zlib }:
+
+stdenv.mkDerivation {
+  name = "xapian-1.2.5";
+
+  src = fetchurl {
+    url = http://oligarchy.co.uk/xapian/1.2.5/xapian-core-1.2.5.tar.gz;
+    sha256 = 
"392ccfccb4372725be24509e5ee95a7422f07c3d47d0cbdbb8545e789cc936f7";
+  };
+
+  buildInputs = [ libuuid zlib ];
+
+  meta = { 
+    description = "Xapian Probabilistic Information Retrieval library";
+    homepage = "http://xapian.org";;
+    license = "GPL";
+    maintainers = [ stdenv.lib.maintainers.chaoflow ];
+  };
+}

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Tue Apr 26 20:57:11 
2011        (r26979)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Tue Apr 26 20:57:16 
2011        (r26980)
@@ -4316,6 +4316,11 @@
 
   x264 = callPackage ../development/libraries/x264 { };
 
+  xapian = callPackage ../development/libraries/xapian { };
+
+  xapianBindings = callPackage ../development/libraries/xapian/bindings {  # 
TODO perl php Java, tcl, C#, python
+  };
+
   xapian10 = callPackage ../development/libraries/xapian/1.0.x.nix { };
 
   xapianBindings10 = callPackage 
../development/libraries/xapian/bindings/1.0.x.nix {  # TODO perl php Java, 
tcl, C#, python
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to