From 5fd9b32603dced6e2d1350ecad97028b2a1f029e Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sat, 16 May 2026 19:19:09 +0200 Subject: [PATCH] python3Packages.hdf5plugin: parametrize cpu features Co-Authored-By: Grimmauld Co-Authored-By: Sam Estep --- .../python-modules/hdf5plugin/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/hdf5plugin/default.nix b/pkgs/development/python-modules/hdf5plugin/default.nix index 6ebc0fee3761..ff3364379dfd 100644 --- a/pkgs/development/python-modules/hdf5plugin/default.nix +++ b/pkgs/development/python-modules/hdf5plugin/default.nix @@ -11,6 +11,11 @@ lz4, zlib, zstd, + stdenv, + sse2Support ? stdenv.hostPlatform.avx2Support, + ssse3Support ? stdenv.hostPlatform.ssse3Support, + avx2Support ? stdenv.hostPlatform.avx2Support, + avx512Support ? stdenv.hostPlatform.avx512Support, }: buildPythonPackage rec { @@ -64,10 +69,10 @@ buildPythonPackage rec { # on Linux/Darwin. Pin them to keep the output generic and machine-independent. # https://github.com/silx-kit/hdf5plugin/blob/v6.0.0/doc/install.rst#available-options env.HDF5PLUGIN_NATIVE = "False"; - env.HDF5PLUGIN_SSE2 = "False"; - env.HDF5PLUGIN_SSSE3 = "False"; - env.HDF5PLUGIN_AVX2 = "False"; - env.HDF5PLUGIN_AVX512 = "False"; + env.HDF5PLUGIN_SSE2 = if sse2Support then "True" else "False"; + env.HDF5PLUGIN_SSSE3 = if ssse3Support then "True" else "False"; + env.HDF5PLUGIN_AVX2 = if avx2Support then "True" else "False"; + env.HDF5PLUGIN_AVX512 = if avx512Support then "True" else "False"; checkPhase = '' python test/test.py