@@ -1,26 +1,17 @@
1−{ lib, stdenv, fetchurl, fetchpatch, boost, zlib, libevent, openssl, python, cmake, pkg-config
1+{ lib, stdenv, fetchurl, boost, zlib, libevent, openssl, python, cmake, pkg-config
22, bison, flex, twisted
33, static ? stdenv.hostPlatform.isStatic
44}:
55
66stdenv.mkDerivation rec {
77 pname = "thrift";
8− version = "0.13.0";
8+ version = "0.14.1";
99
1010 src = fetchurl {
1111 url = "https://archive.apache.org/dist/thrift/${version}/${pname}-${version}.tar.gz";
12− sha256 = "0yai9c3bdsrkkjshgim7zk0i7malwfprg00l9774dbrkh2w4ilvs";
12+ sha256 = "198c855mjy5byqfb941hiyq2j37baz63f0wcfy4vp8y8v4f5xnhk";
1313 };
1414
15− patches = [
16− # Fix a failing test on darwin
17− # https://issues.apache.org/jira/browse/THRIFT-4976
18− (fetchpatch {
19− url = "https://github.com/apache/thrift/commit/6701dbb8e89f6550c7843e9b75b118998df471c3.diff";
20− sha256 = "14rqma2b2zv3zxkkl5iv9kvyp3zihvad6fdc2gcdqv37nqnswx9d";
21− })
22− ];
23−
2415 # Workaround to make the python wrapper not drop this package:
2516 # pythonFull.buildEnv.override { extraLibs = [ thrift ]; }
2617 pythonPath = [];
@@ -32,6 +23,9 @@ stdenv.mkDerivation rec {
3223 preConfigure = "export PY_PREFIX=$out";
3324
3425 cmakeFlags = [
26+ "-DBUILD_JAVASCRIPT:BOOL=OFF"
27+ "-DBUILD_NODEJS:BOOL=OFF"
28+
3529 # FIXME: Fails to link in static mode with undefined reference to
3630 # `boost::unit_test::unit_test_main(bool (*)(), int, char**)'
3731 "-DBUILD_TESTING:BOOL=${if static then "OFF" else "ON"}"
@@ -40,11 +34,32 @@ stdenv.mkDerivation rec {
4034 "-DOPENSSL_USE_STATIC_LIBS=ON"
4135 ];
4236
37+ disabledTests = [
38+ "PythonTestSSLSocket"
39+ ] ++ lib.optionals stdenv.isDarwin [
40+ # tests that hang up in the darwin sandbox
41+ "SecurityTest"
42+ "SecurityFromBufferTest"
43+ "python_test"
44+
45+ # tests that fail in the darwin sandbox when trying to use network
46+ "UnitTests"
47+ "TInterruptTest"
48+ "TServerIntegrationTest"
49+ "processor"
50+ "TNonblockingServerTest"
51+ "TNonblockingSSLServerTest"
52+ "StressTest"
53+ "StressTestConcurrent"
54+ "StressTestNonBlocking"
55+ "PythonThriftTNonblockingServer"
56+ ];
57+
4358 doCheck = !static;
4459 checkPhase = ''
4560 runHook preCheck
4661
47− ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/lib ctest -E PythonTestSSLSocket
62+ ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/lib ctest -E "($(echo "$disabledTests" | tr " " "|"))"
4863
4964 runHook postCheck
5065 '';
@@ -56,8 +71,5 @@ stdenv.mkDerivation rec {
5671 license = licenses.asl20;
5772 platforms = platforms.linux ++ platforms.darwin;
5873 maintainers = [ maintainers.bjornfor ];
59− knownVulnerabilities = [
60− "CVE-2020-13949"
61− ];
6274 };
6375}