torch: use default luajit

+1 -43
+1 -43
pkgs/applications/science/machine-learning/torch/torch-distro.nix
··· 1 1 { luarocks, lib , stdenv, writeText , readline, makeWrapper, 2 2 less, ncurses, cmake, openblas, coreutils, fetchgit, libuuid, czmq, openssl, 3 - gnuplot, fetchurl, 4 - src 3 + gnuplot, fetchurl, luajit, src 5 4 } : 6 5 7 6 let ··· 20 19 pkgs_gnuplot = gnuplot; 21 20 22 21 luapkgs = rec { 23 - 24 - 25 - luajit = 26 - stdenv.mkDerivation rec { 27 - name = "luajit-${version}"; 28 - version = "2.1.0-beta1"; 29 - luaversion = "5.1"; 30 - 31 - src = fetchurl { 32 - url = "http://luajit.org/download/LuaJIT-${version}.tar.gz"; 33 - sha256 = "06170d38387c59d1292001a166e7f5524f5c5deafa8705a49a46fa42905668dd"; 34 - }; 35 - 36 - enableParallelBuilding = true; 37 - 38 - patchPhase = '' 39 - substituteInPlace Makefile \ 40 - --replace /usr/local $out 41 - 42 - substituteInPlace src/Makefile --replace gcc cc 43 - '' + stdenv.lib.optionalString (stdenv.cc.libc != null) 44 - '' 45 - substituteInPlace Makefile \ 46 - --replace ldconfig ${stdenv.cc.libc}/sbin/ldconfig 47 - ''; 48 - 49 - configurePhase = false; 50 - buildFlags = [ "amalg" ]; # Build highly optimized version 51 - installPhase = '' 52 - make install INSTALL_INC=$out/include PREFIX=$out 53 - ln -s $out/bin/luajit* $out/bin/luajit 54 - ''; 55 - 56 - meta = with stdenv.lib; { 57 - description = "high-performance JIT compiler for Lua 5.1"; 58 - homepage = http://luajit.org; 59 - license = licenses.mit; 60 - platforms = platforms.linux ++ platforms.darwin; 61 - maintainers = [ maintainers.thoughtpolice ]; 62 - }; 63 - }; 64 22 65 23 luarocks = default_luarocks.override { 66 24 lua = luajit;