python3Packages.hdf5plugin: build using system libraries; bzip2_1_1: drop (#526391)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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" ];
|
||||
|
||||
@@ -6,9 +6,12 @@
|
||||
py-cpuinfo,
|
||||
h5py,
|
||||
pkgconfig,
|
||||
c-blosc,
|
||||
c-blosc2,
|
||||
bzip2,
|
||||
charls,
|
||||
lz4,
|
||||
zfp,
|
||||
zlib,
|
||||
zstd,
|
||||
stdenv,
|
||||
@@ -18,7 +21,12 @@
|
||||
avx512Support ? stdenv.hostPlatform.avx512Support,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
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";
|
||||
version = "6.0.0";
|
||||
pyproject = true;
|
||||
@@ -26,7 +34,7 @@ buildPythonPackage rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "silx-kit";
|
||||
repo = "hdf5plugin";
|
||||
tag = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-LW6rY+zLta4hENBbTll+1amf9TYJiuAumwzgpk1LZ3M=";
|
||||
};
|
||||
|
||||
@@ -39,27 +47,25 @@ buildPythonPackage rec {
|
||||
dependencies = [ h5py ];
|
||||
|
||||
buildInputs = [
|
||||
#c-blosc
|
||||
c-blosc'
|
||||
c-blosc2
|
||||
# bzip2_1_1
|
||||
bzip2
|
||||
charls
|
||||
lz4
|
||||
# snappy
|
||||
# zfp
|
||||
zfp'
|
||||
zlib
|
||||
zstd
|
||||
];
|
||||
|
||||
# opt-in to use use system libs instead
|
||||
env.HDF5PLUGIN_SYSTEM_LIBRARIES = lib.concatStringsSep "," [
|
||||
#"blosc" # AssertionError: 4000 not less than 4000
|
||||
"blosc"
|
||||
"blosc2"
|
||||
# "bz2" # only works with bzip2_1_1
|
||||
"bz2"
|
||||
"charls"
|
||||
"lz4"
|
||||
# "snappy" # snappy tests fail
|
||||
# "sperr" # not packaged?
|
||||
# "zfp" # pkgconfig: (lib)zfp not found
|
||||
"zfp"
|
||||
"zlib"
|
||||
"zstd"
|
||||
];
|
||||
@@ -82,6 +88,19 @@ buildPythonPackage rec {
|
||||
|
||||
preBuild = ''
|
||||
mkdir src/hdf5plugin/plugins
|
||||
|
||||
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 = {
|
||||
@@ -94,4 +113,4 @@ buildPythonPackage rec {
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ pbsds ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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 = [ ];
|
||||
};
|
||||
})
|
||||
@@ -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
|
||||
|
||||
@@ -1885,8 +1885,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;
|
||||
|
||||
Reference in New Issue
Block a user