-
Notifications
You must be signed in to change notification settings - Fork 660
🐛 Rome is broken on nixos #4516
Comments
This highly depends on your package manager and its settings. The system dependencies are marked as optional and sometimes they don't get installed
I'm not sure what you mean. Could you expand or maybe propose a suggestion via GitHub discussions? |
Thanks for the quick answer and for the stellar work on Rome!
I am referring to the dependencies of the rust binary: I think we're linking to a library which is commonly available on mainstream systems and my Nixos derivation doesn't have it causing the SIGSEGV. Interestingly enough the nix derivation can build Rome.
Line 19 in ef6544c
- const binPath = PLATFORMS?.[platform]?.[arch];
+ const binPath = process.env.ROME_BINARY || PLATFORMS?.[platform]?.[arch]; |
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
I am not very familiar with |
@ematipico Nix is a declarative and reproducible package manager that is increasingly used in the deployment of software, and NixOS is an operating system built upon that package manager. In Nix, the traditional unix filesystem structure of |
No worries at all! And thanks for the explanation jrouleau One minor correction: the paths where libraries are stored in nix should be added to LD_LIBRARY_PATH so that should not cause an issue or need anything special. Ultimately I wasn't able to find out what was wrong and using the nix derivation works fine, so I thought of at least flagging it here! |
I looked into the issue some more and found out the root cause. Nix derivations patch executables to link the dynamic interpreter but this is not happening for binaries installed via npm
A nix solution would look like this:
but it has the disadvantage of not working right after you install the package (you would need to get out and back in your shell) If we use an env var (as per #4539), then we can use the native dependency and work all the time. |
Environment information
What happened?
After installing Rome on nixos via
npm install
(on two envs, both on my deployment / CI server and on my local development machine), I get a sigsegv as soon as I try to runnode_modules/@rometools/cli-linux-x64/rome
.I can fix the issue by using the rome nix derivation and copying the executable over:
Expected result
Code of Conduct
The text was updated successfully, but these errors were encountered: