Conversation
✅ Deploy Preview for sukr ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Nix flake to actually expose a sukr build as a flake output, aligning the repository’s flake.nix with what’s referenced on the website.
Changes:
- Refactors
outputsto use helper functions (pkgsFor,toolchainFor,forAllSystems) for system-specific evaluation. - Adds
packages.${system}.sukr(and setspackages.${system}.default = sukr) viabuildRustPackage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| sukr = pkgs.rustPlatform.buildRustPackage { | ||
| pname = cargoToml.package.name; | ||
| version = cargoToml.package.version; | ||
| src = ./.; | ||
| buildInputs = [toolchain]; | ||
| cargoHash = "sha256-mPm8Pe4W9TyDuuXLHWqA9DzbkTyR1kkfLZ3SmEt+dUc="; | ||
| }; |
There was a problem hiding this comment.
pkgs.rustPlatform.buildRustPackage will still build with the Rust toolchain from nixpkgs; adding the fenix toolchain to buildInputs doesn’t switch the compiler/cargo, and also pulls the full toolchain into the runtime closure. If the intent is to build with the pinned rust-toolchain.toml, create a rustPlatform using pkgs.makeRustPlatform { cargo = toolchain; rustc = toolchain; } (or set the appropriate nativeBuildInputs/env vars) and avoid placing the toolchain in buildInputs.
| sukr = pkgs.rustPlatform.buildRustPackage { | |
| pname = cargoToml.package.name; | |
| version = cargoToml.package.version; | |
| src = ./.; | |
| buildInputs = [toolchain]; | |
| cargoHash = "sha256-mPm8Pe4W9TyDuuXLHWqA9DzbkTyR1kkfLZ3SmEt+dUc="; | |
| }; | |
| sukr = | |
| let | |
| rustPlatform = pkgs.makeRustPlatform { | |
| cargo = toolchain; | |
| rustc = toolchain; | |
| }; | |
| in | |
| rustPlatform.buildRustPackage { | |
| pname = cargoToml.package.name; | |
| version = cargoToml.package.version; | |
| src = ./.; | |
| cargoHash = "sha256-mPm8Pe4W9TyDuuXLHWqA9DzbkTyR1kkfLZ3SmEt+dUc="; | |
| }; |
There was a problem hiding this comment.
hey @uttarayan21 thanks for catching this, can you integrate fenix as copilot suggests here? That way we are using a consistent toolchain throughout? Thanks
sukrpackage wasn't added in flake.nix as mentioned in the website