From febcb6679f00854d8cf052a2767d9113715fc23b Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Wed, 20 Dec 2017 03:28:14 +0000 Subject: [PATCH] snappy: build shared library See https://github.com/NixOS/nixpkgs/commit/f689a6d1c6796c4a4f116ffec6c4624379e04bc9 Closes #32880 --- pkgs/development/libraries/snappy/default.nix | 13 ++++++------- .../libraries/snappy/disable-benchmark.patch | 5 +++++ 2 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 pkgs/development/libraries/snappy/disable-benchmark.patch diff --git a/pkgs/development/libraries/snappy/default.nix b/pkgs/development/libraries/snappy/default.nix index 5ce636e6f0ca..8f37302cec50 100644 --- a/pkgs/development/libraries/snappy/default.nix +++ b/pkgs/development/libraries/snappy/default.nix @@ -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/; diff --git a/pkgs/development/libraries/snappy/disable-benchmark.patch b/pkgs/development/libraries/snappy/disable-benchmark.patch new file mode 100644 index 000000000000..c891c13fe74c --- /dev/null +++ b/pkgs/development/libraries/snappy/disable-benchmark.patch @@ -0,0 +1,5 @@ +--- a/snappy-test.cc ++++ b/snappy-test.cc +@@ -46 +46 @@ +-DEFINE_bool(run_microbenchmarks, true, ++DEFINE_bool(run_microbenchmarks, false,