From 02583b3274e888ccece390cb0a530b89632588d1 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Mon, 30 Sep 2024 22:30:47 -0700 Subject: [PATCH 1/2] inochi-session: 0.8.4 -> 0.8.7, fix aarch64-linux --- pkgs/applications/misc/inochi2d/default.nix | 14 ++- pkgs/applications/misc/inochi2d/generic.nix | 10 +- .../misc/inochi2d/session-dub-lock.json | 44 ++++----- .../misc/inochi2d/session-dynamic-lua.patch | 98 +++++++++++++++++++ 4 files changed, 136 insertions(+), 30 deletions(-) create mode 100644 pkgs/applications/misc/inochi2d/session-dynamic-lua.patch diff --git a/pkgs/applications/misc/inochi2d/default.nix b/pkgs/applications/misc/inochi2d/default.nix index a88c58d38555..a3c23c1d8426 100644 --- a/pkgs/applications/misc/inochi2d/default.nix +++ b/pkgs/applications/misc/inochi2d/default.nix @@ -54,15 +54,21 @@ in inochi-session = mkGeneric rec { pname = "inochi-session"; appname = "Inochi Session"; - version = "0.8.4"; + version = "0.8.7"; src = fetchFromGitHub { owner = "Inochi2D"; repo = "inochi-session"; rev = "v${version}"; - hash = "sha256-BRA5qODHhyHBeZYT5MQwcFmr/zVokfO5SrbcbQa6w7w="; + hash = "sha256-FcgzTCpD+L50MsPP90kfL6h6DEUtiYkUV1xKww1pQfg="; }; + patches = [ + # Dynamically load Lua to get around the linker error on aarch64-linux. + # https://github.com/Inochi2D/inochi-session/pull/60 + ./session-dynamic-lua.patch + ]; + dubLock = ./session-dub-lock.json; preFixup = '' @@ -72,8 +78,8 @@ in dontStrip = true; # symbol lookup error: undefined symbol: , version meta = { - # darwin has slightly different build steps, aarch fails to build because of some lua related error - broken = stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isAarch64; + # darwin has slightly different build steps + broken = stdenv.hostPlatform.isDarwin; changelog = "https://github.com/Inochi2D/inochi-session/releases/tag/${src.rev}"; description = "An application that allows streaming with Inochi2D puppets"; }; diff --git a/pkgs/applications/misc/inochi2d/generic.nix b/pkgs/applications/misc/inochi2d/generic.nix index 3e55f97f8b2d..0a08ebbaae73 100644 --- a/pkgs/applications/misc/inochi2d/generic.nix +++ b/pkgs/applications/misc/inochi2d/generic.nix @@ -14,6 +14,7 @@ freetype, SDL2, zenity, + luajit_2_1, libGL, builderArgs, @@ -99,7 +100,7 @@ buildDubPackage ( . gentl.sh # Use the fake git to generate version info - dub build --skip-registry=all --compiler=ldc2 --build=release --config=meta + dub build --skip-registry=all --compiler=ldc2 --build=release --config=update-version ''; # Use the "barebones" configuration so that we don't include the mascot and icon files in out build @@ -128,7 +129,12 @@ buildDubPackage ( # Add support for `open file` dialog makeWrapper $out/share/${pname}/${pname} $out/bin/${pname} \ --prefix PATH : ${lib.makeBinPath [ zenity ]} \ - --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libGL ]} + --prefix LD_LIBRARY_PATH : ${ + lib.makeLibraryPath [ + libGL + luajit_2_1 + ] + } ''; meta = { diff --git a/pkgs/applications/misc/inochi2d/session-dub-lock.json b/pkgs/applications/misc/inochi2d/session-dub-lock.json index e66d7cebe7e9..b069e6d90055 100644 --- a/pkgs/applications/misc/inochi2d/session-dub-lock.json +++ b/pkgs/applications/misc/inochi2d/session-dub-lock.json @@ -21,8 +21,8 @@ "sha256": "01dgvlvwbhwz7822gp6z5xn6w3k51q09i6qzns2i4ixmjh45wscs" }, "diet-ng": { - "version": "1.8.1", - "sha256": "0kh8haw712xkd3f07s5x5g12nmmkv0y1lk2cqh66298fc5mgj4sv" + "version": "1.8.2", + "sha256": "0hwm8dsyw7xb9d540ks314vzxibn4ri7b4m2gagqbpmzspvd2slv" }, "dportals": { "version": "0.1.0", @@ -33,12 +33,12 @@ "sha256": "0p9g4h5qanbg6281x1068mdl5p7zvqig4zmmi72a2cay6dxnbvxb" }, "eventcore": { - "version": "0.9.30", - "sha256": "1n8wdcjhas0y99pf9fvwwsydkmy9g7gvfjhlwpjh158c7pfjwlaq" + "version": "0.9.34", + "sha256": "0znrcmxdr65gk8bwrknhm530kicznia4xb09h5jv42sxnv3cjkjw" }, "facetrack-d": { - "version": "0.7.8", - "sha256": "1414wvh0kn1rps5r16ir92sqfj8a7na1gd71ds81jkq8arkm17j0" + "version": "0.8.0", + "sha256": "0p04yd50sgjb9n9gdp2yjgvlm8kkld2gl5ivz36npjnchj8k5a8i" }, "fghj": { "version": "1.0.2", @@ -61,29 +61,21 @@ "sha256": "0dl7n4myxp1s3b32v2s975k76gs90wr2nw6ac5jq9hsgzhp1ix0h" }, "inmath": { - "version": "1.0.6", - "sha256": "0kzk55ilbnl6qypjk60zwd5ibys5n47128hbbr0mbc7bpj9ppfg4" + "version": "1.3.0", + "sha256": "1bmfsnlpm3lb085cs29h63l4fmfr0xr9iyfd0wrg5i87difshpw6" }, "inochi2d": { - "version": "0.8.4", - "sha256": "1bj0c6i9kcw1vfm6lf8lyxpf1lhhslg3f182jycdmzms15i3jb3y" + "version": "0.8.6", + "sha256": "0xhidp1y91cidh3g1cc5v7psb5kfy17ars7k7cplnywhjlcqqk70" }, "inui": { - "version": "1.2.1", - "sha256": "0pygf8jxnbvib5f23qxf6k24wz8mh6fc0zhrkp83gq33k02ab5cx" - }, - "libasync": { - "version": "0.8.6", - "sha256": "0hhk5asfdccby8ky77a25qn7dfmfdmwyzkrg3zk064bicmgdwlnj" + "version": "1.2.2", + "sha256": "1gh7ngva2ijz5gx9hrqn9rzzx5vvpf6l12r98wklzxwb9v5hmj69" }, "lumars": { "version": "1.6.1", "sha256": "1vzdghqwv2gb41rp75456g43yfsndbl0dy6bnn4x6azwwny22br9" }, - "memutils": { - "version": "1.0.10", - "sha256": "0hm31birbw59sw1bi9syjhbcdgwwwyyx6r9jg7ar9i6a74cjr52c" - }, "mir-algorithm": { "version": "3.22.1", "sha256": "1bvvf3dm26x1h10pg1s4kyhxiyrmd96kk2lmchyady39crpjj5cf" @@ -96,9 +88,13 @@ "version": "1.0.1", "sha256": "0adyjpcgd65z44iydnrrrpjwbvmrm08a3pkcriqi7npqylfysqn6" }, + "numem": { + "version": "0.11.3", + "sha256": "00rm3cg5i714ncww8yxsbzf1y1bf6r8d0yx6i38ac2x7090arvjm" + }, "openssl": { - "version": "3.3.3", - "sha256": "1fwhd5fkvgbqf3y8gwmrnd42kzi4k3mibpxijw5j82jxgfp1rzsf" + "version": "3.3.4", + "sha256": "17s71yfyhb9jyym2nldj23ikazwbbrmh6ply33mg888rd6dxnhyy" }, "openssl-static": { "version": "1.0.5+3.0.8", @@ -125,8 +121,8 @@ "sha256": "12mfm49bjnh2pvm51dzna625kzgwznm9kcv6qhazc4il9j0224wd" }, "vibe-core": { - "version": "2.8.4", - "sha256": "1pik6vympgwxpyxb75g1f8409cd6hw952gbflqvwaj18shz6dwjm" + "version": "2.9.3", + "sha256": "032q1gkm7l6blj5y3yiwk205m12svp4bv8k743crkd8d1xhlrrvi" }, "vibe-d": { "version": "0.9.8", diff --git a/pkgs/applications/misc/inochi2d/session-dynamic-lua.patch b/pkgs/applications/misc/inochi2d/session-dynamic-lua.patch new file mode 100644 index 000000000000..628859481580 --- /dev/null +++ b/pkgs/applications/misc/inochi2d/session-dynamic-lua.patch @@ -0,0 +1,98 @@ +diff --git a/dub.sdl b/dub.sdl +index 50c0da1..87936a4 100644 +--- a/dub.sdl ++++ b/dub.sdl +@@ -32,6 +32,9 @@ configuration "barebones" { + targetType "executable" + + dependency "dportals" version="~>0.1.0" ++ ++ subConfiguration "lumars" "lua51-dynamic" ++ versions "LUA_51" + } + + +@@ -51,6 +54,9 @@ configuration "linux-full" { + versions "InBranding" + + dependency "dportals" version="~>0.1.0" ++ ++ subConfiguration "lumars" "lua51-dynamic" ++ versions "LUA_51" + } + + configuration "osx-full" { +@@ -84,6 +90,9 @@ configuration "linux-nightly" { + versions "InNightly" + + dependency "dportals" version="~>0.1.0" ++ ++ subConfiguration "lumars" "lua51-dynamic" ++ versions "LUA_51" + } + + // macOS nightly build +diff --git a/source/session/plugins/package.d b/source/session/plugins/package.d +index 965c64f..7cfbb0b 100644 +--- a/source/session/plugins/package.d ++++ b/source/session/plugins/package.d +@@ -14,9 +14,9 @@ import lumars; + import session.log; + import std.file; + import std.path; ++import std.exception; + + private { +- bool couldLoadLua = true; + LuaState* state; + LuaTable apiTable; + +@@ -34,13 +34,17 @@ Plugin[] insPlugins; + Initializes Lua support + */ + void insLuaInit() { +- // LuaSupport support = loadLua(); +- +- // if (support == LuaSupport.noLibrary || support == LuaSupport.badLibrary) { +- // couldLoadLua = false; +- // insLogWarn("Could not load Lua support..."); +- // } else insLogInfo("Lua support initialized."); +- insLogInfo("Lua support initialized. (Statically linked for now)"); ++ version(linux){ ++ LuaSupport support = loadLua("libluajit-5.1.so.2"); ++ if(support == LuaSupport.noLibrary){ ++ support = loadLua(); ++ } ++ enforce(support != LuaSupport.noLibrary, "Could not find Lua support...!"); ++ enforce(support != LuaSupport.badLibrary, "Bad Lua library found!"); ++ insLogInfo("Lua support initialized."); ++ } else { ++ insLogInfo("Lua support initialized. (Statically linked)"); ++ } + + // Create Lua state + state = new LuaState(luaL_newstate()); +@@ -56,6 +60,9 @@ void insLuaInit() { + void insLuaUnload() { + lua_close(state.handle()); + destroy(state); ++ version(linux){ ++ unloadLua(); ++ } + } + + void insSavePluginState() { +@@ -111,13 +118,6 @@ void insEnumeratePlugins() { + insSavePluginState(); + } + +-/** +- Gets whether Lua support is loaded. +-*/ +-bool insHasLua() { +- return couldLoadLua; +-} +- + /** + Gets string of value + */ From 9e921fbf7b10a960cbcf18f5814e7860477143cc Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Tue, 1 Oct 2024 07:59:38 -0700 Subject: [PATCH 2/2] inochi-creator: 0.8.5 -> 0.8.6 --- .../misc/inochi2d/creator-dub-lock.json | 44 +++++++++---------- pkgs/applications/misc/inochi2d/default.nix | 4 +- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/pkgs/applications/misc/inochi2d/creator-dub-lock.json b/pkgs/applications/misc/inochi2d/creator-dub-lock.json index e0d3b23ad0c2..bfcfd17331cc 100644 --- a/pkgs/applications/misc/inochi2d/creator-dub-lock.json +++ b/pkgs/applications/misc/inochi2d/creator-dub-lock.json @@ -21,8 +21,8 @@ "sha256": "01dgvlvwbhwz7822gp6z5xn6w3k51q09i6qzns2i4ixmjh45wscs" }, "diet-ng": { - "version": "1.8.1", - "sha256": "0kh8haw712xkd3f07s5x5g12nmmkv0y1lk2cqh66298fc5mgj4sv" + "version": "1.8.2", + "sha256": "0hwm8dsyw7xb9d540ks314vzxibn4ri7b4m2gagqbpmzspvd2slv" }, "dportals": { "version": "0.1.0", @@ -37,12 +37,12 @@ "sha256": "0p5vmkw29ksh5wdxz1ijms1wblq288pv15vnbl93z7q2vgnq995w" }, "eventcore": { - "version": "0.9.30", - "sha256": "1n8wdcjhas0y99pf9fvwwsydkmy9g7gvfjhlwpjh158c7pfjwlaq" + "version": "0.9.34", + "sha256": "0znrcmxdr65gk8bwrknhm530kicznia4xb09h5jv42sxnv3cjkjw" }, "facetrack-d": { - "version": "0.7.8", - "sha256": "1414wvh0kn1rps5r16ir92sqfj8a7na1gd71ds81jkq8arkm17j0" + "version": "0.8.0", + "sha256": "0p04yd50sgjb9n9gdp2yjgvlm8kkld2gl5ivz36npjnchj8k5a8i" }, "fghj": { "version": "1.0.2", @@ -65,24 +65,16 @@ "sha256": "0dl7n4myxp1s3b32v2s975k76gs90wr2nw6ac5jq9hsgzhp1ix0h" }, "inmath": { - "version": "1.0.6", - "sha256": "0kzk55ilbnl6qypjk60zwd5ibys5n47128hbbr0mbc7bpj9ppfg4" + "version": "1.3.0", + "sha256": "1bmfsnlpm3lb085cs29h63l4fmfr0xr9iyfd0wrg5i87difshpw6" }, "inochi2d": { - "version": "0.8.4", - "sha256": "1bj0c6i9kcw1vfm6lf8lyxpf1lhhslg3f182jycdmzms15i3jb3y" + "version": "0.8.6", + "sha256": "0xhidp1y91cidh3g1cc5v7psb5kfy17ars7k7cplnywhjlcqqk70" }, "kra-d": { - "version": "0.5.5", - "sha256": "0dffmf084ykz19y084v936r3f74613d0jifj0wb3xibfcq9mwxqz" - }, - "libasync": { - "version": "0.8.6", - "sha256": "0hhk5asfdccby8ky77a25qn7dfmfdmwyzkrg3zk064bicmgdwlnj" - }, - "memutils": { - "version": "1.0.10", - "sha256": "0hm31birbw59sw1bi9syjhbcdgwwwyyx6r9jg7ar9i6a74cjr52c" + "version": "0.5.6", + "sha256": "1lp3mf39qfxn6cayznc4nkk24smnd2m5sg8skl9pnd4x85is6zdr" }, "mir-algorithm": { "version": "3.22.1", @@ -100,9 +92,13 @@ "version": "2.2.19", "sha256": "0ad9ahvyrv5h38aqwn3zvlrva3ikfq28dfhpg2lwwgm31ymzvqpb" }, + "numem": { + "version": "0.11.3", + "sha256": "00rm3cg5i714ncww8yxsbzf1y1bf6r8d0yx6i38ac2x7090arvjm" + }, "openssl": { - "version": "3.3.3", - "sha256": "1fwhd5fkvgbqf3y8gwmrnd42kzi4k3mibpxijw5j82jxgfp1rzsf" + "version": "3.3.4", + "sha256": "17s71yfyhb9jyym2nldj23ikazwbbrmh6ply33mg888rd6dxnhyy" }, "openssl-static": { "version": "1.0.5+3.0.8", @@ -133,8 +129,8 @@ "sha256": "12mfm49bjnh2pvm51dzna625kzgwznm9kcv6qhazc4il9j0224wd" }, "vibe-core": { - "version": "2.8.4", - "sha256": "1pik6vympgwxpyxb75g1f8409cd6hw952gbflqvwaj18shz6dwjm" + "version": "2.9.3", + "sha256": "032q1gkm7l6blj5y3yiwk205m12svp4bv8k743crkd8d1xhlrrvi" }, "vibe-d": { "version": "0.9.8", diff --git a/pkgs/applications/misc/inochi2d/default.nix b/pkgs/applications/misc/inochi2d/default.nix index a3c23c1d8426..cb17167d513b 100644 --- a/pkgs/applications/misc/inochi2d/default.nix +++ b/pkgs/applications/misc/inochi2d/default.nix @@ -22,13 +22,13 @@ in inochi-creator = mkGeneric rec { pname = "inochi-creator"; appname = "Inochi Creator"; - version = "0.8.5"; + version = "0.8.6"; src = fetchFromGitHub { owner = "Inochi2D"; repo = "inochi-creator"; rev = "v${version}"; - hash = "sha256-qrSHyvFE55xRbcA79lngOHJOdv54rNlUTHlxT9jjPEY="; + hash = "sha256-9d3j5ZL6rGOjN1GUpCIfbjby0mNMvOK7BJbHYgwLY2k="; }; dubLock = ./creator-dub-lock.json;