Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NixOS Support #177

Closed
znd4 opened this issue Mar 20, 2024 · 11 comments · Fixed by #628
Closed

NixOS Support #177

znd4 opened this issue Mar 20, 2024 · 11 comments · Fixed by #628
Labels
documentation Improvements or additions to documentation node issues relating to the fact that basedpyright depends on nodejs (the nodejs-wheel pypi package)

Comments

@znd4
Copy link

znd4 commented Mar 20, 2024

The bundled node fails to run on NixOS:

Could not start dynamically linked executable: /home/znd4/Projects/far.ai-interview/.direnv/python-3.11/lib/python3.11/site-packages/nodejs/bin/node
NixOS cannot run dynamically linked executables intended for generic\nlinux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld

I'd understand closing this issue, but I thought I'd at least leave some breadcrumbs for future me / anyone else who wants to take a crack at packaging this really cool looking project for Nix:

Unfortunately, my node experience is pretty thin, so this might be tricky

@DetachHead DetachHead added the node issues relating to the fact that basedpyright depends on nodejs (the nodejs-wheel pypi package) label Mar 20, 2024
@znd4 znd4 mentioned this issue Apr 7, 2024
@DetachHead
Copy link
Owner

can you please check if #323 fixes this?

pip install git+https://github.com/DetachHead/basedpyright@fa71759782c1d3b97eae50504711d670739208d7

(note that it will probably take several minutes to install due to #335)

@leiserfg
Copy link

leiserfg commented May 6, 2024

By now I'm using https://github.com/leiserfg/leiserfg-overlay/blob/master/pkgs/basedpyright/default.nix

@DetachHead
Copy link
Owner

so that just patches it to use a different node binary. i don't know anything about nix but is it a problem with the node binary we're using that can be raised upstream at https://github.com/njzjz/nodejs-wheel?

@leiserfg
Copy link

leiserfg commented May 8, 2024

In nixos libraries are not stored in the same path, so to make the regular node work I will need to patch the binary. That is doable but at that point I better replace it (as I did), which brings the plus of avoiding having another nodejs instead.

@DetachHead
Copy link
Owner

do you think that's a decent solution? we can add a "nixOS" section in the installation instructions that says to install it from your repo

@DetachHead DetachHead added the documentation Improvements or additions to documentation label May 8, 2024
@leiserfg
Copy link

leiserfg commented May 8, 2024

I could add a flake to your repo if you like so, but it will have to be in the weekend.

@DetachHead
Copy link
Owner

sounds good, thanks

@DetachHead DetachHead removed the documentation Improvements or additions to documentation label May 8, 2024
@kiike
Copy link

kiike commented May 9, 2024

FWIW I have an open PR to bring basedpyright into nixpkgs based on the pyright package. NixOS/nixpkgs#308503

@leiserfg
Copy link

leiserfg commented May 9, 2024

@DetachHead then it's better to wait for the work from @kiike to be merged.

@kiike
Copy link

kiike commented May 28, 2024

FYI, my PR, which brings basedpyright into NixOS, was merged four days ago. I guess it is already in the nixos-unstable repo, but probably won't have made it in time for the 24.05 release.

@DetachHead
Copy link
Owner

thanks! if you don't mind would you like to also write some installation instructions for nixOS?

@DetachHead DetachHead added the documentation Improvements or additions to documentation label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation node issues relating to the fact that basedpyright depends on nodejs (the nodejs-wheel pypi package)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants