diff --git a/pkgs/development/libraries/onnxruntime/default.nix b/pkgs/development/libraries/onnxruntime/default.nix index 93a8e7c65a1c..7ae6315af6fe 100644 --- a/pkgs/development/libraries/onnxruntime/default.nix +++ b/pkgs/development/libraries/onnxruntime/default.nix @@ -229,6 +229,11 @@ effectiveStdenv.mkDerivation rec { postPatch = '' substituteInPlace cmake/libonnxruntime.pc.cmake.in \ --replace-fail '$'{prefix}/@CMAKE_INSTALL_ @CMAKE_INSTALL_ + + # https://github.com/microsoft/onnxruntime/blob/c4f3742bb456a33ee9c826ce4e6939f8b84ce5b0/onnxruntime/core/platform/env.h#L249 + substituteInPlace onnxruntime/core/platform/env.h --replace-fail \ + "GetRuntimePath() const { return PathString(); }" \ + "GetRuntimePath() const { return PathString(\"$out/lib/\"); }" '' + lib.optionalString (effectiveStdenv.hostPlatform.system == "aarch64-linux") '' # https://github.com/NixOS/nixpkgs/pull/226734#issuecomment-1663028691 rm -v onnxruntime/test/optimizer/nhwc_transformer_test.cc