From 10346eb51aecc8935faf5d1cadf99f3a11594e9c Mon Sep 17 00:00:00 2001 From: Harinn Date: Thu, 5 Feb 2026 16:06:54 +0700 Subject: [PATCH 1/4] goofcord: 1.7.1 -> 2.0.1 --- pkgs/by-name/go/goofcord/node-modules.nix | 57 +++++++++++++++++ pkgs/by-name/go/goofcord/package.nix | 74 ++++++++++++++--------- 2 files changed, 103 insertions(+), 28 deletions(-) create mode 100644 pkgs/by-name/go/goofcord/node-modules.nix diff --git a/pkgs/by-name/go/goofcord/node-modules.nix b/pkgs/by-name/go/goofcord/node-modules.nix new file mode 100644 index 0000000000000..ed0f91e50b375 --- /dev/null +++ b/pkgs/by-name/go/goofcord/node-modules.nix @@ -0,0 +1,57 @@ +# fixed output derivation for node_modules +{ + lib, + stdenvNoCC, + goofcord, + bun, + writableTmpDirAsHomeHook, +}: +stdenvNoCC.mkDerivation { + inherit (goofcord) version src; + pname = goofcord.pname + "-modules"; + + impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [ + "GIT_PROXY_COMMAND" + "SOCKS_SERVER" + ]; + + nativeBuildInputs = [ + bun + writableTmpDirAsHomeHook + ]; + + dontConfigure = true; + dontFixup = true; + + buildPhase = '' + runHook preBuild + + export BUN_INSTALL_CACHE_DIR=$(mktemp -d) + + bun install \ + --frozen-lockfile \ + --ignore-scripts \ + --linker=hoisted \ + --no-progress + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + cp -R ./node_modules $out + + runHook postInstall + ''; + + outputHash = + { + x86_64-linux = "sha256-rSK+YiVwc2BPqOIS4U0nZ/iI7GuBv1LNhWqbEPBSA9s="; + aarch64-linux = "sha256-v7b9ww3LML50dqpaktmMU1WNJC/rcR54u07TtqqzC+g="; + } + .${stdenvNoCC.hostPlatform.system} + or (throw "Unsupported system ${stdenvNoCC.hostPlatform.system}"); + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; +} diff --git a/pkgs/by-name/go/goofcord/package.nix b/pkgs/by-name/go/goofcord/package.nix index 1e53cb891323c..90c5083312fff 100644 --- a/pkgs/by-name/go/goofcord/package.nix +++ b/pkgs/by-name/go/goofcord/package.nix @@ -1,38 +1,36 @@ { lib, stdenv, + callPackage, fetchFromGitHub, - pnpm_9, - fetchPnpmDeps, - pnpmConfigHook, - nodejs_22, + bun, + nodejs_24, nix-update-script, electron, pipewire, libpulseaudio, + libxkbcommon, + libX11, + libxcb, + libXtst, makeShellWrapper, makeDesktopItem, copyDesktopItems, }: - -let - pnpm = pnpm_9.override { nodejs = nodejs_22; }; -in stdenv.mkDerivation (finalAttrs: { pname = "goofcord"; - version = "1.7.1"; + version = "2.0.1"; src = fetchFromGitHub { owner = "Milkshiift"; repo = "GoofCord"; rev = "v${finalAttrs.version}"; - hash = "sha256-fx/RKnUhXhaWVd/KYPVxr19/Q8o1ovm2TgMTcTYjE3Q="; + hash = "sha256-c/NDju5K4DnKLZjE0ZD0TSpm5YWhZUXGmZs/AJhF7Jk="; }; nativeBuildInputs = [ - pnpmConfigHook - pnpm - nodejs_22 + bun + nodejs_24 makeShellWrapper copyDesktopItems ]; @@ -40,29 +38,44 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio pipewire + libxkbcommon + libX11 + libxcb + libXtst (lib.getLib stdenv.cc.cc) ]; - pnpmDeps = fetchPnpmDeps { - inherit (finalAttrs) pname version src; - inherit pnpm; - fetcherVersion = 3; - hash = "sha256-NKind57XDW7I5XNmjAu4cqkK5UVNAaKewpfOTNzF2BM="; - }; + node-modules = callPackage ./node-modules.nix { }; env = { ELECTRON_SKIP_BINARY_DOWNLOAD = 1; }; + configurePhase = '' + runHook preConfigure + + cp -R ${finalAttrs.node-modules} node_modules + patchShebangs node_modules/.bin + patchShebangs node_modules/@typescript/native-preview/bin + + runHook postConfigure + ''; + + preBuild = lib.optionalString stdenv.hostPlatform.isLinux '' + cp -r ${electron.dist} electron-dist + chmod -R u+w electron-dist + ''; + buildPhase = '' runHook preBuild - pnpm build + bun run build - npm exec electron-builder -- \ + node node_modules/electron-builder/out/cli/cli.js \ --dir \ - -c.electronDist="${electron.dist}" \ - -c.electronVersion="${electron.version}" + -c.electronDist="${if stdenv.hostPlatform.isLinux then "electron-dist" else electron.dist}" \ + -c.electronVersion="${electron.version}" \ + -c.npmRebuild=false runHook postBuild ''; @@ -73,13 +86,21 @@ stdenv.mkDerivation (finalAttrs: { mkdir -p "$out/share/lib/goofcord" cp -r ./dist/*-unpacked/{locales,resources{,.pak}} "$out/share/lib/goofcord" - install -Dm644 "build/icon.png" "$out/share/icons/hicolor/256x256/apps/goofcord.png" + install -Dm644 "assets/gf_icon.png" "$out/share/icons/hicolor/256x256/apps/goofcord.png" # use makeShellWrapper (instead of the makeBinaryWrapper provided by wrapGAppsHook3) for proper shell variable expansion # see https://github.com/NixOS/nixpkgs/issues/172583 makeShellWrapper "${lib.getExe electron}" "$out/bin/goofcord" \ --add-flags "$out/share/lib/goofcord/resources/app.asar" \ "''${gappsWrapperArgs[@]}" \ + --prefix LD_LIBRARY_PATH : "${ + lib.makeLibraryPath [ + libxkbcommon + libX11 + libxcb + libXtst + ] + }" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer --enable-wayland-ime=true}}" \ --set-default ELECTRON_IS_DEV 0 \ --inherit-argv0 @@ -121,10 +142,7 @@ stdenv.mkDerivation (finalAttrs: { downloadPage = "https://github.com/Milkshiift/GoofCord"; license = lib.licenses.osl3; maintainers = with lib.maintainers; [ nyabinary ]; - platforms = [ - "x86_64-linux" - "aarch64-linux" - ]; + platforms = lib.platforms.linux; mainProgram = "goofcord"; }; }) From 9445805d7e8d9219842be266724f92fa4395a193 Mon Sep 17 00:00:00 2001 From: Harinn Date: Mon, 9 Feb 2026 16:08:39 +0700 Subject: [PATCH 2/4] goofcord: build native modules from source --- pkgs/by-name/go/goofcord/node-modules.nix | 16 ++- pkgs/by-name/go/goofcord/package.nix | 46 ++++-- .../by-name/go/goofcord/rohrkabel-cmake.patch | 65 +++++++++ pkgs/by-name/go/goofcord/venbind-addon.nix | 79 ++++++++++ pkgs/by-name/go/goofcord/venmic-addon.nix | 135 ++++++++++++++++++ pkgs/by-name/go/goofcord/venmic-cmake.patch | 114 +++++++++++++++ 6 files changed, 435 insertions(+), 20 deletions(-) create mode 100644 pkgs/by-name/go/goofcord/rohrkabel-cmake.patch create mode 100644 pkgs/by-name/go/goofcord/venbind-addon.nix create mode 100644 pkgs/by-name/go/goofcord/venmic-addon.nix create mode 100644 pkgs/by-name/go/goofcord/venmic-cmake.patch diff --git a/pkgs/by-name/go/goofcord/node-modules.nix b/pkgs/by-name/go/goofcord/node-modules.nix index ed0f91e50b375..110653c967b4e 100644 --- a/pkgs/by-name/go/goofcord/node-modules.nix +++ b/pkgs/by-name/go/goofcord/node-modules.nix @@ -1,12 +1,13 @@ # fixed output derivation for node_modules { lib, - stdenvNoCC, + stdenv, goofcord, bun, + nodejs, writableTmpDirAsHomeHook, }: -stdenvNoCC.mkDerivation { +stdenv.mkDerivation { inherit (goofcord) version src; pname = goofcord.pname + "-modules"; @@ -17,6 +18,7 @@ stdenvNoCC.mkDerivation { nativeBuildInputs = [ bun + nodejs writableTmpDirAsHomeHook ]; @@ -27,10 +29,11 @@ stdenvNoCC.mkDerivation { runHook preBuild export BUN_INSTALL_CACHE_DIR=$(mktemp -d) + export npm_config_build_from_source=true + export ELECTRON_SKIP_BINARY_DOWNLOAD=1 bun install \ --frozen-lockfile \ - --ignore-scripts \ --linker=hoisted \ --no-progress @@ -47,11 +50,10 @@ stdenvNoCC.mkDerivation { outputHash = { - x86_64-linux = "sha256-rSK+YiVwc2BPqOIS4U0nZ/iI7GuBv1LNhWqbEPBSA9s="; - aarch64-linux = "sha256-v7b9ww3LML50dqpaktmMU1WNJC/rcR54u07TtqqzC+g="; + x86_64-linux = "sha256-NjZw+B/Ml5tZAiegqsxyxzM4H/UL/Dlkl1GyO3hchEU="; + aarch64-linux = "sha256-+i1d+ii4KUxNT/R1jfr2ttg7R52e4t9N1r44vlGegz4="; } - .${stdenvNoCC.hostPlatform.system} - or (throw "Unsupported system ${stdenvNoCC.hostPlatform.system}"); + .${stdenv.hostPlatform.system} or (throw "Unsupported system ${stdenv.hostPlatform.system}"); outputHashAlgo = "sha256"; outputHashMode = "recursive"; } diff --git a/pkgs/by-name/go/goofcord/package.nix b/pkgs/by-name/go/goofcord/package.nix index 90c5083312fff..19d4f16947a68 100644 --- a/pkgs/by-name/go/goofcord/package.nix +++ b/pkgs/by-name/go/goofcord/package.nix @@ -5,18 +5,27 @@ fetchFromGitHub, bun, nodejs_24, - nix-update-script, electron, - pipewire, - libpulseaudio, libxkbcommon, - libX11, + libx11, libxcb, - libXtst, + libxtst, makeShellWrapper, makeDesktopItem, copyDesktopItems, }: +let + venbindAddon = callPackage ./venbind-addon.nix { }; + venmicAddon = callPackage ./venmic-addon.nix { }; + + venmicPrebuildDir = + if stdenv.hostPlatform.isAarch64 then "venmic-addon-linux-arm64" else "venmic-addon-linux-x64"; + + venbindPrebuildDir = if stdenv.hostPlatform.isAarch64 then "linux-aarch64" else "linux-x86_64"; + + venbindPrebuildFile = + if stdenv.hostPlatform.isAarch64 then "venbind-linux-aarch64.node" else "venbind-linux-x86_64.node"; +in stdenv.mkDerivation (finalAttrs: { pname = "goofcord"; version = "2.0.1"; @@ -36,16 +45,14 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ - libpulseaudio - pipewire libxkbcommon - libX11 + libx11 libxcb - libXtst + libxtst (lib.getLib stdenv.cc.cc) ]; - node-modules = callPackage ./node-modules.nix { }; + node-modules = callPackage ./node-modules.nix { nodejs = nodejs_24; }; env = { ELECTRON_SKIP_BINARY_DOWNLOAD = 1; @@ -55,9 +62,21 @@ stdenv.mkDerivation (finalAttrs: { runHook preConfigure cp -R ${finalAttrs.node-modules} node_modules + chmod -R u+w node_modules patchShebangs node_modules/.bin patchShebangs node_modules/@typescript/native-preview/bin + # Replace vendored venmic prebuilds with Nix-built addon + rm -rf node_modules/@vencord/venmic/prebuilds + mkdir -p node_modules/@vencord/venmic/prebuilds/${venmicPrebuildDir} + cp ${venmicAddon}/venmic.node \ + node_modules/@vencord/venmic/prebuilds/${venmicPrebuildDir}/node-napi-v7.node + + rm -rf node_modules/venbind/prebuilds + mkdir -p node_modules/venbind/prebuilds/${venbindPrebuildDir} + cp ${venbindAddon}/venbind.node \ + node_modules/venbind/prebuilds/${venbindPrebuildDir}/${venbindPrebuildFile} + runHook postConfigure ''; @@ -96,9 +115,9 @@ stdenv.mkDerivation (finalAttrs: { --prefix LD_LIBRARY_PATH : "${ lib.makeLibraryPath [ libxkbcommon - libX11 + libx11 libxcb - libXtst + libxtst ] }" \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer --enable-wayland-ime=true}}" \ @@ -133,7 +152,8 @@ stdenv.mkDerivation (finalAttrs: { ]; passthru = { - updateScript = nix-update-script { }; + # This will likely failed due to multiple layer of deps. + # updateScript = nix-update-script { }; }; meta = { diff --git a/pkgs/by-name/go/goofcord/rohrkabel-cmake.patch b/pkgs/by-name/go/goofcord/rohrkabel-cmake.patch new file mode 100644 index 0000000000000..503b8a7478c2f --- /dev/null +++ b/pkgs/by-name/go/goofcord/rohrkabel-cmake.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b0b9d32..67b930a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -82,32 +82,26 @@ target_include_directories(${PROJECT_NAME} PRIVATE "include/rohrkabel") + # Setup Dependencies + # -------------------------------------------------------------------------------------------------------- + +-include("cmake/cpm.cmake") ++if (NOT DEFINED TL_EXPECTED_SOURCE_DIR) ++ message(FATAL_ERROR "[rohrkabel] TL_EXPECTED_SOURCE_DIR must be set to a local checkout") ++endif() + +-CPMFindPackage( +- NAME tl-expected +- VERSION 1.1.0 +- GIT_REPOSITORY "https://github.com/TartanLlama/expected" +- OPTIONS "EXPECTED_BUILD_TESTS OFF" +-) ++if (NOT DEFINED EREIGNIS_SOURCE_DIR) ++ message(FATAL_ERROR "[rohrkabel] EREIGNIS_SOURCE_DIR must be set to a local checkout") ++endif() + +-CPMFindPackage( +- NAME ereignis +- VERSION 3.1 +- GIT_REPOSITORY "https://github.com/Curve/ereignis" +-) ++if (NOT DEFINED BOOST_CALLABLE_TRAITS_SOURCE_DIR) ++ message(FATAL_ERROR "[rohrkabel] BOOST_CALLABLE_TRAITS_SOURCE_DIR must be set to a local checkout") ++endif() + +-CPMFindPackage( +- NAME boost_callable_traits +- GIT_TAG boost-1.85.0 +- GIT_REPOSITORY "https://github.com/boostorg/callable_traits" +-) ++if (NOT DEFINED CHANNEL_SOURCE_DIR) ++ message(FATAL_ERROR "[rohrkabel] CHANNEL_SOURCE_DIR must be set to a local checkout") ++endif() + +-CPMFindPackage( +- NAME channel +- VERSION 2.3 +- GIT_REPOSITORY "https://github.com/Curve/channel" +-) ++add_subdirectory("${TL_EXPECTED_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/rohrkabel-tl-expected") ++add_subdirectory("${EREIGNIS_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/rohrkabel-ereignis") ++add_subdirectory("${BOOST_CALLABLE_TRAITS_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/rohrkabel-boost-callable-traits") ++add_subdirectory("${CHANNEL_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/rohrkabel-channel") + + target_link_libraries(${PROJECT_NAME} PUBLIC tl::expected cr::ereignis Boost::callable_traits cr::channel) + +diff --git a/src/core.cpp b/src/core.cpp +index 77a57bd..917e491 100644 +--- a/src/core.cpp ++++ b/src/core.cpp +@@ -9,6 +9,7 @@ + + #include + #include ++#include + + #include + diff --git a/pkgs/by-name/go/goofcord/venbind-addon.nix b/pkgs/by-name/go/goofcord/venbind-addon.nix new file mode 100644 index 0000000000000..e496e354ad961 --- /dev/null +++ b/pkgs/by-name/go/goofcord/venbind-addon.nix @@ -0,0 +1,79 @@ +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + cmake, + pkg-config, + llvmPackages, + libx11, + libxtst, + libxdmcp, + libxkbfile, + libxkbcommon, + libxcb, + wayland, + xorgproto, +}: +let + venbindVersion = "0.1.7"; +in +rustPlatform.buildRustPackage { + pname = "venbind"; + version = venbindVersion; + + src = fetchFromGitHub { + owner = "tuxinal"; + repo = "venbind"; + rev = "v${venbindVersion}"; + hash = "sha256-6gPyQ6JjqvM2AUuIxCfO0nOLJfyQTX5bbsbKDzlNSqo="; + fetchSubmodules = true; + }; + + cargoHash = "sha256-FZTXj8f+ezRhElovKhF3khWc5SqC+22tDHlFe9IHuwo="; + + nativeBuildInputs = [ + pkg-config + cmake + ]; + + buildInputs = [ + llvmPackages.libclang + libx11 + libxtst + libxdmcp + libxkbfile + libxkbcommon + libxcb + wayland + xorgproto + ]; + + LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; + BINDGEN_EXTRA_CLANG_ARGS = lib.concatStringsSep " " [ + "-I${stdenv.cc.libc.dev}/include" + "-I${xorgproto}/include" + "-I${libx11.dev}/include" + "-I${libxdmcp.dev}/include" + "-I${libxcb.dev}/include" + "-I${libxkbcommon.dev}/include" + "-I${libxkbfile.dev}/include" + ]; + + doCheck = false; + + installPhase = '' + runHook preInstall + + addon=$(find target -path "*/release/*" \( -name "*.node" -o -name "libvenbind.so" \) | head -n1) + if [ -z "$addon" ]; then + echo "venbind: native output not found" >&2 + exit 1 + fi + + mkdir -p $out + cp "$addon" $out/venbind.node + + runHook postInstall + ''; +} diff --git a/pkgs/by-name/go/goofcord/venmic-addon.nix b/pkgs/by-name/go/goofcord/venmic-addon.nix new file mode 100644 index 0000000000000..9dd15c83f32ef --- /dev/null +++ b/pkgs/by-name/go/goofcord/venmic-addon.nix @@ -0,0 +1,135 @@ +{ + lib, + stdenv, + applyPatches, + fetchFromGitHub, + cmake, + ninja, + pkg-config, + nodejs_24, + pipewire, + libpulseaudio, + range-v3, + glaze, + spdlog, + fmt, + openssl, +}: +let + venmicVersion = "6.1.0"; + + venmicSrc = fetchFromGitHub { + owner = "Vencord"; + repo = "venmic"; + rev = "v${venmicVersion}"; + hash = "sha256-0UP8a2bfhWGsB2Lg/GeIBu4zw1zHnXbitT8vU+DLeEY="; + }; + + rohrkabelSrc = fetchFromGitHub { + owner = "Curve"; + repo = "rohrkabel"; + rev = "v7.0"; + hash = "sha256-XlpLYTCtV5gzmv3w/7gRtkf4JGgSrWH/Laenxmd5Pj8="; + }; + + rohrkabelSrcPatched = applyPatches { + name = "rohrkabel-src-patched"; + src = rohrkabelSrc; + patches = [ ./rohrkabel-cmake.patch ]; + }; + + channelSrc = fetchFromGitHub { + owner = "Curve"; + repo = "channel"; + rev = "v2.3"; + hash = "sha256-lU4QdShUP64Tie5o7rh7rkGlHgiMcPaLWaczkVTl+Jc="; + }; + + ereignisSrc = fetchFromGitHub { + owner = "Curve"; + repo = "ereignis"; + rev = "v3.1"; + hash = "sha256-1vP9gnC+Gzj07NabKPUSJdbbqLpvHwmXoAh+htZxnu8="; + }; + + boostCallableTraitsSrc = fetchFromGitHub { + owner = "boostorg"; + repo = "callable_traits"; + rev = "boost-1.85.0"; + hash = "sha256-XbO+SB5QhKAJigL/SBl9OIIQl49u6pUuqAMguU8SftQ="; + }; + + tlExpectedSrc = fetchFromGitHub { + owner = "TartanLlama"; + repo = "expected"; + rev = "v1.1.0"; + hash = "sha256-AuRU8VI5l7Th9fJ5jIc/6mPm0Vqbbt6rY8QCCNDOU50="; + }; + + nodeAddonApi = fetchFromGitHub { + owner = "nodejs"; + repo = "node-addon-api"; + rev = "v8.0.0"; + hash = "sha256-k3v8lK7uaEJvcaj1sucTjFZ6+i5A6w/0Uj9rYlPhjCE="; + }; + + cmakeDeps = [ + range-v3 + glaze + spdlog + fmt + ]; +in +stdenv.mkDerivation { + pname = "venmic-addon"; + version = venmicVersion; + + src = venmicSrc; + patches = [ ./venmic-cmake.patch ]; + + nativeBuildInputs = [ + cmake + ninja + pkg-config + ]; + + buildInputs = [ + nodejs_24 + pipewire + libpulseaudio + openssl + ] + ++ cmakeDeps; + + cmakeFlags = [ + "-Dvenmic_addon=ON" + "-Dvenmic_server=OFF" + "-Dvenmic_prefer_remote=OFF" + "-DTL_EXPECTED_SOURCE_DIR=${tlExpectedSrc}" + "-DROHRKABEL_SOURCE_DIR=${rohrkabelSrcPatched}" + "-DCHANNEL_SOURCE_DIR=${channelSrc}" + "-DEREIGNIS_SOURCE_DIR=${ereignisSrc}" + "-DBOOST_CALLABLE_TRAITS_SOURCE_DIR=${boostCallableTraitsSrc}" + "-DCMAKE_JS_INC=${nodejs_24}/include/node;${nodeAddonApi}" + "-DOPENSSL_ROOT_DIR=${openssl}" + ]; + + preConfigure = '' + export CMAKE_PREFIX_PATH="${lib.makeSearchPath "lib/cmake" cmakeDeps}:${lib.makeSearchPath "share/cmake" cmakeDeps}" + ''; + + installPhase = '' + runHook preInstall + + addon=$(find . -name "*.node" -maxdepth 6 | head -n1) + if [ -z "$addon" ]; then + echo "venmic: addon output not found" >&2 + exit 1 + fi + + mkdir -p $out + cp "$addon" $out/venmic.node + + runHook postInstall + ''; +} diff --git a/pkgs/by-name/go/goofcord/venmic-cmake.patch b/pkgs/by-name/go/goofcord/venmic-cmake.patch new file mode 100644 index 0000000000000..8ceb1fda2caf9 --- /dev/null +++ b/pkgs/by-name/go/goofcord/venmic-cmake.patch @@ -0,0 +1,114 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index af314c0..277fe57 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -83,43 +83,14 @@ target_compile_definitions(${PROJECT_NAME} PUBLIC VENMIC_VERSION="${PROJECT_VERS + # Setup Dependencies + # -------------------------------------------------------------------------------------------------------- + +-include("cmake/cpm.cmake") +- +-CPMFindPackage( +- NAME rohrkabel +- VERSION 7.0 +- GIT_REPOSITORY "https://github.com/Curve/rohrkabel" +-) +- +-CPMFindPackage( +- NAME tl-expected +- VERSION 1.1.0 +- GIT_REPOSITORY "https://github.com/TartanLlama/expected" +-) +- +-CPMFindPackage( +- NAME channel +- VERSION 2.3 +- GIT_REPOSITORY "https://github.com/Curve/channel" +-) +- +-CPMFindPackage( +- NAME range-v3 +- GIT_TAG 0.12.0 +- GIT_REPOSITORY "https://github.com/ericniebler/range-v3" +-) +- +-CPMFindPackage( +- NAME glaze +- VERSION 2.6.8 +- GIT_REPOSITORY "https://github.com/stephenberry/glaze" +-) +- +-CPMFindPackage( +- NAME spdlog +- VERSION 1.14.1 +- GIT_REPOSITORY "https://github.com/gabime/spdlog" +-) ++if (NOT DEFINED ROHRKABEL_SOURCE_DIR) ++ message(FATAL_ERROR "[venmic] ROHRKABEL_SOURCE_DIR must be set to a local checkout") ++endif() ++ ++add_subdirectory("${ROHRKABEL_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/rohrkabel") ++find_package(range-v3 CONFIG REQUIRED) ++find_package(glaze CONFIG REQUIRED) ++find_package(spdlog CONFIG REQUIRED) + + target_link_libraries(${PROJECT_NAME} PUBLIC cr::rohrkabel tl::expected cr::channel glaze::glaze range-v3::meta spdlog::spdlog) + +@@ -148,8 +119,10 @@ endif() + # Setup Node Addon + # -------------------------------------------------------------------------------------------------------- + +-if (venmic_addon AND NOT CMAKE_JS_VERSION) +- message(FATAL_ERROR "[venmic] Please build the addon using CMake.js") ++if (venmic_addon) ++ if (NOT CMAKE_JS_INC) ++ message(FATAL_ERROR "[venmic] CMAKE_JS_INC must be set when building the addon without CMake.js") ++ endif() + endif() + + if (venmic_addon) +diff --git a/addon/CMakeLists.txt b/addon/CMakeLists.txt +index e5922ae..780631a 100644 +--- a/addon/CMakeLists.txt ++++ b/addon/CMakeLists.txt +@@ -29,13 +29,7 @@ target_sources(${PROJECT_NAME} PRIVATE ${src}) + # Setup Dependencies + # -------------------------------------------------------------------------------------------------------- + +-include("../cmake/cpm.cmake") +- +-CPMFindPackage( +- NAME range-v3 +- GIT_TAG 0.12.0 +- GIT_REPOSITORY "https://github.com/ericniebler/range-v3" +-) ++find_package(range-v3 CONFIG REQUIRED) + + target_link_libraries(${PROJECT_NAME} PUBLIC vencord::venmic range-v3::meta) + +diff --git a/src/patchbay.impl.cpp b/src/patchbay.impl.cpp +index deb9212..f3e0c0e 100644 +--- a/src/patchbay.impl.cpp ++++ b/src/patchbay.impl.cpp +@@ -6,6 +6,8 @@ + #include + #include + ++#include ++ + #include + #include + +@@ -393,7 +395,11 @@ namespace vencord + return on_node(id); + } + +- logger::get()->trace("[patchbay] (handle) workaround is active ({})", glz::write_json(options.workaround)); ++ auto workaround_json = glz::write_json(options.workaround); ++ logger::get()->trace( ++ "[patchbay] (handle) workaround is active ({})", ++ workaround_json.value_or(std::string("")) ++ ); + + if (!matches(options.workaround, props)) + { From 906ac192a158ca66aa9f38369781e473602f6491 Mon Sep 17 00:00:00 2001 From: Harinn Date: Thu, 19 Feb 2026 23:54:19 +0700 Subject: [PATCH 3/4] goofcord: add miniharinn as maintainer --- pkgs/by-name/go/goofcord/package.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/go/goofcord/package.nix b/pkgs/by-name/go/goofcord/package.nix index 19d4f16947a68..8adb8118a75a8 100644 --- a/pkgs/by-name/go/goofcord/package.nix +++ b/pkgs/by-name/go/goofcord/package.nix @@ -161,7 +161,10 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://github.com/Milkshiift/GoofCord"; downloadPage = "https://github.com/Milkshiift/GoofCord"; license = lib.licenses.osl3; - maintainers = with lib.maintainers; [ nyabinary ]; + maintainers = with lib.maintainers; [ + nyabinary + miniharinn + ]; platforms = lib.platforms.linux; mainProgram = "goofcord"; }; From 63887fee5fb8b61de54b9cdf45fc480778063bdb Mon Sep 17 00:00:00 2001 From: Harinn Date: Mon, 9 Mar 2026 17:18:29 +0700 Subject: [PATCH 4/4] goofcord: 2.0.1 -> 2.1.1 --- pkgs/by-name/go/goofcord/node-modules.nix | 4 ++-- pkgs/by-name/go/goofcord/package.nix | 29 +++++------------------ 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/pkgs/by-name/go/goofcord/node-modules.nix b/pkgs/by-name/go/goofcord/node-modules.nix index 110653c967b4e..7f1c749e5df9a 100644 --- a/pkgs/by-name/go/goofcord/node-modules.nix +++ b/pkgs/by-name/go/goofcord/node-modules.nix @@ -50,8 +50,8 @@ stdenv.mkDerivation { outputHash = { - x86_64-linux = "sha256-NjZw+B/Ml5tZAiegqsxyxzM4H/UL/Dlkl1GyO3hchEU="; - aarch64-linux = "sha256-+i1d+ii4KUxNT/R1jfr2ttg7R52e4t9N1r44vlGegz4="; + x86_64-linux = "sha256-faR2KW27lqilZUo24cR3uJCSW4+oy5EJRDjl+0SKYzk="; + aarch64-linux = "sha256-8QTACb9YEtMNDjJWCuMINrWQcMI7DU8qppBXHjvYjww="; } .${stdenv.hostPlatform.system} or (throw "Unsupported system ${stdenv.hostPlatform.system}"); outputHashAlgo = "sha256"; diff --git a/pkgs/by-name/go/goofcord/package.nix b/pkgs/by-name/go/goofcord/package.nix index 8adb8118a75a8..394102f5e17cc 100644 --- a/pkgs/by-name/go/goofcord/package.nix +++ b/pkgs/by-name/go/goofcord/package.nix @@ -17,24 +17,16 @@ let venbindAddon = callPackage ./venbind-addon.nix { }; venmicAddon = callPackage ./venmic-addon.nix { }; - - venmicPrebuildDir = - if stdenv.hostPlatform.isAarch64 then "venmic-addon-linux-arm64" else "venmic-addon-linux-x64"; - - venbindPrebuildDir = if stdenv.hostPlatform.isAarch64 then "linux-aarch64" else "linux-x86_64"; - - venbindPrebuildFile = - if stdenv.hostPlatform.isAarch64 then "venbind-linux-aarch64.node" else "venbind-linux-x86_64.node"; in stdenv.mkDerivation (finalAttrs: { pname = "goofcord"; - version = "2.0.1"; + version = "2.1.1"; src = fetchFromGitHub { owner = "Milkshiift"; repo = "GoofCord"; - rev = "v${finalAttrs.version}"; - hash = "sha256-c/NDju5K4DnKLZjE0ZD0TSpm5YWhZUXGmZs/AJhF7Jk="; + tag = "v${finalAttrs.version}"; + hash = "sha256-BC+Fu/sf1MO/zHkiDvKeoRhfUniWRpLPkyeEXTkYlkY="; }; nativeBuildInputs = [ @@ -56,6 +48,8 @@ stdenv.mkDerivation (finalAttrs: { env = { ELECTRON_SKIP_BINARY_DOWNLOAD = 1; + GOOFCORD_VENMIC_PATH = "${venmicAddon}/venmic.node"; + GOOFCORD_VENBIND_PATH = "${venbindAddon}/venbind.node"; }; configurePhase = '' @@ -66,17 +60,6 @@ stdenv.mkDerivation (finalAttrs: { patchShebangs node_modules/.bin patchShebangs node_modules/@typescript/native-preview/bin - # Replace vendored venmic prebuilds with Nix-built addon - rm -rf node_modules/@vencord/venmic/prebuilds - mkdir -p node_modules/@vencord/venmic/prebuilds/${venmicPrebuildDir} - cp ${venmicAddon}/venmic.node \ - node_modules/@vencord/venmic/prebuilds/${venmicPrebuildDir}/node-napi-v7.node - - rm -rf node_modules/venbind/prebuilds - mkdir -p node_modules/venbind/prebuilds/${venbindPrebuildDir} - cp ${venbindAddon}/venbind.node \ - node_modules/venbind/prebuilds/${venbindPrebuildDir}/${venbindPrebuildFile} - runHook postConfigure ''; @@ -88,7 +71,7 @@ stdenv.mkDerivation (finalAttrs: { buildPhase = '' runHook preBuild - bun run build + bun run build -- --skipTypecheck node node_modules/electron-builder/out/cli/cli.js \ --dir \