Add Nix flake for Compact compiler#1163
Add Nix flake for Compact compiler#1163solidsnakedev wants to merge 9 commits intomidnightntwrk:mainfrom
Conversation
- Downloads compactc, compactc.bin, and zkir per system - Supports x86_64-linux, x86_64-darwin, aarch64-darwin - Version-aware installation with automatic updates - Sets PATH and ZKIR_BIN environment variables - Includes latest Node.js from nixpkgs-unstable
|
|
|
@gilescope what else do we need to get this approve? |
|
Hi I'm really looking forward to this PR. Global user installation of the compiler toolchain is clunky. I was attampting to make use of this flake but was running into some issues. Ironically I think this doesn't quite work for use on NixOS. Here's a link discussing the quirks of NixOS with Midnight https://forum.midnight.network/t/error-failed-to-run-compactc/500 I could be missing something. Let me know if and how I can assist |
There was a problem hiding this comment.
Pull Request Overview
This PR adds Nix flake support to provide the Compact compiler toolchain for different systems. The implementation downloads and installs Compact developer tools in a project-local directory.
Key Changes:
- Adds a Nix flake configuration with multi-system support (x86_64-linux, x86_64-darwin, aarch64-darwin)
- Creates a dev shell that automatically installs and sets up the Compact compiler toolchain version 0.24.0
- Includes direnv configuration for automatic environment activation
Reviewed Changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| flake.nix | Defines Nix flake with dev shell that downloads and configures Compact toolchain |
| .envrc | Adds direnv integration to automatically enter Nix development shell |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
flake.nix
Outdated
| @@ -0,0 +1,60 @@ | |||
| { | |||
| description = "Example Counter – Nix flake that provides the Compact compiler per system"; | |||
There was a problem hiding this comment.
The description mentions 'Example Counter' which appears to be a copy-paste error. It should describe the actual Compact compiler flake.
| description = "Example Counter – Nix flake that provides the Compact compiler per system"; | |
| description = "Nix flake that provides the Compact compiler per system"; |
|
@jonathanfishbein1 I fixed it. This is a common problem in NixOS, most Linux distributions use If there are no more observations, I suggest we merge the PR? @gilescope @Olanetsoft |
Adds Nix flake that provides compactc, compactc.bin, and zkir binaries per system.