tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
torch: use default luajit
Sergey Mironov
10 years ago
a56b9ab5
da66fd2b
+1
-43
1 changed file
expand all
collapse all
unified
split
pkgs
applications
science
machine-learning
torch
torch-distro.nix
+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
3
-
gnuplot, fetchurl,
4
4
-
src
3
3
+
gnuplot, fetchurl, luajit, src
5
4
} :
6
5
7
6
let
···
20
19
pkgs_gnuplot = gnuplot;
21
20
22
21
luapkgs = rec {
23
23
-
24
24
-
25
25
-
luajit =
26
26
-
stdenv.mkDerivation rec {
27
27
-
name = "luajit-${version}";
28
28
-
version = "2.1.0-beta1";
29
29
-
luaversion = "5.1";
30
30
-
31
31
-
src = fetchurl {
32
32
-
url = "http://luajit.org/download/LuaJIT-${version}.tar.gz";
33
33
-
sha256 = "06170d38387c59d1292001a166e7f5524f5c5deafa8705a49a46fa42905668dd";
34
34
-
};
35
35
-
36
36
-
enableParallelBuilding = true;
37
37
-
38
38
-
patchPhase = ''
39
39
-
substituteInPlace Makefile \
40
40
-
--replace /usr/local $out
41
41
-
42
42
-
substituteInPlace src/Makefile --replace gcc cc
43
43
-
'' + stdenv.lib.optionalString (stdenv.cc.libc != null)
44
44
-
''
45
45
-
substituteInPlace Makefile \
46
46
-
--replace ldconfig ${stdenv.cc.libc}/sbin/ldconfig
47
47
-
'';
48
48
-
49
49
-
configurePhase = false;
50
50
-
buildFlags = [ "amalg" ]; # Build highly optimized version
51
51
-
installPhase = ''
52
52
-
make install INSTALL_INC=$out/include PREFIX=$out
53
53
-
ln -s $out/bin/luajit* $out/bin/luajit
54
54
-
'';
55
55
-
56
56
-
meta = with stdenv.lib; {
57
57
-
description = "high-performance JIT compiler for Lua 5.1";
58
58
-
homepage = http://luajit.org;
59
59
-
license = licenses.mit;
60
60
-
platforms = platforms.linux ++ platforms.darwin;
61
61
-
maintainers = [ maintainers.thoughtpolice ];
62
62
-
};
63
63
-
};
64
22
65
23
luarocks = default_luarocks.override {
66
24
lua = luajit;