File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments