How to install latest vscode-insiders

I am new to nix and nixos. I have my system configured using the repo

I am trying to install the latest version of vscode with overlays. The file overlays/vscode.nix looks like this

final: prev: {
  # set default cursor theme when installed
  isInsiders = true;

this raises error

Also I don’t know how to use that latest version available. As of now the unpkgs version is 1.46.0 while the latest version from the vscode site is built daily.

Is this the correct approach or should I clone the entire the nixpkgs and update the derivation?

Could anyone help me understand these?

1 Like

I had this monster of a expression among my overrides:

vscode-insiders= #(final.vscode.override { isInsiders = true;executableName="code"; }).overrideAttrs
        (final.callPackage "${nixpkgs}/pkgs/applications/editors/vscode/generic.nix"
        (rec {
          longName="Visual Studio Code - Insiders";
          shortName="Code - Insiders";
          version = "latest";
          #plat = "linux-x64";
          #archive_fmt = "tar.gz";
          #backport ""
          preFixup = with final; ''
            gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ${
              lib.makeLibraryPath [ systemd fontconfig libdbusmenu-gtk3 ]

however it could be hit or miss as the tarball inside could get either one with the ‘code’ executable or one with ‘code-insiders’,so I didn’t use it anymore

1 Like

Thanks, this looks promising. I will start with this.

I ended up with. This is places inside the nixflk repos → overlays/vscode.nix

final: prev:
  vscode-insider = prev.vscode.override {
    isInsiders = true;
  vscode = vscode-insider.overrideAttrs (oldAttrs: rec {
    src = (builtins.fetchTarball {
      url = "";
      sha256 = "03nmmcr8canxnhxpsd2d5rfqi6d7njab4c3bpcqmfi9xbk3scx1a";
    version = "latest";

:woman_zombie: @jnoortheen’s solution above still works in 2022, and this is the only place it’s written down. Somebody should add it to Visual Studio Code - NixOS Wiki at the least.

I uncomment this (identical to above just inline) block in my home-manager config when I need to test insider:

    programs.vscode.package = (pkgs.vscode.override{ isInsiders = true; }).overrideAttrs (oldAttrs: rec {
      src = (builtins.fetchTarball {
        url = "";
        sha256 = "1dajhfsdr55mfnj12clf5apy1d4swr71d3rfwlq2hvvmpxvxsa59";
      version = "latest";

The first run will fail and tell you the current value for sha256.


Added Visual Studio Code - NixOS Wiki


If anybody tries to acquire a stable binary of code-insider, you might check the flake: GitHub - iosmanthus/code-insiders-flake. This repo creates a github action to sync the code-insider every day and produce a stable manifest.