diff --git a/quixos-package-helpers.nix b/quixos-package-helpers.nix index 44e9c5b..4a593b1 100644 --- a/quixos-package-helpers.nix +++ b/quixos-package-helpers.nix @@ -611,6 +611,15 @@ EOF else '' runHook preInstall install -Dm755 ${lib.escapeShellArg serverFile} "$out/libexec/${serverLibexecName}/${serverFile}" + # Browser entrypoints are runtime artifacts too. Package build scripts + # conventionally emit them as top-level .mjs files in dist/. Install + # the complete set so adding an entrypoint cannot produce a descriptor + # that resolves successfully but fails when Web Studio opens the file. + for browserModule in dist/*.mjs; do + if [ -f "$browserModule" ]; then + install -Dm644 "$browserModule" "$out/libexec/${serverLibexecName}/$(basename "$browserModule")" + fi + done ${lib.concatMapStringsSep "\n" installExtraFile extraFiles} mkdir -p "$out/bin" cat > "$out/bin/${serverBin}" <