Skip to content

Commit 9555c05

Browse files
qbisiwegank
authored andcommitted
luajit_loongson: init at 2.1.1749125925
1 parent 049a5b3 commit 9555c05

3 files changed

Lines changed: 34 additions & 1 deletion

File tree

pkgs/development/interpreters/lua-5/default.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,9 @@ rec {
194194
self = luajit_openresty;
195195
inherit callPackage fetchFromGitHub passthruFun;
196196
};
197+
198+
luajit_loongson = import ../luajit/loongson.nix {
199+
self = luajit_loongson;
200+
inherit callPackage fetchFromGitHub passthruFun;
201+
};
197202
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
self,
3+
callPackage,
4+
fetchFromGitHub,
5+
passthruFun,
6+
}:
7+
8+
callPackage ./default.nix {
9+
# The patch version is the timestamp of the git commit,
10+
# obtain via `cat $(nix-build -A luajit_2_0.src)/.relver`
11+
version = "2.1.1749125925";
12+
13+
src = fetchFromGitHub {
14+
owner = "loongson";
15+
repo = "LuaJIT";
16+
rev = "02579d06dba72769949b0e8660c875a6d20eb6b3";
17+
hash = "sha256-07U+xUikZYQr+TgQZZtHHTqQUdkoiMc8Umtgh7gZVzA=";
18+
};
19+
20+
luaAttr = "luajit_loongson";
21+
22+
extraMeta = {
23+
platforms = [ "loongarch64-linux" ];
24+
badPlatforms = [ ];
25+
};
26+
inherit self passthruFun;
27+
}

pkgs/top-level/all-packages.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5287,6 +5287,7 @@ with pkgs;
52875287
luajit_2_1
52885288
luajit_2_0
52895289
luajit_openresty
5290+
luajit_loongson
52905291
;
52915292

52925293
lua5 = lua5_2_compat;
@@ -5301,7 +5302,7 @@ with pkgs;
53015302

53025303
luaPackages = lua52Packages;
53035304

5304-
luajit = luajit_2_1;
5305+
luajit = if stdenv.hostPlatform.isLoongArch64 then luajit_loongson else luajit_2_1;
53055306

53065307
luarocks = luaPackages.luarocks;
53075308
luarocks-nix = luaPackages.luarocks-nix;

0 commit comments

Comments
 (0)