snappy: 1.1.8 -> 1.1.9 + add pkgconfig file
This commit is contained in:
parent
23f71e9427
commit
ededca048a
2 changed files with 16 additions and 11 deletions
|
@ -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 <<EOF > $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/";
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
--- a/snappy-test.cc
|
||||
+++ b/snappy-test.cc
|
||||
@@ -46 +46 @@
|
||||
-DEFINE_bool(run_microbenchmarks, true,
|
||||
+DEFINE_bool(run_microbenchmarks, false,
|
Loading…
Reference in a new issue