From fd0c467f9671835a71bcaa36439c7f7adfccb126 Mon Sep 17 00:00:00 2001 From: Tyson Whitehead Date: Thu, 2 Aug 2018 16:15:52 -0400 Subject: [PATCH] tensorflow: workaround tensorboard collision from upstream pip hack Upstream lists tensorboard as a utility from tensorflow despite it being provided by tensorboard to stop pip for deleting it. This causes python.withPackages collisions between the two. --- pkgs/development/python-modules/tensorflow/bin.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index 4e3621157f9..42e35df7497 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -61,6 +61,15 @@ in buildPythonPackage rec { # bleach) Hence we disable dependency checking for now. installFlags = lib.optional isPy36 "--no-dependencies"; + + # Upstream has a pip hack that results in bin/tensorboard being in both tensorflow + # and the propageted input tensorflow-tensorboard which causes environment collisions. + # + # https://github.com/tensorflow/tensorflow/blob/v1.7.1/tensorflow/tools/pip_package/setup.py#L79 + postInstall = '' + rm $out/bin/tensorboard + ''; + # Note that we need to run *after* the fixup phase because the # libraries are loaded at runtime. If we run in preFixup then # patchelf --shrink-rpath will remove the cuda libraries.