mise
mise copied to clipboard
Feature request: Create Nixpkgs for RTX
Guide: https://nixos.org/manual/nixpkgs/stable/#chap-quick-start
I'd happily accept a PR for nix, though I created this in part because I couldn't figure out how to use nix, so I'm possibly not the right person to figure out how to do this.
cc @chadac
Some questions I have about this as a nix novice:
- could rtx use nix as a backend? something like devenv but would allow specifying exact versions
- is it enough to just simply ship the rtx cli inside of a nix package? is that actually useful to anyone?
- could rtx be used more directly from nix? maybe supporting syntax like this:
{
tool_versions = {
nodejs.version = "20"
}
}
could rtx use nix as a backend? something like devenv but would allow specifying exact versions
It could in theory as you can spin up Nix derivations to build anything on the fly, but I don't know if you'd want to use it. Nix writes to a root /nix/store
and each runtime's path would be updated when any of its dependencies or transitive dependencies are changed, and that happens all the time.
is it enough to just simply ship the rtx cli inside of a nix package? is that actually useful to anyone?
This is how asdf-vm does it, so it is absolutely possible.
could rtx be used more directly from nix? maybe supporting syntax like this:
Not an expert, but I'd say it'd be potentially difficult. Many of the language runtimes in Nix are patched to work within the Nix environment (see OpenJDK 18) and I'm not sure if it would be trivial for rtx to simply substitute in a build library. I'm not too familiar with how rtx builds though, so I can't say definitively.
is it enough to just simply ship the rtx cli inside of a nix package? is that actually useful to anyone?
I can say that it would be useful to me. I use home-manager and nix-darwin for managing MacOS systems. Currently rtx
is the only CLI tool that I cannot get directly from nixpkgs, and have to get via brew
If you've come here looking to see if rtx can be installed with nix. Here is the open PR