Skip to content

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

Description

@a-stevan

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)" ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions