From ae4a59c4528501d86ac4b4ddaf2e63f91f08c8c3 Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Sun, 31 May 2026 15:42:55 +0300 Subject: [PATCH 1/8] bzip2_1_1: remove Unmaintained 2020 git snapshot with no remaining in-tree users now that hdf5plugin builds against the standard bzip2. Assisted-by: claude-code with claude-opus-4-8[1m]-high --- pkgs/tools/compression/bzip2/1_1.nix | 55 ---------------------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 - 3 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 pkgs/tools/compression/bzip2/1_1.nix diff --git a/pkgs/tools/compression/bzip2/1_1.nix b/pkgs/tools/compression/bzip2/1_1.nix deleted file mode 100644 index d6ff290fd1a4..000000000000 --- a/pkgs/tools/compression/bzip2/1_1.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitLab, - meson, - python3, - ninja, - testers, -}: - -stdenv.mkDerivation (finalAttrs: { - pname = "bzip2-unstable"; - version = "2020-08-11"; - - src = fetchFromGitLab { - owner = "federicomenaquintero"; - repo = "bzip2"; - rev = "15255b553e7c095fb7a26d4dc5819a11352ebba1"; - hash = "sha256-BAyz35D62LWi47B/gNcCSKpdaECHBGSpt21vtnk3fKs="; - }; - - postPatch = '' - patchShebangs install_links.py - ''; - - nativeBuildInputs = [ - meson - python3 - ninja - ]; - - outputs = [ - "bin" - "dev" - "out" - "man" - ]; - - mesonFlags = [ - "-Ddocs=disabled" - ]; - - strictDeps = true; - - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - - meta = { - description = "High-quality data compression program"; - homepage = "https://gitlab.com/federicomenaquintero/bzip2"; - license = lib.licenses.bzip2; - pkgConfigModules = [ "bz2" ]; - platforms = lib.platforms.all; - maintainers = [ ]; - }; -}) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index e048b8ad382d..8f75eab27ff7 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -423,6 +423,7 @@ mapAliases { buildXenPackage = throw "'buildXenPackage' has been removed as a custom Xen build can now be achieved by simply overriding 'xen'."; # Added 2025-05-12 bullet-roboschool = throw "'bullet-roboschool' has been removed as its build was broken and it was deprecated with its last update in 2019."; # Added 2025-11-15 bwidget = throw "'bwidget' has been renamed to/replaced by 'tclPackages.bwidget'"; # Converted to throw 2025-10-27 + bzip2_1_1 = throw "'bzip2_1_1' has been removed as it was an unmaintained 2020 snapshot with no remaining users; use 'bzip2' instead"; # Added 2026-05-31 bzrtp = throw "'bzrtp' has been moved to 'linphonePackages.bzrtp'"; # Added 2025-09-20 c0 = throw "'c0' has been removed due to being broken for more than a year; see RFC 180"; # Added 2026-02-05 caido = warnAlias "'caido' has been split into 'caido-cli' and 'caido-desktop'." caido-desktop; # Added 2026-03-03 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 26a6d6d1badb..7e560d2af5f1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1888,8 +1888,6 @@ with pkgs; bzip2 = callPackage ../tools/compression/bzip2 { }; - bzip2_1_1 = callPackage ../tools/compression/bzip2/1_1.nix { }; - davix-copy = davix.override { enableThirdPartyCopy = true; }; libceph = ceph.lib; From 0ae9bb3a85fb6014222608c4cdeac65f4a1a4fe0 Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Sun, 31 May 2026 16:42:20 +0300 Subject: [PATCH 2/8] 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 --- pkgs/by-name/c-/c-blosc/package.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/c-/c-blosc/package.nix b/pkgs/by-name/c-/c-blosc/package.nix index a84969e2a80b..1daa4d57f425 100644 --- a/pkgs/by-name/c-/c-blosc/package.nix +++ b/pkgs/by-name/c-/c-blosc/package.nix @@ -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; From fbd89fd74eb6491a5580cc5f221f8c58b6b0d404 Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Sun, 31 May 2026 17:31:46 +0300 Subject: [PATCH 3/8] zfp: add bitStreamWordSize option Opt-in (default 64) bitstream word size. Only injects the cmake flag when non-default, so existing consumers are unaffected; the uint64-only regression test is excluded for smaller word sizes. Assisted-by: claude-code with claude-opus-4-8[1m]-high --- pkgs/by-name/zf/zfp/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/zf/zfp/package.nix b/pkgs/by-name/zf/zfp/package.nix index 12a0ce57d6b9..2a25bb109ffa 100644 --- a/pkgs/by-name/zf/zfp/package.nix +++ b/pkgs/by-name/zf/zfp/package.nix @@ -10,6 +10,7 @@ stdenv, config, testers, + bitStreamWordSize ? 64, enableCfp ? true, enableCuda ? config.cudaSupport, enableFortran ? builtins.elem stdenv.hostPlatform.system gfortran.meta.platforms, @@ -70,6 +71,7 @@ effectiveStdenv.mkDerivation (finalAttrs: { cmakeFlags = [ ] + ++ lib.optional (bitStreamWordSize != 64) "-DZFP_BIT_STREAM_WORD_SIZE=${toString bitStreamWordSize}" ++ lib.optional enableCfp "-DBUILD_CFP=ON" ++ lib.optional enableCuda "-DZFP_WITH_CUDA=ON" ++ lib.optional enableFortran "-DBUILD_ZFORP=ON" @@ -79,6 +81,11 @@ effectiveStdenv.mkDerivation (finalAttrs: { doCheck = true; + # the testzfp regression test only supports the default 64-bit bitstream word + preCheck = lib.optionalString (bitStreamWordSize != 64) '' + checkFlagsArray+=(ARGS="--exclude-regex testzfp") + ''; + passthru.tests = { cmake-config = testers.hasCmakeConfigModules { moduleNames = [ "zfp" ]; From 41377010927d112469b3741b24a021bb90fe5d88 Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Sun, 31 May 2026 15:41:53 +0300 Subject: [PATCH 4/8] python3Packages.hdf5plugin: use finalAttrs Assisted-by: claude-code with claude-opus-4-8[1m]-high --- pkgs/development/python-modules/hdf5plugin/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/hdf5plugin/default.nix b/pkgs/development/python-modules/hdf5plugin/default.nix index ff3364379dfd..3a50bb57e6eb 100644 --- a/pkgs/development/python-modules/hdf5plugin/default.nix +++ b/pkgs/development/python-modules/hdf5plugin/default.nix @@ -18,7 +18,7 @@ avx512Support ? stdenv.hostPlatform.avx512Support, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "hdf5plugin"; version = "6.0.0"; pyproject = true; @@ -26,7 +26,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "silx-kit"; repo = "hdf5plugin"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-LW6rY+zLta4hENBbTll+1amf9TYJiuAumwzgpk1LZ3M="; }; @@ -94,4 +94,4 @@ buildPythonPackage rec { license = lib.licenses.mit; maintainers = with lib.maintainers; [ pbsds ]; }; -} +}) From 8cc3ca6340d47590b8097d0cf1f482fdae7881c2 Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Sun, 31 May 2026 16:42:03 +0300 Subject: [PATCH 5/8] python3Packages.hdf5plugin: enable BZip2 filter via system bzip2 The build probes pkg-config for module `bz2`/`libbz2`, but nixpkgs' bzip2 ships it as `bzip2.pc`. Alias it so the system lib is used instead of the unmaintained bzip2_1_1 snapshot. Assisted-by: claude-code with claude-opus-4-8[1m]-high --- pkgs/development/python-modules/hdf5plugin/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/hdf5plugin/default.nix b/pkgs/development/python-modules/hdf5plugin/default.nix index 3a50bb57e6eb..5a769d1cf607 100644 --- a/pkgs/development/python-modules/hdf5plugin/default.nix +++ b/pkgs/development/python-modules/hdf5plugin/default.nix @@ -7,6 +7,7 @@ h5py, pkgconfig, c-blosc2, + bzip2, charls, lz4, zlib, @@ -41,7 +42,7 @@ buildPythonPackage (finalAttrs: { buildInputs = [ #c-blosc c-blosc2 - # bzip2_1_1 + bzip2 charls lz4 # snappy @@ -54,7 +55,7 @@ buildPythonPackage (finalAttrs: { env.HDF5PLUGIN_SYSTEM_LIBRARIES = lib.concatStringsSep "," [ #"blosc" # AssertionError: 4000 not less than 4000 "blosc2" - # "bz2" # only works with bzip2_1_1 + "bz2" "charls" "lz4" # "snappy" # snappy tests fail @@ -82,6 +83,10 @@ buildPythonPackage (finalAttrs: { preBuild = '' mkdir src/hdf5plugin/plugins + + mkdir -p pkg-config-bz2 + ln -s ${lib.getDev bzip2}/lib/pkgconfig/bzip2.pc pkg-config-bz2/bz2.pc + export PKG_CONFIG_PATH="$PWD/pkg-config-bz2''${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" ''; meta = { From 4b93e567b6de0e09fc8090bb6af5fc2e3211293d Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Sun, 31 May 2026 16:42:20 +0300 Subject: [PATCH 6/8] python3Packages.hdf5plugin: build Blosc filter against system c-blosc Use the snappy-enabled c-blosc so the system library can replace the vendored copy; hdf5plugin's test suite exercises Blosc's snappy codec. Assisted-by: claude-code with claude-opus-4-8[1m]-high --- pkgs/development/python-modules/hdf5plugin/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/hdf5plugin/default.nix b/pkgs/development/python-modules/hdf5plugin/default.nix index 5a769d1cf607..cb9366c1089c 100644 --- a/pkgs/development/python-modules/hdf5plugin/default.nix +++ b/pkgs/development/python-modules/hdf5plugin/default.nix @@ -6,6 +6,7 @@ py-cpuinfo, h5py, pkgconfig, + c-blosc, c-blosc2, bzip2, charls, @@ -19,6 +20,9 @@ avx512Support ? stdenv.hostPlatform.avx512Support, }: +let + c-blosc' = c-blosc.override { snappySupport = true; }; +in buildPythonPackage (finalAttrs: { pname = "hdf5plugin"; version = "6.0.0"; @@ -40,7 +44,7 @@ buildPythonPackage (finalAttrs: { dependencies = [ h5py ]; buildInputs = [ - #c-blosc + c-blosc' c-blosc2 bzip2 charls @@ -53,12 +57,12 @@ buildPythonPackage (finalAttrs: { # opt-in to use use system libs instead env.HDF5PLUGIN_SYSTEM_LIBRARIES = lib.concatStringsSep "," [ - #"blosc" # AssertionError: 4000 not less than 4000 + "blosc" "blosc2" "bz2" "charls" "lz4" - # "snappy" # snappy tests fail + # "snappy" # not a standalone filter; provided via the snappy-enabled c-blosc above # "sperr" # not packaged? # "zfp" # pkgconfig: (lib)zfp not found "zlib" From 42629f094391778ad3cb135bbb6b6b32fa569e92 Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Sun, 31 May 2026 18:15:33 +0300 Subject: [PATCH 7/8] python3Packages.hdf5plugin: drop redundant snappy system-library entry snappy is not a standalone filter; the Blosc filter links the system c-blosc which already provides it. Enabling "snappy" produced byte-identical plugin binaries, so the entry was dead. Assisted-by: claude-code with claude-opus-4-8[1m]-high --- pkgs/development/python-modules/hdf5plugin/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/python-modules/hdf5plugin/default.nix b/pkgs/development/python-modules/hdf5plugin/default.nix index cb9366c1089c..60b14a8e4100 100644 --- a/pkgs/development/python-modules/hdf5plugin/default.nix +++ b/pkgs/development/python-modules/hdf5plugin/default.nix @@ -49,7 +49,6 @@ buildPythonPackage (finalAttrs: { bzip2 charls lz4 - # snappy # zfp zlib zstd @@ -62,7 +61,6 @@ buildPythonPackage (finalAttrs: { "bz2" "charls" "lz4" - # "snappy" # not a standalone filter; provided via the snappy-enabled c-blosc above # "sperr" # not packaged? # "zfp" # pkgconfig: (lib)zfp not found "zlib" From 65a8685443af217d206ed9afabbc6c46c22f73fc Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Sun, 31 May 2026 17:31:47 +0300 Subject: [PATCH 8/8] python3Packages.hdf5plugin: build ZFP filter against system zfp H5Z-ZFP needs an 8-bit bitstream word for byte-portable data, so use a zfp built with bitStreamWordSize=8. zfp ships only a CMake config, so synthesise the pkg-config module hdf5plugin probes for. Assisted-by: claude-code with claude-opus-4-8[1m]-high --- .../python-modules/hdf5plugin/default.nix | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/hdf5plugin/default.nix b/pkgs/development/python-modules/hdf5plugin/default.nix index 60b14a8e4100..a52e339e0630 100644 --- a/pkgs/development/python-modules/hdf5plugin/default.nix +++ b/pkgs/development/python-modules/hdf5plugin/default.nix @@ -11,6 +11,7 @@ bzip2, charls, lz4, + zfp, zlib, zstd, stdenv, @@ -22,6 +23,8 @@ let c-blosc' = c-blosc.override { snappySupport = true; }; + # H5Z-ZFP needs an 8-bit bitstream word so the compressed HDF5 data is byte-portable + zfp' = zfp.override { bitStreamWordSize = 8; }; in buildPythonPackage (finalAttrs: { pname = "hdf5plugin"; @@ -49,7 +52,7 @@ buildPythonPackage (finalAttrs: { bzip2 charls lz4 - # zfp + zfp' zlib zstd ]; @@ -62,7 +65,7 @@ buildPythonPackage (finalAttrs: { "charls" "lz4" # "sperr" # not packaged? - # "zfp" # pkgconfig: (lib)zfp not found + "zfp" "zlib" "zstd" ]; @@ -86,9 +89,18 @@ buildPythonPackage (finalAttrs: { preBuild = '' mkdir src/hdf5plugin/plugins - mkdir -p pkg-config-bz2 - ln -s ${lib.getDev bzip2}/lib/pkgconfig/bzip2.pc pkg-config-bz2/bz2.pc - export PKG_CONFIG_PATH="$PWD/pkg-config-bz2''${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" + mkdir -p pkg-config + ln -s ${lib.getDev bzip2}/lib/pkgconfig/bzip2.pc pkg-config/bz2.pc + # zfp ships only a CMake config; synthesise the pkg-config module hdf5plugin probes for + { + echo "includedir=${lib.getDev zfp'}/include" + echo "Name: zfp" + echo "Version: ${zfp'.version}" + echo "Description: zfp" + echo "Libs: -L${lib.getLib zfp'}/lib -lzfp" + echo "Cflags: -I${lib.getDev zfp'}/include" + } > pkg-config/zfp.pc + export PKG_CONFIG_PATH="$PWD/pkg-config''${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" ''; meta = {