NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.37k stars 14.33k forks source link

`isabelle vscode` fails to open #275159

Open Coda-Coda opened 11 months ago

Coda-Coda commented 11 months ago

Describe the bug

After installing the isabelle package, which includes a custom version of VSCodium bundled with it, running the command to open vscode: isabelle vscode gives an error and VSCodium fails to open.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install isabelle from Nixpkgs
  2. Run isabelle vscode

Expected behavior

VSCodium for Isabelle should open, and at least simple tasks should work without causing it to crash.

Additional context

The error message includes: line 1: /nix/store/mspv1kcd22m9zx50x6hlj1scfb7vygbh-isabelle-2023/Isabelle2023/contrib/vscodium-1.70.1/x86_64-linux/electron: cannot execute: required file not found when Nixpkgs commit ca16221251951e9c6261a1a2bb4f9389038d3632 is used as pkgs for isabelle and a similar error currently occurs when using the nixos-unstable channel.

Notify maintainers

@jwiegley @jvanbruegge

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[daniel@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.4, NixOS, 24.05 (Uakari), 24.05pre556224.2c7f3c0fb7c0`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos"`
 - channels(daniel): `"home-manager, nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

I tried to fix this myself, but was not able to. At one point I got VSCodium to launch, but it would crash upon opening the integrated terminal in Isabelle's VSCodium and it didn't seem like Isabelle was running properly either.

Thanks in advance for your help and for all you do as maintainers! 😃 Please let me know if I can help in any way.

jvanbruegge commented 11 months ago

Yes this is a known issue, I don't use vscode and I did not have time to try to get that working. I would assume you would at least have to replace the bundled version of electron with the one from nixos, but possibly it requires rebuilding the custom vscode based off the nixos.

I won't have time to look into that any time soon

Coda-Coda commented 11 months ago

@jvanbruegge thanks for the reply, that makes sense. I did try swapping the bundled electron for one from nixos and that did make it possible to launch VSCodium via isabelle vscode, however basic tasks such as opening the integrated terminal crashed VSCodium and it didn't seem like Isabelle was working properly with the .thy files I tried.

I also won't have that much time to look into it further soon.

@Synthetica9 @bobby285271 @LudovicoPiero as VSCodium maintainers, is there any chance you have some relevant tips or are able to help with this please? The isabelle package bundles a modified version of VSCodium but it is crashing as described in this issue.

tg-x commented 9 months ago

after a quick look i see these installed files in the package output:

the corresponding files in the source repo:

looks like it's a patched vscodium + an extension, these patches can be likely added on top of the the vscodium nix package