1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 04:31:52 +00:00

thrift: update 0.9.1 -> 0.9.2

* Drop unneeded patch to fix build error; now included upstream
* Fetch tarball instead of using git
* Drop unneeded autotools deps since we're building from tarball

TODO: Package boost-test library, so that we can run the test suite.
This commit is contained in:
Bjørn Forsman 2014-12-03 08:04:42 +01:00
parent 388c3aa5ec
commit 3871539d3b
2 changed files with 15 additions and 41 deletions

View file

@ -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: <flex>/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";

View file

@ -1,23 +0,0 @@
Fixes build error:
<flex>/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);