diff --git a/home-manager/fred.nix b/home-manager/fred.nix index 69a5172..b3276d8 100644 --- a/home-manager/fred.nix +++ b/home-manager/fred.nix @@ -51,7 +51,18 @@ in # mutableExtensionsDir keeps GUI-installed extensions working. programs.vscode = lib.mkIf isDesktop { enable = true; - package = pkgs.vscodium; + # Wrap codium so user-installed extension native addons (.node files from + # npm) can find libstdc++.so.6 — those binaries have empty RPATHs and + # Electron's patched interpreter won't pick up nix-ld's stubs. + package = pkgs.symlinkJoin { + name = "vscodium"; + paths = [ pkgs.vscodium ]; + nativeBuildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/codium \ + --prefix LD_LIBRARY_PATH : "${pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc.lib ]}" + ''; + }; mutableExtensionsDir = true; profiles.default.userSettings = { "window.menuBarVisibility" = "compact"; diff --git a/hosts/FredOS-Gaming.nix b/hosts/FredOS-Gaming.nix index 0fd3805..a463314 100644 --- a/hosts/FredOS-Gaming.nix +++ b/hosts/FredOS-Gaming.nix @@ -26,6 +26,9 @@ ]; programs.nix-ld.enable = true; + programs.nix-ld.libraries = with pkgs; [ + stdenv.cc.cc.lib # libstdc++.so.6 — needed by VSCodium extension native addons (e.g. sqlite3 in Continue) + ]; programs.steam = { enable = true;