diff --git a/pkgs/development/python-modules/jaxlib/bin.nix b/pkgs/development/python-modules/jaxlib/bin.nix index 43c51ef7c2a4..c7e84e4c11a2 100644 --- a/pkgs/development/python-modules/jaxlib/bin.nix +++ b/pkgs/development/python-modules/jaxlib/bin.nix @@ -77,7 +77,13 @@ buildPythonPackage rec { # python version. disabled = !(pythonVersion == "3.10"); - src = if !cudaSupport then cpuSrcs."${stdenv.hostPlatform.system}" else gpuSrc; + # See https://discourse.nixos.org/t/ofborg-does-not-respect-meta-platforms/27019/6. + src = + if !cudaSupport then + ( + cpuSrcs."${stdenv.hostPlatform.system}" + or (throw "jaxlib-bin is not supported on ${stdenv.hostPlatform.system}") + ) else gpuSrc; # Prebuilt wheels are dynamically linked against things that nix can't find. # Run `autoPatchelfHook` to automagically fix them.