Binary distributed MoonBit toolchains.
NOTE: moonbit-compiler was already open sourced, BUT only wasm-gc backend is available. Considering this is an incomplete compiler and the version is quite lagging, this project will still only be able to use patched pre-built binaries for a long time.
Run moon in one line
nix run github:jetjinser/moonbit-overlay#moon
nix run github:jetjinser/moonbit-overlay#<tab>
nix flake init -t github:jetjinser/moonbit-overlay
- build from source in future.
- versioning!
- patchelf works :)
{
description = "A startup basic MoonBit project";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
devshell.url = "github:numtide/devshell";
moonbit-overlay.url = "github:jetjinser/moonbit-overlay";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.devshell.flakeModule
];
perSystem = { inputs', system, pkgs, ... }: {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ inputs.moonbit-overlay.overlays.default ];
};
devshells.default = {
packages = with pkgs; [
moonbit-bin.moonbit.latest
moonbit-bin.lsp.latest
];
};
};
systems = [
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
};
}
moonbit-bin.moonbit.latest
MoonBit LSP (extracted from moonbit-lang vscode extension)
moonbit-bin.lsp.latest
moonbit-bin.moonbit.latest
moonbit-bin.moonbit.v0_1_20241031-7204facb6
Check available versions in the directory.
The original version of MoonBit is written as
v0.1.20241031+7204facb6
, for convenience, we escape it to format likev0_1_20241031-7204facb6
.
- overridable
- build from source (core)
- re-support legacy default.nix
The moonbit-overlay is heavily inspired by rust-overlay.