summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorFlorian Friesdorf <flo@chaoflow.net>2011-04-26 20:57:16 +0000
committerFlorian Friesdorf <flo@chaoflow.net>2011-04-26 20:57:16 +0000
commit3fb9e4da7423dfdcb1a0f481311fa77f0ded9b8f (patch)
tree6c4e001a60ae3103c92bd13f0f520454ad697f2c /pkgs/development/libraries
parent1e3d07eeea1ecd5c74fb6ba122f5135015cf4e03 (diff)
downloadnixpkgs-3fb9e4da7423dfdcb1a0f481311fa77f0ded9b8f.tar
nixpkgs-3fb9e4da7423dfdcb1a0f481311fa77f0ded9b8f.tar.gz
nixpkgs-3fb9e4da7423dfdcb1a0f481311fa77f0ded9b8f.tar.bz2
nixpkgs-3fb9e4da7423dfdcb1a0f481311fa77f0ded9b8f.tar.lz
nixpkgs-3fb9e4da7423dfdcb1a0f481311fa77f0ded9b8f.tar.xz
nixpkgs-3fb9e4da7423dfdcb1a0f481311fa77f0ded9b8f.tar.zst
nixpkgs-3fb9e4da7423dfdcb1a0f481311fa77f0ded9b8f.zip
xapian and xapianBindings 1.2.5
svn path=/nixpkgs/trunk/; revision=26980
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/xapian/bindings/default.nix74
-rw-r--r--pkgs/development/libraries/xapian/default.nix19
2 files changed, 93 insertions, 0 deletions
diff --git a/pkgs/development/libraries/xapian/bindings/default.nix b/pkgs/development/libraries/xapian/bindings/default.nix
new file mode 100644
index 00000000000..973f8dd3143
--- /dev/null
+++ b/pkgs/development/libraries/xapian/bindings/default.nix
@@ -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 ];
+  };
+}
diff --git a/pkgs/development/libraries/xapian/default.nix b/pkgs/development/libraries/xapian/default.nix
new file mode 100644
index 00000000000..86daacb5d75
--- /dev/null
+++ b/pkgs/development/libraries/xapian/default.nix
@@ -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 ];
+  };
+}