about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/thrift
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-01-11 23:37:02 +0000
committerAlyssa Ross <hi@alyssa.is>2020-01-11 23:41:30 +0000
commit6c557e3f1c28cf87e9fba232811d6875dd1399c1 (patch)
tree035a071d5d8980df6de0fa42e2ef8fc0cce7055e /nixpkgs/pkgs/development/libraries/thrift
parentda7500bc026e937ac7fce7b50f67a0e1765737a7 (diff)
parente4134747f5666bcab8680aff67fa3b63384f9a0f (diff)
downloadnixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.gz
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.bz2
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.lz
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.xz
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.zst
nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.zip
Merge commit 'e4134747f5666bcab8680aff67fa3b63384f9a0f'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/thrift')
-rw-r--r--nixpkgs/pkgs/development/libraries/thrift/default.nix40
1 files changed, 24 insertions, 16 deletions
diff --git a/nixpkgs/pkgs/development/libraries/thrift/default.nix b/nixpkgs/pkgs/development/libraries/thrift/default.nix
index 0fce957df229..b1b66ed052fb 100644
--- a/nixpkgs/pkgs/development/libraries/thrift/default.nix
+++ b/nixpkgs/pkgs/development/libraries/thrift/default.nix
@@ -1,37 +1,45 @@
-{ stdenv, fetchurl, boost, zlib, libevent, openssl, python, pkgconfig, bison
-, flex, twisted
-}:
+{ stdenv, fetchurl, boost, zlib, libevent, openssl, python, cmake, pkgconfig
+, bison, flex, twisted, static ? false }:
 
 stdenv.mkDerivation rec {
   pname = "thrift";
-  version = "0.12.0";
+  version = "0.13.0";
 
   src = fetchurl {
     url = "https://archive.apache.org/dist/thrift/${version}/${pname}-${version}.tar.gz";
-    sha256 = "0a04v7dgm1qzgii7v0sisnljhxc9xpq2vxkka60scrdp6aahjdn3";
+    sha256 = "0yai9c3bdsrkkjshgim7zk0i7malwfprg00l9774dbrkh2w4ilvs";
   };
 
-  #enableParallelBuilding = true; problems on hydra
-
   # Workaround to make the python wrapper not drop this package:
   # pythonFull.buildEnv.override { extraLibs = [ thrift ]; }
   pythonPath = [];
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [
-    boost zlib libevent openssl python bison flex twisted
-  ];
+  nativeBuildInputs = [ cmake pkgconfig ];
+  buildInputs = [ boost zlib libevent openssl python bison flex ]
+    ++ stdenv.lib.optional (!static) twisted;
 
   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;
+  cmakeFlags = [
+    # FIXME: Fails to link in static mode with undefined reference to
+    # `boost::unit_test::unit_test_main(bool (*)(), int, char**)'
+    "-DBUILD_TESTING:BOOL=${if static then "OFF" else "ON"}"
+  ] ++ stdenv.lib.optionals static [
+    "-DWITH_STATIC_LIB:BOOL=ON"
+    "-DOPENSSL_USE_STATIC_LIBS=ON"
+  ];
+
+  doCheck = !static;
+  checkPhase = ''
+    runHook preCheck
+    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib ctest -E PythonTestSSLSocket
+    runHook postCheck
+  '';
+  enableParallelChecking = false;
 
   meta = with stdenv.lib; {
     description = "Library for scalable cross-language services";
-    homepage = http://thrift.apache.org/;
+    homepage = "http://thrift.apache.org/";
     license = licenses.asl20;
     platforms = platforms.linux ++ platforms.darwin;
     maintainers = [ maintainers.bjornfor ];