From 633387c0e8ae274767b8beb98648dde84b412477 Mon Sep 17 00:00:00 2001 From: Ji-Haeng Huh Date: Mon, 24 Oct 2016 14:55:50 +0200 Subject: [PATCH] tensorflow support for Darwin tensorflow 0.10.0 : Because of an upstream bug in tensorflow, only tensorflow > 0.10.0 is functional in Darwin system. Required python packages (mock 2.0.0 and funcsigs 1.0.2) are added Removing mock2_0_0 and funcsigs since now upstream supports them --- pkgs/top-level/python-packages.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 78f9187e7a3e..cd35364998b8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1067,7 +1067,7 @@ in { license = licenses.free; }; } else null; - + funcsigs = buildPythonPackage rec { name = "funcsigs-1.0.2"; @@ -14337,7 +14337,7 @@ in { broken = true; }; }; - + mock = buildPythonPackage (rec { name = "mock-2.0.0"; @@ -30386,15 +30386,19 @@ in { tensorflowNoGpuSupport = buildPythonPackage rec { name = "tensorflow"; - version = "0.9.0"; + version = "0.10.0"; format = "wheel"; src = pkgs.fetchurl { - url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-${version}-cp27-none-linux_x86_64.whl"; - sha256 = "15v7iyry8bmp5wcc1rr4bkp80f3887rl99zqf8pys5bad4gldbkh"; + url = if stdenv.isDarwin then + "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-${version}-py2-none-any.whl" else + "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-${version}-cp27-none-linux_x86_64.whl"; + sha256 = if stdenv.isDarwin then + "1gjybh3j3rn34bzhsxsfdbqgsr4jh50qyx2wqywvcb24fkvy40j9" else + "15v7iyry8bmp5wcc1rr4bkp80f3887rl99zqf8pys5bad4gldbkh"; }; - propagatedBuildInputs = with self; [ numpy six protobuf3_0_0b2 pkgs.swig ]; + propagatedBuildInputs = with self; [ numpy six protobuf3_0_0b2 pkgs.swig mock]; preFixup = '' RPATH="${stdenv.lib.makeLibraryPath [ pkgs.gcc.cc.lib pkgs.zlib ]}" @@ -30407,6 +30411,7 @@ in { description = "TensorFlow helps the tensors flow (no gpu support)"; homepage = http://tensorflow.org; license = licenses.asl20; + platforms = with platforms; linux ++ darwin; }; };