nushell / nushell/nupm

pass extra information to `build.nu` for custom packages

Open
#109 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nushell
Stars
335
Forks
24
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing custom package installation and the build.nu invocation described in the issue, along with rust-toolchain.toml and the referenced example. Trace what package information is available when Nupm changes directories; done means build.nu can receive the relevant Cargo toolchain information and use it for custom packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.