libtensorflow: init at 1.8.0
Required for haskell.packages.ghc822.tensorflow
This commit is contained in:
parent
aa9b50ccf3
commit
1c48e89eb1
32
pkgs/development/libraries/libtensorflow/default.nix
Normal file
32
pkgs/development/libraries/libtensorflow/default.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ stdenv, fetchurl, patchelf }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libtensorflow";
|
||||
version = "1.8.0";
|
||||
name = "${pname}-${version}";
|
||||
src = fetchurl {
|
||||
url = "https://storage.googleapis.com/tensorflow/${pname}/${pname}-cpu-linux-x86_64-${version}.tar.gz";
|
||||
sha256 = "0qzy15rc3x961cyi3bqnygrcnw4x69r28xkwhpwrv1r0gi6k73ha";
|
||||
};
|
||||
|
||||
# Patch library to use our libc, libstdc++ and others
|
||||
buildCommand = ''
|
||||
. $stdenv/setup
|
||||
mkdir -pv $out
|
||||
tar -C $out -xzf $src
|
||||
chmod +w $out/lib/libtensorflow.so
|
||||
chmod +w $out/lib/libtensorflow_framework.so
|
||||
${patchelf}/bin/patchelf --set-rpath "${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib:$out/lib" $out/lib/libtensorflow.so
|
||||
${patchelf}/bin/patchelf --set-rpath "${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/libtensorflow_framework.so
|
||||
chmod -w $out/lib/libtensorflow.so
|
||||
chmod -w $out/lib/libtensorflow_framework.so
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
inherit version;
|
||||
description = "C API for TensorFlow";
|
||||
license = licenses.asl20;
|
||||
maintainers = [maintainers.basvandijk];
|
||||
platforms = platforms.linux;
|
||||
homepage = https://www.tensorflow.org/versions/master/install/install_c;
|
||||
};
|
||||
}
|
@ -860,6 +860,8 @@ with pkgs;
|
||||
|
||||
tensor = libsForQt5.callPackage ../applications/networking/instant-messengers/tensor { };
|
||||
|
||||
libtensorflow = callPackage ../development/libraries/libtensorflow { };
|
||||
|
||||
blink1-tool = callPackage ../tools/misc/blink1-tool { };
|
||||
|
||||
bliss = callPackage ../applications/science/math/bliss { };
|
||||
|
Loading…
Reference in New Issue
Block a user