tensorflowNoGpuSupport -> tensorflowWithoutCuda

and move expression
This commit is contained in:
Frederik Rietdijk 2017-02-15 12:30:30 +01:00
parent f53900d142
commit a069c16c22
2 changed files with 50 additions and 35 deletions

View File

@ -0,0 +1,48 @@
{ stdenv
, fetchurl
, buildPythonPackage
, numpy
, six
, protobuf3_0_0b2
, swig
, mock
, gcc
, zlib
}:
# tensorflow is built from a downloaded wheel, because the upstream
# project's build system is an arcane beast based on
# bazel. Untangling it and building the wheel from source is an open
# problem.
buildPythonPackage rec {
pname = "tensorflow";
version = "0.10.0";
name = "${pname}-${version}";
format = "wheel";
src = fetchurl {
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
"0g05pa4z6kdy0giz7hjgjgwf4zzr5l8cf1zh247ymixlikn3fnpx";
};
propagatedBuildInputs = [ numpy six protobuf3_0_0b2 swig mock];
preFixup = ''
RPATH="${stdenv.lib.makeLibraryPath [ gcc.cc.lib zlib ]}"
find $out -name '*.so' -exec patchelf --set-rpath "$RPATH" {} \;
'';
doCheck = false;
meta = with stdenv.lib; {
description = "TensorFlow helps the tensors flow (no gpu support)";
homepage = http://tensorflow.org;
license = licenses.asl20;
platforms = with platforms; linux ++ darwin;
};
}

View File

@ -31243,43 +31243,10 @@ EOF
};
};
# tensorflow is built from a downloaded wheel, because the upstream
# project's build system is an arcane beast based on
# bazel. Untangling it and building the wheel from source is an open
# problem.
tensorflow = self.tensorflowWithoutCuda;
tensorflow = self.tensorflowNoGpuSupport;
tensorflowWithoutCuda = callPackage ../development/python-modules/tensorflow { };
tensorflowNoGpuSupport = buildPythonPackage rec {
name = "tensorflow";
version = "0.10.0";
format = "wheel";
src = pkgs.fetchurl {
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
"0g05pa4z6kdy0giz7hjgjgwf4zzr5l8cf1zh247ymixlikn3fnpx";
};
propagatedBuildInputs = with self; [ numpy six protobuf3_0_0b2 pkgs.swig mock];
preFixup = ''
RPATH="${stdenv.lib.makeLibraryPath [ pkgs.gcc.cc.lib pkgs.zlib ]}"
find $out -name '*.so' -exec patchelf --set-rpath "$RPATH" {} \;
'';
doCheck = false;
meta = {
description = "TensorFlow helps the tensors flow (no gpu support)";
homepage = http://tensorflow.org;
license = licenses.asl20;
platforms = with platforms; linux ++ darwin;
};
};
tensorflowCuDNN = buildPythonPackage rec {
name = "tensorflow";