diff --git a/pkgs/development/libraries/xapian/default.nix b/pkgs/development/libraries/xapian/default.nix index 36b55c59c245..e461ce858cfd 100644 --- a/pkgs/development/libraries/xapian/default.nix +++ b/pkgs/development/libraries/xapian/default.nix @@ -1,23 +1,28 @@ { stdenv, fetchurl, libuuid, zlib }: -stdenv.mkDerivation rec { - name = "xapian-${version}"; - version = "1.4.0"; +let + generic = version: sha256: stdenv.mkDerivation rec { + name = "xapian-${version}"; - src = fetchurl { - url = "http://oligarchy.co.uk/xapian/${version}/xapian-core-${version}.tar.xz"; - sha256 = "0xv4da5rmqqzkkkzx2v3jwh5hz5zxhd2b7m8x30fk99a25blyn0h"; - }; - - outputs = [ "out" "doc" ]; - - buildInputs = [ libuuid zlib ]; - - meta = { - description = "Search engine library"; - homepage = http://xapian.org/; - license = stdenv.lib.licenses.gpl2Plus; - maintainers = [ stdenv.lib.maintainers.chaoflow ]; - platforms = stdenv.lib.platforms.unix; + src = fetchurl { + url = "http://oligarchy.co.uk/xapian/${version}/xapian-core-${version}.tar.xz"; + inherit sha256; + }; + + outputs = [ "out" "doc" ]; + + buildInputs = [ libuuid zlib ]; + + meta = { + description = "Search engine library"; + homepage = http://xapian.org/; + license = stdenv.lib.licenses.gpl2Plus; + maintainers = [ stdenv.lib.maintainers.chaoflow ]; + platforms = stdenv.lib.platforms.unix; + }; }; +in { + # used by xapian-ruby + xapian_1_2_22 = generic "1.2.22" "0zsji22n0s7cdnbgj0kpil05a6bgm5cfv0mvx12d8ydg7z58g6r6"; + xapian_1_4_0 = generic "1.4.0" "0xv4da5rmqqzkkkzx2v3jwh5hz5zxhd2b7m8x30fk99a25blyn0h"; } diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 20dc23979f5a..02fe9f50558e 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -19,7 +19,7 @@ { lib, fetchurl, writeScript, ruby, kerberos, libxml2, libxslt, python, stdenv, which , libiconv, postgresql, v8_3_16_14, clang, sqlite, zlib, imagemagick -, pkgconfig , ncurses, xapian, gpgme, utillinux, fetchpatch, tzdata, icu, libffi +, pkgconfig , ncurses, xapian_1_2_22, gpgme, utillinux, fetchpatch, tzdata, icu, libffi , cmake, libssh2, openssl, mysql, darwin, git, perl, gecode_3, curl , libmsgpack, qt48, libsodium, snappy, libossp_uuid, lxc }@args: @@ -89,7 +89,7 @@ in msgpack = attrs: { buildInputs = [ libmsgpack ]; }; - + mysql = attrs: { buildInputs = [ mysql.lib zlib openssl ]; }; @@ -218,7 +218,7 @@ in --replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo" ''; }; - + uuid4r = attrs: { buildInputs = [ which libossp_uuid ]; }; @@ -226,12 +226,12 @@ in xapian-ruby = attrs: { # use the system xapian dontBuild = false; - buildInputs = [ xapian pkgconfig zlib ]; + buildInputs = [ xapian_1_2_22 pkgconfig zlib ]; postPatch = '' cp ${./xapian-Rakefile} Rakefile ''; preInstall = '' - export XAPIAN_CONFIG=${xapian}/bin/xapian-config + export XAPIAN_CONFIG=${xapian_1_2_22}/bin/xapian-config ''; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d1f7876c8dfa..ae4e43b93506 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10044,7 +10044,9 @@ with pkgs; x265 = callPackage ../development/libraries/x265 { }; - xapian = callPackage ../development/libraries/xapian { }; + inherit (callPackage ../development/libraries/xapian { }) + xapian_1_2_22 xapian_1_4_0; + xapian = xapian_1_4_0; xapian-omega = callPackage ../development/libraries/xapian/tools/omega { libmagic = file;