7 , static ? stdenv.hostPlatform.isStatic
14 stdenv.mkDerivation (finalAttrs: {
18 src = fetchFromGitHub {
21 rev = "v${finalAttrs.version}";
22 sha256 = "sha256-g/MUgVWeVVREiHX59XYbhXjtigJesyooxjnEdKA844M=";
25 # https://github.com/NixOS/nixpkgs/issues/144170
28 -e '/^libdir[=]/clibdir=@CMAKE_INSTALL_FULL_LIBDIR@' \
29 -e '/^includedir[=]/cincludedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@' \
33 nativeBuildInputs = [ cmake ];
42 "-DBUILD_STATIC=${if static then "ON" else "OFF"}"
43 "-DBUILD_SHARED=${if static then "OFF" else "ON"}"
45 "-DPREFER_EXTERNAL_LZ4=ON"
46 "-DPREFER_EXTERNAL_ZLIB=ON"
47 "-DPREFER_EXTERNAL_ZSTD=ON"
49 "-DBUILD_EXAMPLES=OFF"
50 "-DBUILD_BENCHMARKS=OFF"
51 "-DBUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
55 # possibly https://github.com/Blosc/c-blosc2/issues/432
56 enableParallelChecking = false;
58 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
61 description = "Fast, compressed, persistent binary data store library for C";
62 homepage = "https://www.blosc.org";
63 changelog = "https://github.com/Blosc/c-blosc2/releases/tag/v${finalAttrs.version}";
67 license = licenses.bsd3;
68 platforms = platforms.all;
69 maintainers = with maintainers; [ ris ];