c-blosc: add snappySupport option

Opt-in (default off) external Snappy codec. Upstream deactivates it by
default and ships no bundled copy; the flag is only added when enabled,
so existing consumers are unaffected.

Assisted-by: claude-code with claude-opus-4-8[1m]-high
This commit is contained in:
Aliaksandr
2026-06-08 00:44:02 +03:00
parent ae4a59c452
commit 0ae9bb3a85
+6 -2
View File
@@ -7,8 +7,10 @@
testers,
static ? stdenv.hostPlatform.isStatic,
snappySupport ? false,
lz4,
snappy,
zlib,
zstd,
}:
@@ -51,7 +53,8 @@ stdenv.mkDerivation (finalAttrs: {
lz4
zlib
zstd
];
]
++ lib.optional snappySupport snappy;
cmakeFlags = [
"-DBUILD_STATIC=${if static then "ON" else "OFF"}"
@@ -64,7 +67,8 @@ stdenv.mkDerivation (finalAttrs: {
"-DBUILD_EXAMPLES=OFF"
"-DBUILD_BENCHMARKS=OFF"
"-DBUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
];
]
++ lib.optional snappySupport "-DDEACTIVATE_SNAPPY=OFF";
doCheck = !static;