dot

vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks

a778c80

OpenDeck plugins: Node.js on its PATH, nix-ld for prebuilt binaries

By Gustaf Granström

Redline (CPU, clock, etc.) is a Node.js plugin and found no `node`;
Starter Pack and the Discord plugin are generic-Linux binaries that need
a /lib64 loader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

2 files changed +18 −2

@@ -39,6 +39,17 @@
3939 # Lets your user open the Stream Deck (40-streamdeck.rules on CachyOS).
4040 services.udev.packages = [ pkgs.opendeck ];
4141
42+ # Plugins installed from OpenDeck's store (Starter Pack, Discord) are prebuilt
43+ # generic-Linux binaries; nix-ld gives them a /lib64 loader and their libraries.
44+ programs.nix-ld = {
45+ enable = true;
46+ libraries = with pkgs; [
47+ stdenv.cc.cc.lib # libgcc_s
48+ libxkbcommon
49+ openssl
50+ ];
51+ };
52+
4253 # --- Flatpak --------------------------------------------------------------------
4354
4455 # Flatpak with Flathub, for apps that are only published there. Nothing is
@@ -13,6 +13,7 @@
1313 libayatana-appindicator,
1414 libsoup_3,
1515 glib-networking,
16+ nodejs,
1617 }:
1718
1819 stdenv.mkDerivation (finalAttrs: {
@@ -47,9 +48,13 @@
4748 runHook postInstall
4849 '';
4950
50- # The tray icon library is opened with dlopen.
51+ # The tray icon library is opened with dlopen. Node.js plugins (Redline) are
52+ # started with whatever `node` is on PATH.
5153 preFixup = ''
52- gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libayatana-appindicator ]})
54+ gappsWrapperArgs+=(
55+ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libayatana-appindicator ]}
56+ --suffix PATH : ${lib.makeBinPath [ nodejs ]}
57+ )
5358 '';
5459
5560 meta = {