Greetings,
I am new to Nixos and just have started to use the distro full time though I have run into a problem when trying to set up liveshare with vs code. When I installed the extension (using the internal store in vscode… Not sure if there is a better way to do this in NixOS), I noticed that I get the following error when trying to use the extension:
mainThreadExtensionService.ts:111 Activating extension 'ms-vsliveshare.vsliveshare' failed: Agent terminated with exit code: 0 and signal null: /bin/sh: line 1: /home/username/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5597/dotnet_modules/vsls-agent: No such file or directory.
As of right now, I am using the default vscode package in my configuration.nix file.
Is there a better way of installing this so that these dependencies install or is there a work around for this?
/home/username/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5597/dotnet_modules/vsls-agent binary exists but its interpreter does not. Try using vscode-fhs package instead
That probably also takes care of patching scripts like that one (Edit: it does, and also fixes half a dozen problems you’d run into after fixing that one).
While the fhs is pretty cool, it crashes my other extensions… I am trying to use liveshare together with the Haskell extension like this:
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs {};
mycode = pkgs.vscode.fhsWithPackages (ps: with ps;
[
git
haskell.compiler.ghc8107
haskell.packages.ghc8107.haskell-language-server
haskellPackages.cabal-install
zlib
gmp
]
);
in
pkgs.stdenv.mkDerivation {
name = "ccc";
buildInputs = with pkgs; [
haskell.compiler.ghc8107
haskellPackages.cabal-install
zlib
gmp
# ide stuff
mycode
haskell.packages.ghc8107.haskell-language-server
];
src = null;
shellHook = ''
export LD_LIBRARY_PATH=${pkgs.gmp}/lib:${pkgs.zlib}/lib
'';
}
But cabal fails within my project with (run by a vscode extension):
bash: error while loading shared libraries: __vdso_gettimeofday: invalid mode for dlopen(): Invalid argument
Error: cabal: repl failed for exe:ccc22 from ccc22-0.1.0.0. The build process
terminated with exit code 127