Summary
This issue tracks adding Nix flake support to FSL so users can install and run fslc without cloning or compiling manually.
What this adds
Enables nix run github:ymm-oss/fsl and nix profile add github:ymm-oss/fsl for users who already have Nix installed. The flake builds fslc (and fslc-lsp) from source with Z3 bundled in, with all inputs pinned in flake.lock. A devbox.json provides a reproducible development environment.
Current gap
The project documents three install routes — the install script, single-executable downloads from Releases, and developer setup from source. There is no one-command install path for users who already have Nix.
Proposed change
- Add
flake.nix using crane for crate vendoring (avoids crates.io 403 from Nix's fetchurl not sending a User-Agent header). Outputs: packages.fslc / .default / .source, apps.fslc / .default, devShells.default, overlays.default, and checks.
- Pin
x86_64-darwin to nixpkgs-26.05-darwin (nixpkgs-unstable 26.11 dropped x86_64-darwin support).
- Add
devbox.json for reproducible development environments (Rust toolchain + cmake + python3 for the vendored Z3 build).
- Update README install section to include Nix (Flakes) and Devbox instructions.
- Add
.github/workflows/nix.yml for CI validation of the flake.
Branch
feat-nix-package-manager-install on the fork: https://github.com/levonk/fsl/tree/feat-nix-package-manager-install
Verification
nix build .#fslc — succeeds
./result/bin/fslc --version — fslc 4.4.1
nix run .#default -- --version — fslc 4.4.1
fslc-lsp — responds correctly to LSP initialize (hover, completion, definition, references, documentSymbol, codeAction, rename, semanticTokens)
nix flake check --all-systems --no-build — all 4 systems evaluate
nix develop — devShell works (cargo 1.95.0, cmake 4.1.6, python3 3.13.15)
Summary
This issue tracks adding Nix flake support to FSL so users can install and run
fslcwithout cloning or compiling manually.What this adds
Enables
nix run github:ymm-oss/fslandnix profile add github:ymm-oss/fslfor users who already have Nix installed. The flake buildsfslc(andfslc-lsp) from source with Z3 bundled in, with all inputs pinned inflake.lock. Adevbox.jsonprovides a reproducible development environment.Current gap
The project documents three install routes — the install script, single-executable downloads from Releases, and developer setup from source. There is no one-command install path for users who already have Nix.
Proposed change
flake.nixusing crane for crate vendoring (avoids crates.io 403 from Nix'sfetchurlnot sending a User-Agent header). Outputs:packages.fslc/.default/.source,apps.fslc/.default,devShells.default,overlays.default, andchecks.x86_64-darwintonixpkgs-26.05-darwin(nixpkgs-unstable 26.11 dropped x86_64-darwin support).devbox.jsonfor reproducible development environments (Rust toolchain +cmake+python3for the vendored Z3 build)..github/workflows/nix.ymlfor CI validation of the flake.Branch
feat-nix-package-manager-installon the fork: https://github.com/levonk/fsl/tree/feat-nix-package-manager-installVerification
nix build .#fslc— succeeds./result/bin/fslc --version—fslc 4.4.1nix run .#default -- --version—fslc 4.4.1fslc-lsp— responds correctly to LSPinitialize(hover, completion, definition, references, documentSymbol, codeAction, rename, semanticTokens)nix flake check --all-systems --no-build— all 4 systems evaluatenix develop— devShell works (cargo 1.95.0, cmake 4.1.6, python3 3.13.15)