tools icon indicating copy to clipboard operation
tools copied to clipboard

🐛 Rome is broken on nixos

Open framp opened this issue 2 years ago • 0 comments

Environment information

CLI:
  Version:                      12.1.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  ROME_LOG_DIR:                 unset
  NO_COLOR:                     unset
  TERM:                         "alacritty"
  JS_RUNTIME_VERSION:           unset
  JS_RUNTIME_NAME:              unset
  NODE_PACKAGE_MANAGER:         unset

Rome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    true
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Rome servers...

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 run node_modules/@rometools/cli-linux-x64/rome.

I can fix the issue by using the rome nix derivation and copying the executable over:

let
    pkgs = import <nixpkgs> {
    };
in
    pkgs.mkShell {
        buildInputs = [
            pkgs.nodejs_20
            pkgs.rome
        ];
        shellHook = with pkgs; ''
          cp ${pkgs.rome}/bin/rome node_modules/@rometools/cli-linux-x64/rome
        '';
    }

Expected result

  1. The executable should work or its system dependencies should be written somewhere.
  2. It would be nice to have an ENV variable (ROME_BINARY) to use instead of the shipped binary

Code of Conduct

  • [X] I agree to follow Rome's Code of Conduct

framp avatar May 20 '23 08:05 framp