Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass extra information to build.nu for custom packages #109

Open
a-stevan opened this issue Nov 22, 2024 · 0 comments
Open

pass extra information to build.nu for custom packages #109

a-stevan opened this issue Nov 22, 2024 · 0 comments

Comments

@a-stevan
Copy link

related to

Description

because Nupm switches directories when installing a custom package and running build.nu, Cargo will use the system's version of itself instead of what's specified in rust-toolchain.toml.

this requires something like the following to make sure the version specified in rust-toolchain.toml is used:
https://github.com/FMotalleb/nu_plugin_clipboard/blob/00cc3d3e6a09df674c3a3fdbc1411c4937dde4b0/build.nu#L26-L32

i'm wondering if we could provide to build.nu some extra information in a new argument?

something like

def main [package_file: path = nupm.nuon, package_info: record<cargo_toolchain: string>] {
    cargo $"+($package_info.cargo_toolchain)" ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant