2017-11-24 13:20:52 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake }:
|
2013-02-18 21:12:11 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-09-18 02:28:53 +01:00
|
|
|
name = "snappy-${version}";
|
2017-11-24 13:20:52 +00:00
|
|
|
version = "1.1.7";
|
2017-10-27 00:44:19 +01:00
|
|
|
|
2017-11-24 13:20:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "snappy";
|
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "1x7r8sjmdqlqjz0xfiwdyrqpgaj5yrvrgb28ivgpvnxgar5qv6m2";
|
2013-02-18 21:12:11 +00:00
|
|
|
};
|
|
|
|
|
2017-12-20 03:28:14 +00:00
|
|
|
patches = [ ./disable-benchmark.patch ];
|
|
|
|
|
2017-11-24 13:20:52 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
2017-03-03 13:29:39 +00:00
|
|
|
|
2017-11-24 13:20:52 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2013-02-18 21:12:11 +00:00
|
|
|
|
2017-12-20 03:28:14 +00:00
|
|
|
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_SKIP_BUILD_RPATH=OFF" ];
|
|
|
|
|
2019-04-06 00:07:15 +01:00
|
|
|
postInstall = ''
|
|
|
|
substituteInPlace "$out"/lib/cmake/Snappy/SnappyTargets.cmake \
|
|
|
|
--replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES "'$dev'"'
|
|
|
|
'';
|
|
|
|
|
2017-12-20 03:28:14 +00:00
|
|
|
checkTarget = "test";
|
2014-09-14 03:13:43 +01:00
|
|
|
|
2017-12-20 03:28:14 +00:00
|
|
|
doCheck = true;
|
2013-02-18 21:12:11 +00:00
|
|
|
|
2014-09-14 03:13:43 +01:00
|
|
|
meta = with stdenv.lib; {
|
2017-10-27 00:44:19 +01:00
|
|
|
homepage = https://google.github.io/snappy/;
|
2014-09-14 03:13:43 +01:00
|
|
|
license = licenses.bsd3;
|
2013-02-18 21:12:11 +00:00
|
|
|
description = "Compression/decompression library for very high speeds";
|
2014-09-14 03:13:43 +01:00
|
|
|
platforms = platforms.unix;
|
2013-02-18 21:12:11 +00:00
|
|
|
};
|
|
|
|
}
|