Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #143058 from Artturin/snapppypkgconfig

authored by

Artturi and committed by
GitHub
c28d0cee ab7c6b8b

+16 -11
+16 -6
pkgs/development/libraries/snappy/default.nix
··· 4 4 5 5 stdenv.mkDerivation rec { 6 6 pname = "snappy"; 7 - version = "1.1.8"; 7 + version = "1.1.9"; 8 8 9 9 src = fetchFromGitHub { 10 10 owner = "google"; 11 11 repo = "snappy"; 12 12 rev = version; 13 - sha256 = "1j0kslq2dvxgkcxl1gakhvsa731yrcvcaipcp5k8k7ayicvkv9jv"; 13 + sha256 = "sha256-JXWl63KVP+CDNWIXYtz+EKqWLJbPKl3ifhr8dKAp/w8="; 14 14 }; 15 - 16 - patches = [ ./disable-benchmark.patch ]; 17 15 18 16 outputs = [ "out" "dev" ]; 19 17 ··· 22 20 cmakeFlags = [ 23 21 "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" 24 22 "-DCMAKE_SKIP_BUILD_RPATH=OFF" 23 + "-DSNAPPY_BUILD_TESTS=OFF" 24 + "-DSNAPPY_BUILD_BENCHMARKS=OFF" 25 25 ]; 26 26 27 27 postInstall = '' 28 28 substituteInPlace "$out"/lib/cmake/Snappy/SnappyTargets.cmake \ 29 29 --replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES "'$dev'"' 30 + 31 + mkdir -p $dev/lib/pkgconfig 32 + cat <<EOF > $dev/lib/pkgconfig/snappy.pc 33 + Name: snappy 34 + Description: Fast compressor/decompressor library. 35 + Version: ${version} 36 + Libs: -L$out/lib -lsnappy 37 + Cflags: -I$dev/include 38 + EOF 30 39 ''; 31 40 32 - checkTarget = "test"; 41 + #checkTarget = "test"; 33 42 34 - doCheck = true; 43 + # requires gbenchmark and gtest but it also installs them out $dev 44 + doCheck = false; 35 45 36 46 meta = with lib; { 37 47 homepage = "https://google.github.io/snappy/";
-5
pkgs/development/libraries/snappy/disable-benchmark.patch
··· 1 - --- a/snappy-test.cc 2 - +++ b/snappy-test.cc 3 - @@ -46 +46 @@ 4 - -DEFINE_bool(run_microbenchmarks, true, 5 - +DEFINE_bool(run_microbenchmarks, false,