diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index 4184e3aff02b..221c75112b9b 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -22,6 +22,7 @@ , cudaSupport ? false , cudatoolkit , cudnn +, patchelfUnstable , zlib , python , keras-applications @@ -78,7 +79,8 @@ in buildPythonPackage { ] ++ lib.optional (!isPy3k) mock ++ lib.optionals (pythonOlder "3.4") [ backports_weakref ]; - nativeBuildInputs = [ wheel ] ++ lib.optional cudaSupport addOpenGLRunpath; + # remove patchelfUnstable once patchelf 0.14 with https://github.com/NixOS/patchelf/pull/256 becomes the default + nativeBuildInputs = [ wheel ] ++ lib.optional cudaSupport [ addOpenGLRunpath patchelfUnstable ]; preConfigure = '' unset SOURCE_DATE_EPOCH diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index 01af29ceda41..b43ac71ba41e 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -1,5 +1,5 @@ { stdenv, bazel_3, buildBazelPackage, isPy3k, lib, fetchFromGitHub, symlinkJoin -, addOpenGLRunpath, fetchpatch +, addOpenGLRunpath, fetchpatch, patchelfUnstable # Python deps , buildPythonPackage, pythonOlder, python # Python libraries @@ -465,7 +465,8 @@ in buildPythonPackage { tensorflow-tensorboard ]; - nativeBuildInputs = lib.optional cudaSupport addOpenGLRunpath; + # remove patchelfUnstable once patchelf 0.14 with https://github.com/NixOS/patchelf/pull/256 becomes the default + nativeBuildInputs = lib.optional cudaSupport [ addOpenGLRunpath patchelfUnstable ]; postFixup = lib.optionalString cudaSupport '' find $out -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do