|
1 |
| -{ stdenv, fetchurl, hostPlatform }: |
| 1 | +{ stdenv, lib, fetchurl, hostPlatform }: |
2 | 2 | rec {
|
3 | 3 |
|
4 |
| - luajit = |
5 |
| - # Compatibility problems with lightuserdata pointers; see: |
6 |
| - # https://github.com/LuaJIT/LuaJIT/blob/v2.1/doc/status.html#L101 |
7 |
| - if hostPlatform.is64bit && (/*hostPlatform.isArm ||*/ hostPlatform.isSunOS) |
8 |
| - # FIXME: fix the aarch64 build |
9 |
| - then luajit_2_0 |
10 |
| - else luajit_2_1; |
| 4 | + luajit = luajit_2_1; |
11 | 5 |
|
12 | 6 | luajit_2_0 = generic {
|
13 | 7 | version = "2.0.5";
|
14 | 8 | isStable = true;
|
15 | 9 | sha256 = "0yg9q4q6v028bgh85317ykc9whgxgysp76qzaqgq55y6jy11yjw7";
|
| 10 | + } // { |
| 11 | + # 64-bit ARM isn't supported upstream |
| 12 | + meta = meta // { |
| 13 | + platforms = lib.filter (p: p != "aarch64-linux") meta.platforms; |
| 14 | + }; |
16 | 15 | };
|
17 | 16 |
|
18 | 17 | luajit_2_1 = generic {
|
|
22 | 21 | };
|
23 | 22 |
|
24 | 23 |
|
| 24 | + meta = with stdenv.lib; { |
| 25 | + description = "High-performance JIT compiler for Lua 5.1"; |
| 26 | + homepage = http://luajit.org; |
| 27 | + license = licenses.mit; |
| 28 | + platforms = platforms.linux ++ platforms.darwin; |
| 29 | + maintainers = with maintainers ; [ thoughtpolice smironov vcunat ]; |
| 30 | + }; |
| 31 | + |
25 | 32 | generic =
|
26 | 33 | { version, sha256 ? null, isStable
|
27 | 34 | , name ? "luajit-${version}"
|
|
33 | 40 | }:
|
34 | 41 |
|
35 | 42 | stdenv.mkDerivation rec {
|
36 |
| - inherit name version src; |
| 43 | + inherit name version src meta; |
37 | 44 |
|
38 | 45 | luaversion = "5.1";
|
39 | 46 |
|
|
61 | 68 | ''
|
62 | 69 | ln -s "$out"/bin/luajit-* "$out"/bin/luajit
|
63 | 70 | '';
|
64 |
| - |
65 |
| - meta = with stdenv.lib; { |
66 |
| - description = "High-performance JIT compiler for Lua 5.1"; |
67 |
| - homepage = http://luajit.org; |
68 |
| - license = licenses.mit; |
69 |
| - platforms = platforms.linux ++ platforms.darwin; |
70 |
| - maintainers = with maintainers ; [ thoughtpolice smironov vcunat ]; |
71 |
| - }; |
72 | 71 | };
|
73 | 72 | }
|
0 commit comments