From 9b45381683d55fc629ce1b19acd20b78d4b32424 Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman <145775305+xokdvium@users.noreply.github.com> Date: Sat, 22 Feb 2025 21:49:33 +0000 Subject: [PATCH] liquid-dsp: don't leak impure builder cpu extensions into the build By default the project builds with automatic vector extension detection for the cpu. This leaks impure state into the executable and depending on the builder results in executables that require AVX extensions. Resolves #384082. --- pkgs/development/libraries/liquid-dsp/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/liquid-dsp/default.nix b/pkgs/development/libraries/liquid-dsp/default.nix index 2540eb9520f7..019749eac91a 100644 --- a/pkgs/development/libraries/liquid-dsp/default.nix +++ b/pkgs/development/libraries/liquid-dsp/default.nix @@ -19,7 +19,16 @@ stdenv.mkDerivation rec { sha256 = "sha256-3UKAwhYaYZ42+d+wiW/AB6x5TSOel8d++d3HeZqAg/8="; }; - configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "LIBTOOL=${cctools}/bin/libtool" ]; + configureFlags = + lib.optionals stdenv.hostPlatform.isDarwin [ + "LIBTOOL=${cctools}/bin/libtool" + ] + ++ [ + # Prevent native cpu arch from leaking into binaries. This might lead to + # poor performance, but having portable and working executables is more + # important. + (lib.enableFeature true "simdoverride") + ]; nativeBuildInputs = [ autoreconfHook ]