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,