1 { lib, stdenv, fetchFromGitHub, cmake
2 , static ? stdenv.hostPlatform.isStatic
5 stdenv.mkDerivation rec {
9 src = fetchFromGitHub {
13 sha256 = "1j0kslq2dvxgkcxl1gakhvsa731yrcvcaipcp5k8k7ayicvkv9jv";
16 patches = [ ./disable-benchmark.patch ];
18 outputs = [ "out" "dev" ];
20 nativeBuildInputs = [ cmake ];
23 "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
24 "-DCMAKE_SKIP_BUILD_RPATH=OFF"
28 substituteInPlace "$out"/lib/cmake/Snappy/SnappyTargets.cmake \
29 --replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES "'$dev'"'
37 homepage = "https://google.github.io/snappy/";
38 license = licenses.bsd3;
39 description = "Compression/decompression library for very high speeds";
40 platforms = platforms.all;