jorgebucaran / nvm.fish

The Node.js version manager you'll adore, crafted just for Fish
https://git.io/nvm.fish
MIT License
2.08k stars 69 forks source link

Compile node from the source if binary is not pre-available #127

Closed jorgebucaran closed 3 years ago

jorgebucaran commented 3 years ago

It would be great if we could compile node from the source if a binary is not pre-available.

This blog post looks like a good place to start experimenting.

thernstig commented 3 years ago

Is this worth it? It requires the user to have dependencies, which depending on the system can get you into a plethora of cases where you need guides for users of what dependencies they need for their OS.

jorgebucaran commented 3 years ago

It might be worth it for people that want to compile Node, but we'd never do it by default and it would be behind a flag. I'm not too keen on adding this, though. We'll see.

jorgebucaran commented 3 years ago

There's been no activity here for a while, and I've since changed my mind about working on this. I'd be curious to see a PR, but I have no plans to add this anytime soon. Closing! 🙇‍♂️

LeeroyDing commented 3 years ago

Looks like it's pretty straightforward, just setting --prefix="$nvm_data/$v" and then make && make install will probably work.

There seems no need to move the files around after installation if we use --strip-components=1 in the tar command.

Maybe we could hide this behaviour behind a -s option, and also attempt source installation if the pre-built binary doesn't exist.