-
Notifications
You must be signed in to change notification settings - Fork 659
Accept an environment variable to specify which binary to use #4539
Conversation
This is a way to temporary fix this build issue: rome#4516 I think it's a nice feature regardless, for advanced users who are experiencing issues
✅ Deploy Preview for docs-rometools canceled.Built without sensitive environment variables
|
What would be a good fix for your issue, instead? |
Debugging the issue on nixos and finding out what is causing the sigsegv. I'd still like to have an env var specifying the binary as it can be pretty useful. Prisma does something similar which I frequently use: |
I suspect @framp may be referring to a case where the shipped binary works on Nix (i.e. has no links to shared libraries) though I suspect this may not be practical; however, I am by no means an expert on this. The root issue here is that Nix needs a binary that is compiled for/compatible with the Nix environment, so either A) the shipped binary is compatible with Nix, or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Thank you @framp ! I would expect a follow up PR for the documentation :)
You can open a PR against release/12.2.0
@framp can you try the latest nightly and see if that works as you expect? |
Thanks! I could add a few lines here: |
Considering that you suggested that this is an advanced use-case, maybe the getting started section might not be a good fit. Maybe the CLI section? With small explanation that tells us what's it for |
@framp would you mind sharing how you would go about setting this up, perhaps by sharing an example |
That would look like this @Ashvith10:
|
@framp thanks for sharing the Nix file. However, I'm a little skeptical about this method, because I've faced something similar while working with Cypress (the testing framework), and the problem was that Cypress binaries were behind by a considerable version (12.16.0 when I was working vs 12.9.0 on Nix). In my case however, Rome worked just fine and I did not get to experience the issues I've had to deal with while using Cypress. Is is possible to over-ride the "version" variable in the Nix files, while using |
You can't but you could have a local derivation which provides the latest package (by copying the derivation you linked). Or you could submit a PR on nixpkgs You can also just patch the binary like this: |
Summary
This adds an env var which allow users to override the path to the rome binary.
It's a way to provide a solution for running rome under nix.
See #4516 (comment)
Test Plan
Changelog
Documentation