From ededca048a93974703a77b4bae84e4fc9f509580 Mon Sep 17 00:00:00 2001 From: Artturin Date: Wed, 27 Oct 2021 01:41:17 +0300 Subject: [PATCH] snappy: 1.1.8 -> 1.1.9 + add pkgconfig file --- pkgs/development/libraries/snappy/default.nix | 22 ++++++++++++++----- .../libraries/snappy/disable-benchmark.patch | 5 ----- 2 files changed, 16 insertions(+), 11 deletions(-) delete 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 ece425e85c41..f2b83136cb23 100644 --- a/pkgs/development/libraries/snappy/default.nix +++ b/pkgs/development/libraries/snappy/default.nix @@ -4,17 +4,15 @@ stdenv.mkDerivation rec { pname = "snappy"; - version = "1.1.8"; + version = "1.1.9"; src = fetchFromGitHub { owner = "google"; repo = "snappy"; rev = version; - sha256 = "1j0kslq2dvxgkcxl1gakhvsa731yrcvcaipcp5k8k7ayicvkv9jv"; + sha256 = "sha256-JXWl63KVP+CDNWIXYtz+EKqWLJbPKl3ifhr8dKAp/w8="; }; - patches = [ ./disable-benchmark.patch ]; - outputs = [ "out" "dev" ]; nativeBuildInputs = [ cmake ]; @@ -22,16 +20,28 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" "-DCMAKE_SKIP_BUILD_RPATH=OFF" + "-DSNAPPY_BUILD_TESTS=OFF" + "-DSNAPPY_BUILD_BENCHMARKS=OFF" ]; postInstall = '' substituteInPlace "$out"/lib/cmake/Snappy/SnappyTargets.cmake \ --replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES "'$dev'"' + + mkdir -p $dev/lib/pkgconfig + cat < $dev/lib/pkgconfig/snappy.pc + Name: snappy + Description: Fast compressor/decompressor library. + Version: ${version} + Libs: -L$out/lib -lsnappy + Cflags: -I$dev/include + EOF ''; - checkTarget = "test"; + #checkTarget = "test"; - doCheck = true; + # requires gbenchmark and gtest but it also installs them out $dev + doCheck = false; meta = with 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 deleted file mode 100644 index c891c13fe74c..000000000000 --- a/pkgs/development/libraries/snappy/disable-benchmark.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- a/snappy-test.cc -+++ b/snappy-test.cc -@@ -46 +46 @@ --DEFINE_bool(run_microbenchmarks, true, -+DEFINE_bool(run_microbenchmarks, false,