From 16b9b0e181f715494b5b0dc8283fce12f207f50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 2 Oct 2022 16:52:06 +0200 Subject: [PATCH] python3.pkgs.tensorboardx: fix build --- pkgs/development/python-modules/tensorboardx/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/tensorboardx/default.nix b/pkgs/development/python-modules/tensorboardx/default.nix index 4bc85a5cd08e..76507a11e09b 100644 --- a/pkgs/development/python-modules/tensorboardx/default.nix +++ b/pkgs/development/python-modules/tensorboardx/default.nix @@ -33,6 +33,10 @@ buildPythonPackage rec { substituteInPlace tensorboardX/pytorch_graph.py --replace \ "torch.onnx.set_training(model, False)" \ "torch.onnx.select_model_mode_for_export(model, torch.onnx.TrainingMode.EVAL)" + + # Version detection seems broken here, the version reported by python is + # newer than the protobuf package itself. + sed -i -e "s/'protobuf[^']*'/'protobuf'/" setup.py ''; # Wanted protobuf version is mentioned here: