Skip to content

mojo-bin: init at 1.0.0 - #559250

Merged
samuela merged 1 commit into
NixOS:masterfrom
samuela:mojo-init-1.0.0
Sep 17, 2026
Merged

samuela merged 1 commit into
NixOS:masterfrom
samuela:mojo-init-1.0.0

Conversation

@samuela

@samuela samuela commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

Package Modular's official stable Mojo 1.0.0 release as mojo-bin (the executable remains mojo) from fixed-output PyPI wheels for x86_64-linux and aarch64-linux.

Note that unlike #557600, this derivation is conservatively unfree and contains upstream binary/bytecode artifacts, but provides the released toolchain, both published Linux architectures, and CUDA/MAX functionality. The source-built proposal is free, x86_64-only, tracks a post-release snapshot, but does not have GPU/MAX support. I wasn't aware of #557600 when starting this. Would be worth having some discussion as to which direction we want to go. Assuming GPU/MAX support could be added to the source build I think that would be the clear winner. Done, decided to keep separate mojo and mojo-bin packages. See #557600 (comment).

The package combines Mojo's compiler, standard library, LLDB/LSP tooling, formatter, and the minimal MAX runtime required for accelerator compilation. Optional distributed MAX SHMEM and NIXL transport plugins are not included for now.

Homepage: https://www.modular.com/mojo

Validation included:

  • Building the package and all seven passthru tests on x86_64-linux.
  • Interpreted and compiled CPU programs, real CUDA PTX generation, LLDB/LSP/DAP initialization, formatting, driver RUNPATH inspection, and no-GPU behavior.
  • A complete AArch64 cross-build and inspection of its ELF files and driver RUNPATHs. Did not run on AArch64.
  • Before the package-name-only rename to mojo-bin, GPU/MAX support was tested on an RTX 4090 with NVIDIA driver 595.71.05: the exact package output detected nvidia:sm_89 and executed a Mojo GPU kernel with output 0 while LD_LIBRARY_PATH was unset.

The package is marked unfree and records both native-code and bytecode source provenance.

Things done

@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (new) This PR adds a new package 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. llm-assisted Contributions that include code generation with LLMs labels Sep 2, 2026
@samuela
samuela marked this pull request as ready for review September 2, 2026 19:25
@samuela

samuela commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

cc @Awayfaring

@nixpkgs-ci nixpkgs-ci Bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Sep 2, 2026
@samuela
samuela marked this pull request as draft September 2, 2026 20:31
@nixpkgs-ci nixpkgs-ci Bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Sep 2, 2026
@samuela
samuela marked this pull request as ready for review September 2, 2026 23:37
@nixpkgs-ci nixpkgs-ci Bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Sep 2, 2026
@hnkNkm hnkNkm mentioned this pull request Sep 4, 2026
10 tasks
@samuela samuela changed the title mojo: init at 1.0.0 mojo-bin: init at 1.0.0 Sep 10, 2026
@samuela
samuela requested a review from a team September 10, 2026 13:42
@nixpkgs-ci nixpkgs-ci Bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Sep 10, 2026
@GaetanLepage GaetanLepage self-assigned this Sep 10, 2026
@GaetanLepage

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 559250
Commit: 3f83d17bae4bdf8ba3fd16cea12a36d3436aef58


x86_64-linux

✅ 1 package built:
  • mojo-bin

aarch64-linux

✅ 1 package built:
  • mojo-bin

Comment thread pkgs/by-name/mo/mojo-bin/package.nix Outdated

@zinzilulo zinzilulo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you so much for packaging this! With a few small tweaks, this derivation should also work on aarch64-darwin. If we could include Darwin support in the initial release, that would be very convenient.

Comment thread pkgs/by-name/mo/mojo-bin/package.nix
Comment thread pkgs/by-name/mo/mojo-bin/update.sh Outdated
Comment thread pkgs/by-name/mo/mojo-bin/update.sh Outdated
Comment thread pkgs/by-name/mo/mojo-bin/update.sh Outdated
Comment thread pkgs/by-name/mo/mojo-bin/update.sh
Comment thread pkgs/by-name/mo/mojo-bin/package.nix Outdated
Comment thread pkgs/by-name/mo/mojo-bin/package.nix Outdated
Comment thread pkgs/by-name/mo/mojo-bin/package.nix Outdated
@samuela

samuela commented Sep 12, 2026

Copy link
Copy Markdown
Member Author

@zinzilulo I do not run aarch64-darwin and so I cannot maintain it, but if you would like to maintain aarch64-darwin for this package I would welcome that. If you want to go that route I propose that you add aarch64-darwin in a follow-up PR in the interest of keeping PRs small and bc I can't develop/test it.

@zinzilulo

Copy link
Copy Markdown
Contributor

@zinzilulo I do not run aarch64-darwin and so I cannot maintain it, but if you would like to maintain aarch64-darwin for this package I would welcome that. If you want to go that route I propose that you add aarch64-darwin in a follow-up PR in the interest of keeping PRs small and bc I can't develop/test it.

My hope was to include aarch64-darwin support in the initial PR so that it could merge as a complete change and avoid an additional review cycle. The changes needed for Darwin are relatively small and mostly limited to names and platform strings rather than Darwin-specific details. I’ve also already tested the resulting artifacts and functionality on Darwin.

That said, I agree that splitting it into a follow-up PR would make the scope of this PR more manageable. As for the current state of the PR, I’ve built the tests on aarch64-linux and tested both the compiler and REPL, so the packaging itself should be good to go.

@samuela

samuela commented Sep 12, 2026

Copy link
Copy Markdown
Member Author

ok if you've already tested this, that's fine by me. i applied all suggestions

@zinzilulo zinzilulo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the changes. I noticed a mistake in the previous patch, and the lock file didn’t include aarch64-darwin. Fixing these issues should get the CI to green.

Comment thread pkgs/by-name/mo/mojo-bin/update.sh
Comment thread pkgs/by-name/mo/mojo-bin/sources.json
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Sep 13, 2026
@samuela

samuela commented Sep 17, 2026

Copy link
Copy Markdown
Member Author

i'll proceed to merge tomorrow unless anyone objects?

@zinzilulo

Copy link
Copy Markdown
Contributor

i'll proceed to merge tomorrow unless anyone objects?

Can you squash all commits to one or just the latest two to mojo-bin: add aarch64-darwin support per commit conventions?

@GaetanLepage GaetanLepage left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, please squash the commits

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Sep 17, 2026
Package Modular's official stable Mojo 1.0.0 release from fixed-output
PyPI wheels under the mojo-bin attribute, while preserving upstream's mojo
executable and wheel names. This complements the source-built, CPU-only mojo
package with the released binary toolchain and accelerator support.

Install the compiler, standard library, LLDB integration, formatter, and the
minimal MAX core and Mojo libraries needed for accelerator compilation into
one wheel-compatible prefix. Patch bundled Linux ELF objects and add the
NixOS driver-link RUNPATH so CUDA can be discovered without relying on
LD_LIBRARY_PATH; keep platform-specific patching and LLDB library naming
compatible with Apple Silicon Darwin.

Keep optional distributed transports out of scope: omit MAX SHMEM, which is
not published for aarch64-linux, and remove NIXL's UCX, libfabric, RDMA, and
ROCm transport plugins while retaining the core library required by libmax.

Mark the package unfree with native-code and bytecode provenance. Support the
official x86_64-linux, aarch64-linux, and aarch64-darwin wheels, documenting
the Linux x86-64-v3 and Neoverse N1 CPU floors. Include an updater that keeps
platform-specific wheels and synchronized Mojo/MAX dependencies pinned, plus
passthru coverage for version reporting, interpreted and compiled code, CUDA
code generation, driver RUNPATHs, no-GPU behavior, debugger/LSP tooling, and
formatting.

As an unusual one-off validation, the packaged Linux payload was exercised
on an RTX 4090 with driver 595.71.05. It detected nvidia:sm_89 and ran a
one-thread kernel with output 0 while LD_LIBRARY_PATH was unset, confirming
NixOS driver-link semantics.

Co-authored-by: Ken Lin <214774502+zinzilulo@users.noreply.github.com>
Assisted-by: Pi coding agent (OpenAI gpt-5.6-sol)
@samuela
samuela added this pull request to the merge queue Sep 17, 2026
Merged via the queue into NixOS:master with commit 1c0985e Sep 17, 2026
26 checks passed
@samuela
samuela deleted the mojo-init-1.0.0 branch September 17, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants