diff --git a/pkgs/development/python-modules/polars/avx512.patch b/pkgs/development/python-modules/polars/avx512.patch new file mode 100644 index 000000000000..5a4d5ecc9530 --- /dev/null +++ b/pkgs/development/python-modules/polars/avx512.patch @@ -0,0 +1,15 @@ +diff --git a/crates/polars-compute/src/lib.rs b/crates/polars-compute/src/lib.rs +index ebe1ef753..6e1eee897 100644 +--- a/crates/polars-compute/src/lib.rs ++++ b/crates/polars-compute/src/lib.rs +@@ -5,6 +5,10 @@ + all(feature = "simd", target_arch = "x86_64"), + feature(stdarch_x86_avx512) + )] ++#![cfg_attr( ++ all(feature = "simd", target_arch = "x86_64"), ++ feature(avx512_target_feature) ++)] + + use arrow::types::NativeType; + diff --git a/pkgs/development/python-modules/polars/default.nix b/pkgs/development/python-modules/polars/default.nix index d5f576e9306f..6b2bf5d213ba 100644 --- a/pkgs/development/python-modules/polars/default.nix +++ b/pkgs/development/python-modules/polars/default.nix @@ -59,6 +59,10 @@ buildPythonPackage rec { hash = "sha256-OZ7guV/uxa3jGesAh+ubrFjQSNVp5ImfXfPAQxagTj0="; }; + patches = [ + ./avx512.patch + ]; + # Do not type-check assertions because some of them use unstable features (`is_none_or`) postPatch = '' while IFS= read -r -d "" path ; do