mise icon indicating copy to clipboard operation
mise copied to clipboard

`rtx install-into node@20 ~/.nodes/20`

Open jdx opened this issue 8 months ago • 6 comments

I want a way to use rtx to install a tool to an arbitrary directory (one not managed by rtx). This way rtx can be a replacement for tools like node-build and you can use it to just fetch tools with a consistent syntax.

I'm open to ideas on the naming. Some thoughts:

  • rtx install --to|--into—not really a fan since it's quite different behavior and syntax (this can only support a single tool and doesn't reference .tool-versions files)
  • rtx install-direct
  • rtx install-export
  • rtx export

jdx avatar Dec 01 '23 19:12 jdx

Maybe rtx install-standalone node@20 ~/.nodes/20

eugene1g avatar Dec 01 '23 21:12 eugene1g

kind of a silly one: rtx gimme node@20 ~/.nodes/20

jdx avatar Dec 03 '23 15:12 jdx

rtx build node@20 ~/.nodes/20?

jdx avatar Dec 13 '23 05:12 jdx

I'd also like this.

I'll mention mise integrate python@xxx but I'd prefer plain ol' mise install python@xxx -s / --sys / --system

And there could be an environmental variable one could set for that sys. path if it differs from the standard/default sys. path. Or when you call mise install...--sys [insert-your-path-here]...this way you could also modify the end path folder name to whatever the heck you want...like GardenVarietyPython3.12 for example.

BuildBackBuehler avatar Mar 25 '24 05:03 BuildBackBuehler

Just chiming in to express my interest in this in the context of https://github.com/jdx/mise/issues/512 / https://github.com/jdx/mise/issues/996 still. So far my approach was to make stuff that went to ~/.local/share/mise/installs relocatable after installation, but I keep running into different issues depending on the underlying tool build:

  • ELF RUNPATHs need to be patched
  • absolute symbolic links need to be turned into relative ones
  • sheband lines need to be adjusted

and probably more. I also tried to customize e.g. the Ruby build by passing RUBY_PREFIX_PATH=.. mise install ruby, but that fails in a post-build step then as mise runs ~/.local/share/mise/installs/ruby/3.3.0/bin/ruby -v. So I'd highly appreciate a built-in solution for this.

Naming wise, as a user I would have expected this to be an option for install, even if it'd work a bit differently. Any of --prefix, --target, --to, --stand-alone and similar would make sense to me.

Alternatively, a new mise relocate command could take care of this my moving already existing installs to a new location, taking care of all the patching etc. that would need to be done.

sschuberth avatar Apr 14 '24 09:04 sschuberth

Another idea, in addition to MISE_DATA_DIR, add MISE_INSTALL_DIR.

sschuberth avatar Apr 14 '24 17:04 sschuberth