Skip to content

Commit

Permalink
feat(buildCrate): allow toolchain to be specified
Browse files Browse the repository at this point in the history
  • Loading branch information
yusdacra committed Jan 3, 2025
1 parent ce88403 commit aff54b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/implementation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ in {
drvConfig ? {},
depsDrvConfig ? {},
cratePath ? "",
mkRustToolchain ? nci.toolchains.mkBuild,
}: let
cargoToml = l.fromTOML (l.readFile (
if cratePath == ""
Expand All @@ -146,7 +147,7 @@ in {
drvConfig
{
deps.craneSource = inp.crane;
deps.mkRustToolchain = nci.toolchains.mkBuild;
deps.mkRustToolchain = mkRustToolchain;

name = l.mkForce cargoToml.package.name;
version = l.mkForce cargoToml.package.version;
Expand Down
1 change: 1 addition & 0 deletions src/interface.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ in {
The arguments are:
- `src`: the source for the project (or crate if it's just a crate)
- `cratePath`: relative path to the provided `src`, used to find the crate if it's a workspace
- `mkRustToolchain`: function that outputs a rust toolchain package (like `nci.toolchains.mkBuild`, which is also the default), will be used when building
- `drvConfig` and `depsDrvConfig`: see `nci.crates.<name>.<drvConfig/depsDrvConfig>` in this documentation (optional)
'';
};
Expand Down

0 comments on commit aff54b5

Please sign in to comment.