Skip to content

fix: make sure export directory is writable#9941

Open
skaphi wants to merge 1 commit into
marimo-team:mainfrom
skaphi:writable_fix
Open

fix: make sure export directory is writable#9941
skaphi wants to merge 1 commit into
marimo-team:mainfrom
skaphi:writable_fix

Conversation

@skaphi

@skaphi skaphi commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

📝 Summary

Closes #9940

On NixOS packages are stored in read only directory /nix/store and during wasm export marimo copies files from there but keeps the read only permissions. This fixes so that copied files explicitly get the right permissions.

📋 Pre-Review Checklist

  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it.
  • Video or media evidence is provided for any visual changes (optional).

✅ Merge Checklist

  • I have read the contributor guidelines.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Tests have been added for the changes made.

Review in cubic

@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jun 20, 2026 1:11pm

Request Review

@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@skaphi

skaphi commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

ignore=(shutil.ignore_patterns("index.html")),
)
# Ensure output is writable (source may be read-only, e.g. nix store)
for root, _dirs, files in os.walk(dirpath):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not just bail if RO? This attempts to modify the permissions- which I don't think will solve your Nix issue

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does solve the issue I reported. It only modifies permissions of copied files, not in nix store. I dont love this solution either but could not think of much cleaner solution. Ideally python should have a function like shutil.copytree but ignored copied from permissions and always makes destination files writable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

export wasm fails on NixOS

2 participants