c-blosc2: 2.22.0 -> 2.23.1 (#485138)

This commit is contained in:
Robert Scott
2026-04-11 19:17:46 +00:00
committed by GitHub
2 changed files with 73 additions and 11 deletions
+2 -2
View File
@@ -14,13 +14,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "c-blosc2";
version = "2.22.0";
version = "2.23.1";
src = fetchFromGitHub {
owner = "Blosc";
repo = "c-blosc2";
rev = "v${finalAttrs.version}";
sha256 = "sha256-0eB+8zSlKCuHK1J2HlBUmWEJumAXSV2xnYMvnFud75A=";
sha256 = "sha256-iyEB1Hnvo42tMHyB4pDfXru5doFwNiFuxq21Tr3zLIg=";
};
# https://github.com/NixOS/nixpkgs/issues/144170
@@ -31,17 +31,46 @@
runTorchTests ? lib.meta.availableOn stdenv.hostPlatform torch,
}:
let
sleefRev = "7623d6cfa2712462880fa63a4d0f0b5f775d1a83";
miniexprRev = "37bf6982bf9619036b47f095b7005bc3c87a7447";
tinyccRev = "41208bdc85612042f363f425cda4601b3ed90d64";
in
buildPythonPackage rec {
pname = "blosc2";
version = "3.12.2";
version = "4.1.2";
pyproject = true;
src = fetchFromGitHub {
owner = "Blosc";
repo = "python-blosc2";
tag = "v${version}";
hash = "sha256-t2tf8s2WwG4vEQbh8HACMtUjVrwmGby1yKd+IlL39PY=";
};
srcs = [
(fetchFromGitHub {
owner = "Blosc";
repo = "python-blosc2";
tag = "v${version}";
hash = "sha256-z5g3OXSKKR/2yQ5n1hb+br009xaX8C7HxbDDLVfSYNw=";
})
(fetchFromGitHub {
name = "miniexpr";
owner = "Blosc";
repo = "miniexpr";
rev = miniexprRev;
hash = "sha256-3YLdAZFYEtmENuQgDiitU3kw8JmW+V03zFSGXV3FwqE=";
})
(fetchFromGitHub {
name = "sleef";
owner = "shibatch";
repo = "sleef";
rev = sleefRev;
hash = "sha256-a0OB2gQI8RlR7liXdlOZo4xDl3f2p9thrCm8CwD2jRM=";
})
(fetchFromGitHub {
name = "tinycc";
owner = "Blosc";
repo = "minicc";
rev = tinyccRev;
hash = "sha256-lj0BC/A+Kv/VloLhFe3hmrdZ6QWv6mSrMn8HdHS9PfI=";
})
];
sourceRoot = "source";
nativeBuildInputs = [
cmake
@@ -49,8 +78,39 @@ buildPythonPackage rec {
pkg-config
];
# perform parameter expansion for CMAKE_ARGS
preUnpack =
let
cmakeArgs = toString [
(lib.cmakeBool "USE_SYSTEM_BLOSC2" true)
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_MINIEXPR" "$PWD/miniexpr")
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_SLEEF" "$PWD/sleef")
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_TINYCC" "$PWD/tinycc")
];
in
''
export CMAKE_ARGS="${cmakeArgs}"
'';
postUnpack = ''
# ensure our separately pinned versions correspond to those in source
if ! grep -F '${miniexprRev}' source/CMakeLists.txt ; then
echo 'Expected to find ${miniexprRev} in source/CMakeLists.txt:' \
'has miniexpr source been updated to match pinned version?'
exit 1
fi
if ! grep -F '${sleefRev}' miniexpr/CMakeLists.txt ; then
echo 'Expected to find ${sleefRev} in miniexpr/CMakeLists.txt:' \
'has sleef source been updated to match pinned version?'
exit 1
fi
if ! grep -F '${tinyccRev}' miniexpr/CMakeLists.txt ; then
echo 'Expected to find ${tinyccRev} in miniexpr/CMakeLists.txt:' \
'has tinycc source been updated to match pinned version?'
exit 1
fi
'';
dontUseCmakeConfigure = true;
env.CMAKE_ARGS = lib.cmakeBool "USE_SYSTEM_BLOSC2" true;
build-system = [
cython
@@ -83,6 +143,8 @@ buildPythonPackage rec {
disabledTests = [
# attempts external network requests
"test_with_remote"
# segfaults, but only under nix sandbox
"test_dsl_save_clamp"
]
++ lib.optionals (pythonAtLeast "3.14") [
# https://github.com/Blosc/python-blosc2/issues/551
@@ -102,7 +164,7 @@ buildPythonPackage rec {
meta = {
description = "Python wrapper for the extremely fast Blosc2 compression library";
homepage = "https://github.com/Blosc/python-blosc2";
changelog = "https://github.com/Blosc/python-blosc2/releases/tag/${src.tag}";
changelog = "https://github.com/Blosc/python-blosc2/releases/tag/${(builtins.head srcs).name}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ ris ];
};