libtensorflow: add pkgconfig file

Some software that depends on libtensorflow (e.g. the Tensorflow Rust
bindings) expect tensorflow.pc to be available. This change adds a
pkgconfig file.
This commit is contained in:
Daniël de Kok 2018-10-19 14:10:14 +02:00 committed by Frederik Rietdijk
parent 809e566c25
commit 35349b17cf

View File

@ -57,6 +57,17 @@ in stdenv.mkDerivation rec {
${patchLibs}
chmod -w $out/lib/libtensorflow.so
chmod -w $out/lib/libtensorflow_framework.so
# Write pkgconfig file.
mkdir $out/lib/pkgconfig
cat > $out/lib/pkgconfig/tensorflow.pc << EOF
Name: TensorFlow
Version: ${version}
Description: Library for computation using data flow graphs for scalable machine learning
Requires:
Libs: -L$out/lib -ltensorflow
Cflags: -I$out/include/tensorflow
EOF
'';
meta = {