diff --git a/pkgs/development/libraries/thrift/default.nix b/pkgs/development/libraries/thrift/default.nix index 53c3ddc3539..a09a8a530a5 100644 --- a/pkgs/development/libraries/thrift/default.nix +++ b/pkgs/development/libraries/thrift/default.nix @@ -1,35 +1,32 @@ -{ stdenv, fetchgit, boost, zlib, libevent, openssl, python, automake, autoconf -, libtool, pkgconfig, bison, flex +{ stdenv, fetchurl, boost, zlib, libevent, openssl, python, pkgconfig, bison +, flex }: -stdenv.mkDerivation { - name = "thrift-0.9.1"; +stdenv.mkDerivation rec { + name = "thrift-${version}"; + version = "0.9.2"; - # I take git, because the tarball is broken. - # http://stackoverflow.com/questions/18643642/libtool-error-building-thrift-0-9-1-on-ubuntu-13-04 - src = fetchgit { - url = "https://git-wip-us.apache.org/repos/asf/thrift.git"; - rev = "ff980c1432936c6bc897c60469ab05b5e0c6cb5e"; - md5 = "466aca9e43e43df868f4385af50e32f6"; + src = fetchurl { + url = "http://archive.apache.org/dist/thrift/${version}/${name}.tar.gz"; + sha256 = "0w4m6hjmgr1wqac9p5zyfxx2wwqay730qi14fzxba7f46hwhvxff"; }; #enableParallelBuilding = true; problems on hydra - # Fixes build error: /lib/libfl.so: undefined reference to `yylex'. - # Patch exists in upstream git repo, so it can be removed on the next version - # bump. - patches = [ ./yylex.patch ]; - # Workaround to make the python wrapper not drop this package: # pythonFull.buildEnv.override { extraLibs = [ thrift ]; } pythonPath = []; buildInputs = [ - boost zlib libevent openssl python automake autoconf libtool pkgconfig - bison flex + boost zlib libevent openssl python pkgconfig bison flex ]; - preConfigure = "sh bootstrap.sh; export PY_PREFIX=$out"; + preConfigure = "export PY_PREFIX=$out"; + + # TODO: package boost-test, so we can run the test suite. (Currently it fails + # to find libboost_unit_test_framework.a.) + configureFlags = "--enable-tests=no"; + doCheck = false; meta = with stdenv.lib; { description = "Library for scalable cross-language services"; diff --git a/pkgs/development/libraries/thrift/yylex.patch b/pkgs/development/libraries/thrift/yylex.patch deleted file mode 100644 index 3700bc6a436..00000000000 --- a/pkgs/development/libraries/thrift/yylex.patch +++ /dev/null @@ -1,23 +0,0 @@ -Fixes build error: - - /lib/libfl.so: undefined reference to `yylex' - -The same patch exists in upstream thrift git repo, commit -ec8daae71004b3c2346bf12b2d74e52ed0815337 -"THRIFT-2386: Thrift refuses to link yylex". -diff --git a/compiler/cpp/src/main.h b/compiler/cpp/src/main.h -index 87af5f6..27285f5 100644 ---- a/compiler/cpp/src/main.h -+++ b/compiler/cpp/src/main.h -@@ -28,8 +28,9 @@ - /** - * Defined in the flex library - */ -- --int yylex(void); -+extern "C" { -+ int yylex(void); -+} - - int yyparse(void); -