From a621ecbbe9d53abb4c95f4df74ec5fe54b7d2312 Mon Sep 17 00:00:00 2001 From: Doloro1978 Date: Fri, 7 Aug 2026 22:04:06 +0100 Subject: [PATCH] add: VRCNext (vrchat companion desktop app) --- _sources/generated.json | 21 ++++ _sources/generated.nix | 13 ++- nvfetcher.toml | 4 + pkgs/by-name/vr/vrcnext/deps.json | 142 ++++++++++++++++++++++++++++ pkgs/by-name/vr/vrcnext/package.nix | 135 ++++++++++++++++++++++++++ 5 files changed, 314 insertions(+), 1 deletion(-) create mode 100644 pkgs/by-name/vr/vrcnext/deps.json create mode 100644 pkgs/by-name/vr/vrcnext/package.nix diff --git a/_sources/generated.json b/_sources/generated.json index dca4d9f..abcb727 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -1,4 +1,25 @@ { + "VRCNext": { + "cargoLock": null, + "date": null, + "extract": null, + "name": "VRCNext", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "shinyflvre", + "repo": "VRCNext", + "rev": "v2026.40.6", + "sha256": "sha256-qJdYFj1hBLVeDmQcUcbteKJIALMDEP1Tk77ds5tP0T8=", + "sparseCheckout": [], + "type": "github" + }, + "version": "v2026.40.6" + }, "ath-tools": { "cargoLock": null, "date": "2026-07-16", diff --git a/_sources/generated.nix b/_sources/generated.nix index f9e4f71..a94e40e 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -6,7 +6,18 @@ dockerTools, }: { - ath-tools = { +VRCNext = { +pname = "VRCNext"; +version = "v2026.40.6"; +src = fetchFromGitHub { +owner = "shinyflvre"; +repo = "VRCNext"; +rev = "v2026.40.6"; +fetchSubmodules = false; +sha256 = "sha256-qJdYFj1hBLVeDmQcUcbteKJIALMDEP1Tk77ds5tP0T8="; +}; +}; +ath-tools = { pname = "ath-tools"; version = "54367caab6cb4e6cd21310c64feadbacc8c9b574"; src = fetchgit { diff --git a/nvfetcher.toml b/nvfetcher.toml index b2c28c6..70bf8f2 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -49,3 +49,7 @@ fetch.github = "Slush97/grimoire" src.github = "Slush97/vpkmerge" fetch.github = "Slush97/vpkmerge" cargo_lock = ["Cargo.lock"] + +[VRCNext] +src.github = "shinyflvre/VRCNext" +fetch.github = "shinyflvre/VRCNext" diff --git a/pkgs/by-name/vr/vrcnext/deps.json b/pkgs/by-name/vr/vrcnext/deps.json new file mode 100644 index 0000000..cada344 --- /dev/null +++ b/pkgs/by-name/vr/vrcnext/deps.json @@ -0,0 +1,142 @@ +[ + { + "pname": "JsonSubTypes", + "version": "2.0.1", + "hash": "sha256-1Sh5MkvJfOVGo83D5EJJzmJYu5LFSOMAFwQCNRNvFc4=" + }, + { + "pname": "Microsoft.Data.Sqlite", + "version": "9.0.0", + "hash": "sha256-SGUV8GJAY8shZwHs4SpfrjsVh5foE0E9qGjO3FiSqFQ=" + }, + { + "pname": "Microsoft.Data.Sqlite.Core", + "version": "9.0.0", + "hash": "sha256-zxVvQSpfECqsjawJVIUBuE82pG5mN2F7iPCRLoK7Q4c=" + }, + { + "pname": "Microsoft.Extensions.DependencyInjection.Abstractions", + "version": "8.0.0", + "hash": "sha256-75KzEGWjbRELczJpCiJub+ltNUMMbz5A/1KQU+5dgP8=" + }, + { + "pname": "Microsoft.Extensions.Logging.Abstractions", + "version": "8.0.0", + "hash": "sha256-Jmddjeg8U5S+iBTwRlVAVLeIHxc4yrrNgqVMOB7EjM4=" + }, + { + "pname": "Microsoft.Win32.SystemEvents", + "version": "9.0.0", + "hash": "sha256-sN16l3f89HTDlf80BRZQIIbYg33B4Z0BRtyjDcNf6IU=" + }, + { + "pname": "NativeFileDialogSharp", + "version": "0.5.0", + "hash": "sha256-9K+nc25ZNcAPrTFokWwPXAjuF0shVVhxWMNhZZSabdU=" + }, + { + "pname": "Newtonsoft.Json", + "version": "13.0.3", + "hash": "sha256-hy/BieY4qxBWVVsDqqOPaLy1QobiIapkbrESm6v2PHc=" + }, + { + "pname": "NuGet.Versioning", + "version": "6.12.1", + "hash": "sha256-f/ejCuzCAwKs4N4Ec6yf2RovrhBT0nj0hRDP+03/Iy4=" + }, + { + "pname": "Otp.NET", + "version": "1.4.0", + "hash": "sha256-J0tWqpW5lSZjcV1hV2sAuAQwLR1VK37rEmcLzlUGXC8=" + }, + { + "pname": "Photino.Native", + "version": "4.0.22", + "hash": "sha256-owM7RGwFd6X5bw1ttMgaQ6qf+157d2OHv5IJp+VlYXs=" + }, + { + "pname": "Photino.NET", + "version": "4.0.16", + "hash": "sha256-cbxDN4nuuwYF4kYoXeZr2HGFwB0GTu8QXrED7Hzz6ps=" + }, + { + "pname": "Polly", + "version": "8.1.0", + "hash": "sha256-l8ZqXsPCYnOErJqrh/RP4kbNgno7y3V01NR7awy93Cs=" + }, + { + "pname": "Polly.Core", + "version": "8.1.0", + "hash": "sha256-5fhL27CDKUgWZLMSoGsQuT6d3IzJOqx5rNg+EQZ5f28=" + }, + { + "pname": "Rsync.Delta", + "version": "1.0.1", + "hash": "sha256-DVB8028j+XWMWZ6YASiXCY+6l9bb7v7zHGFg+ipBcZo=" + }, + { + "pname": "SkiaSharp", + "version": "2.88.8", + "hash": "sha256-rD5gc4SnlRTXwz367uHm8XG5eAIQpZloGqLRGnvNu0A=" + }, + { + "pname": "SkiaSharp.NativeAssets.Linux.NoDependencies", + "version": "2.88.8", + "hash": "sha256-1A00g0D1BhXU6l1iDHlaC30iWJpiGh9Z5JRpFtfohUY=" + }, + { + "pname": "SkiaSharp.NativeAssets.macOS", + "version": "2.88.8", + "hash": "sha256-CdcrzQHwCcmOCPtS8EGtwsKsgdljnH41sFytW7N9PmI=" + }, + { + "pname": "SkiaSharp.NativeAssets.Win32", + "version": "2.88.8", + "hash": "sha256-b8Vb94rNjwPKSJDQgZ0Xv2dWV7gMVFl5GwTK/QiZPPM=" + }, + { + "pname": "SQLitePCLRaw.bundle_e_sqlite3", + "version": "2.1.10", + "hash": "sha256-kZIWjH/TVTXRIsHPZSl7zoC4KAMBMWmgFYGLrQ15Occ=" + }, + { + "pname": "SQLitePCLRaw.core", + "version": "2.1.10", + "hash": "sha256-gpZcYwiJVCVwCyJu0R6hYxyMB39VhJDmYh9LxcIVAA8=" + }, + { + "pname": "SQLitePCLRaw.lib.e_sqlite3", + "version": "2.1.10", + "hash": "sha256-m2v2RQWol+1MNGZsx+G2N++T9BNtQGLLHXUjcwkdCnc=" + }, + { + "pname": "SQLitePCLRaw.provider.e_sqlite3", + "version": "2.1.10", + "hash": "sha256-MLs3jiETLZ7k/TgkHynZegCWuAbgHaDQKTPB0iNv7Fg=" + }, + { + "pname": "System.Drawing.Common", + "version": "9.0.0", + "hash": "sha256-fOGssTUHAkZtPMVCvxzcB39CSXRI+Gj4QFLWkR15iz0=" + }, + { + "pname": "System.IO.Pipelines", + "version": "4.7.0", + "hash": "sha256-5FWgqBisFxCWetwUCQi6nNMK7+JWM+GhAuN+uARdprM=" + }, + { + "pname": "System.Memory", + "version": "4.5.3", + "hash": "sha256-Cvl7RbRbRu9qKzeRBWjavUkseT2jhZBUWV1SPipUWFk=" + }, + { + "pname": "Velopack", + "version": "0.0.915", + "hash": "sha256-L31qPk7/MLexF+5FP4gdNfwAWB6kNlvMFL2nfkQBSQU=" + }, + { + "pname": "VRChat.API", + "version": "2.20.7", + "hash": "sha256-iyMZzsXzNBFTZTsZbHCrzxWyc0m3k0SxU4P/b2VQYfE=" + } +] diff --git a/pkgs/by-name/vr/vrcnext/package.nix b/pkgs/by-name/vr/vrcnext/package.nix new file mode 100644 index 0000000..498af76 --- /dev/null +++ b/pkgs/by-name/vr/vrcnext/package.nix @@ -0,0 +1,135 @@ +{ + lib, + stdenv, + buildDotnetModule, + dotnetCorePackages, + wrapGAppsHook3, + copyDesktopItems, + gdk-pixbuf, + webkitgtk_4_1, + gtk3, + glib, + libnotify, + fontconfig, + gst_all_1, + zenity, + makeDesktopItem, + callPackage, +}: +let + sources = callPackage ../../../../_sources/generated.nix { }; + src = sources.VRCNext.src; + # Version from the nvfetcher tag (v2026.40.6); AppInfo.cs may lag the tag. + version = lib.removePrefix "v" sources.VRCNext.version; +in +buildDotnetModule rec { + pname = "vrcnext"; + inherit version src; + + projectFile = "VRCNext.csproj"; + nugetDeps = ./deps.json; + + # This csproj picks its TFM via `$(RuntimeIdentifier.StartsWith('linux'))`. + # `dotnet restore --runtime` does NOT set RuntimeIdentifier during project + # evaluation (only build/publish do), so pass it as a property or restore + # targets net9.0-windows and fails with NETSDK1100. + dotnetRestoreFlags = [ + "-p:RuntimeIdentifier=${dotnetCorePackages.systemToDotnetRid stdenv.hostPlatform.system}" + ]; + + dotnet-sdk = dotnetCorePackages.sdk_9_0; + + executables = [ "VRCNext" ]; + + nativeBuildInputs = [ + wrapGAppsHook3 + copyDesktopItems + ]; + + # gdk-pixbuf so wrapGAppsHook3 emits GDK_PIXBUF_MODULE_FILE (GTK file + # dialogs via libnfd.so need icon loaders). + buildInputs = [ gdk-pixbuf ]; + + # buildDotnetModule already wraps with makeWrapper (dotnetFixupPhase); + # fold the gapps args in there instead of double-wrapping. + dontWrapGApps = true; + + # Prebuilt native libs (Photino.Native.so, libnfd.so, libSkiaSharp.so) + # have no RUNPATH; these get suffixed onto LD_LIBRARY_PATH. + runtimeDeps = [ + webkitgtk_4_1 + gtk3 + glib + gdk-pixbuf + libnotify + fontconfig + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-libav + ]; + + makeWrapperArgs = [ + # WebKitGTK's web process dies on Wayland with "Error 71 (Protocol + # error) dispatching to Wayland display" when the DMA-BUF renderer + # handshake fails (well-known NixOS issue); disable it. + "--set" + "WEBKIT_DISABLE_DMABUF_RENDERER" + "1" + # WebKitGTK discovers gstreamer plugins via the plugin path, not LD_LIBRARY_PATH. + "--prefix" + "GST_PLUGIN_SYSTEM_PATH" + ":" + (lib.makeSearchPath "lib/gstreamer-1.0" [ + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-libav + ]) + # The app shells out to zenity (dialogs) and notify-send (libnotify). + "--prefix" + "PATH" + ":" + (lib.makeBinPath [ + zenity + libnotify + ]) + ]; + + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + + postInstall = '' + install -Dm644 "$src/frontend/logo.png" "$out/share/icons/hicolor/512x512/apps/vrcnext.png" + ''; + + desktopItems = [ + (makeDesktopItem { + name = "vrcnext"; + exec = "VRCNext %u"; + icon = "vrcnext"; + comment = "VRChat companion app"; + desktopName = "VRCNext"; + categories = [ + "Game" + "Utility" + "Network" + ]; + mimeTypes = [ "x-scheme-handler/vrcn" ]; + startupWMClass = "VRCNext"; + }) + ]; + + meta = { + description = "VRChat launcher and management system"; + homepage = "https://github.com/shinyflvre/VRCNext"; + license = { + fullName = "VRCNext Non-Commercial Open Source License (VNCOL) 1.0"; + shortName = "vncol"; + url = "https://github.com/shinyflvre/VRCNext/blob/master/LICENSE"; + free = false; + }; + mainProgram = "VRCNext"; + platforms = [ "x86_64-linux" ]; + }; +}