python3Packages.jaxlib-bin: fix ofborg evaluation

See https://discourse.nixos.org/t/ofborg-does-not-respect-meta-platforms/27019 for more info.
This commit is contained in:
Samuel Ainsworth 2023-04-19 08:58:40 -07:00
parent 11687d0609
commit 3fa9f1f00e

View file

@ -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.