at 16.09-beta 42 lines 1.2 kB view raw
1{stdenv, fetchgit, luajit, openblas, imagemagick, cmake, curl, fftw, gnuplot 2 , libjpeg, zeromq3, ncurses, openssl, libpng, qt4, readline, unzip 3 , pkgconfig, zlib, libX11, which 4 }: 5stdenv.mkDerivation rec{ 6 version = "0.0pre20160820"; 7 name = "torch-${version}"; 8 buildInputs = [ 9 luajit openblas imagemagick cmake curl fftw gnuplot unzip qt4 10 libjpeg zeromq3 ncurses openssl libpng readline pkgconfig 11 zlib libX11 which 12 ]; 13 src = fetchgit (stdenv.lib.importJSON ./src.json); 14 buildPhase = '' 15 cd .. 16 export PREFIX=$out 17 18 include= 19 for i in $NIX_CFLAGS_COMPILE; do 20 if test -n "$include" && test -d "$i"; then 21 export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH''${CMAKE_INCLUDE_PATH:+:}$i" 22 fi; 23 if test "x$i" = "x-isystem"; then 24 include=1 25 else 26 include= 27 fi 28 done 29 30 mkdir "$out" 31 sh install.sh -s 32 ''; 33 installPhase = '' 34 ''; 35 meta = { 36 inherit version; 37 description = ''A scientific computing framework with wide support for machine learning algorithms''; 38 license = stdenv.lib.licenses.bsd3 ; 39 maintainers = [stdenv.lib.maintainers.raskin]; 40 platforms = stdenv.lib.platforms.linux; 41 }; 42}