snappy: build shared library

See f689a6d1c6

Closes #32880
This commit is contained in:
Orivej Desh 2017-12-20 03:28:14 +00:00
parent 3445138387
commit febcb6679f
2 changed files with 11 additions and 7 deletions

View File

@ -11,18 +11,17 @@ stdenv.mkDerivation rec {
sha256 = "1x7r8sjmdqlqjz0xfiwdyrqpgaj5yrvrgb28ivgpvnxgar5qv6m2";
};
patches = [ ./disable-benchmark.patch ];
outputs = [ "out" "dev" ];
nativeBuildInputs = [ cmake ];
# -DNDEBUG for speed
configureFlags = [ "CXXFLAGS=-DNDEBUG" ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_SKIP_BUILD_RPATH=OFF" ];
# SIGILL on darwin
doCheck = !stdenv.isDarwin;
checkPhase = ''
(cd .. && ./build/snappy_unittest)
'';
checkTarget = "test";
doCheck = true;
meta = with stdenv.lib; {
homepage = https://google.github.io/snappy/;

View File

@ -0,0 +1,5 @@
--- a/snappy-test.cc
+++ b/snappy-test.cc
@@ -46 +46 @@
-DEFINE_bool(run_microbenchmarks, true,
+DEFINE_bool(run_microbenchmarks, false,