From 684a55a2551cc6d4c513f057729da35860004c6c Mon Sep 17 00:00:00 2001 From: Uri Baghin Date: Sat, 20 Aug 2022 10:18:53 +1000 Subject: [PATCH] python3Packages.jaxlib: fix linux build --- pkgs/development/python-modules/jaxlib/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/jaxlib/default.nix b/pkgs/development/python-modules/jaxlib/default.nix index 54b4c36dc5a2..eee432f71853 100644 --- a/pkgs/development/python-modules/jaxlib/default.nix +++ b/pkgs/development/python-modules/jaxlib/default.nix @@ -248,16 +248,16 @@ let done substituteInPlace ../output/external/org_tensorflow/tensorflow/compiler/xla/python/pprof_profile_builder.cc \ --replace "status.message()" "std::string{status.message()}" - substituteInPlace ../output/external/rules_cc/cc/private/toolchain/osx_cc_wrapper.sh.tpl \ - --replace "/usr/bin/install_name_tool" "${cctools}/bin/install_name_tool" - substituteInPlace ../output/external/rules_cc/cc/private/toolchain/unix_cc_configure.bzl \ - --replace "/usr/bin/libtool" "${cctools}/bin/libtool" '' + lib.optionalString cudaSupport '' patchShebangs ../output/external/org_tensorflow/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl '' + lib.optionalString stdenv.isDarwin '' # Framework search paths aren't added by bintools hook # https://github.com/NixOS/nixpkgs/pull/41914 export NIX_LDFLAGS+=" -F${IOKit}/Library/Frameworks" + substituteInPlace ../output/external/rules_cc/cc/private/toolchain/osx_cc_wrapper.sh.tpl \ + --replace "/usr/bin/install_name_tool" "${cctools}/bin/install_name_tool" + substituteInPlace ../output/external/rules_cc/cc/private/toolchain/unix_cc_configure.bzl \ + --replace "/usr/bin/libtool" "${cctools}/bin/libtool" '' + (if stdenv.cc.isGNU then '' sed -i 's@-lprotobuf@-l:libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD sed -i 's@-lprotoc@-l:libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD