diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2016-08-27 15:40:05 +0200 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2016-08-27 15:41:58 +0200 |
commit | 2e0c1c37588238c4216d4db1495762d89cbc48a2 (patch) | |
tree | 6a3da246ecdc99910516b8c464f4d6426b2b1930 /pkgs/development/libraries/torch | |
parent | 3f70fcd4c1512345a5a8a5e41da8a83839a1b16e (diff) |
torch: find libjpeg and libpng, use compatible openblas
Diffstat (limited to 'pkgs/development/libraries/torch')
-rw-r--r-- | pkgs/development/libraries/torch/default.nix | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/development/libraries/torch/default.nix b/pkgs/development/libraries/torch/default.nix index 8700378ae75d9..254c210a61ed2 100644 --- a/pkgs/development/libraries/torch/default.nix +++ b/pkgs/development/libraries/torch/default.nix @@ -1,18 +1,32 @@ -{stdenv, fetchgit, luajit, openblas, imagemagick, cmake, curl, fftw, gnuplot, - libjpeg_turbo, zeromq3, ncurses, openssl, libpng, qt4, readline, unzip}: +{stdenv, fetchgit, luajit, openblas, imagemagick, cmake, curl, fftw, gnuplot + , libjpeg, zeromq3, ncurses, openssl, libpng, qt4, readline, unzip + , pkgconfig, zlib, libX11, which + }: stdenv.mkDerivation rec{ version = "0.0pre20160820"; name = "torch-${version}"; buildInputs = [ luajit openblas imagemagick cmake curl fftw gnuplot unzip qt4 - libjpeg_turbo zeromq3 ncurses openssl libpng readline + libjpeg zeromq3 ncurses openssl libpng readline pkgconfig + zlib libX11 which ]; src = fetchgit (stdenv.lib.importJSON ./src.json); - configurePhase = '' - ''; buildPhase = '' cd .. export PREFIX=$out + + include= + for i in $NIX_CFLAGS_COMPILE; do + if test -n "$include" && test -d "$i"; then + export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH''${CMAKE_INCLUDE_PATH:+:}$i" + fi; + if test "x$i" = "x-isystem"; then + include=1 + else + include= + fi + done + mkdir "$out" sh install.sh -s ''; |