Can't build nix-vscode-extensions since April 6th

Hello everyone. I have a flake setup on unstable. I did the migration process to flakes successfully a couple months ago, and everything has been fine.

From time to time I do my nix flake update and switch. This worked. Additionally, I (have to) manually update the commit for nix-vscode-extensions in my vscode.nix file. This is ugly indeed, still to convert to flakes, but it has been working well:

# vscode.nix
let
  system = "x86_64-linux";
  VSCextensions =
    (import (builtins.fetchGit {
      url = "https://github.com/nix-community/nix-vscode-extensions";
      ref = "refs/heads/master";
      rev = "7e0eeb6e0c0f5e9086db20d252c949925b9a3c29"; # 06-apr-2024 - this works
      # rev = "a8bb6fa1a05342d9342cce69b94808b7b65a218b"; # 06-apr-2024 - this is broken
    })).extensions.${system};
  extensionsList = with VSCextensions.vscode-marketplace; [
          monokai.theme-monokai-pro-vscode
          bbenoist.nix
          # ...
  ];
in
{
    programs.vscode = {
      enable = true;
      extensions = extensionsList;
    };
}

I normally update to the latest commit available in the repo and all is smooth. But today, I got the following error:

❯ sudo nixos-rebuild test --flake .
building the system configuration...
error:
       … while calling the 'head' builtin

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/lib/attrsets.nix:1575:11:

         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         else

       … while evaluating the attribute 'value'

         at /nix/store/qzjidyx3fip413vg7by6ibl22lwizc68-source/lib/modules.nix:809:9:

          808|     in warnDeprecation opt //
          809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          810|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: 'builtins.storePath' is not allowed in pure evaluation mode

       at «none»:0: (source not available)

I found that the older commit still builds fine, while the newer doesn’t. Boiling down the error, I found that the breaking change occurred on 6th April, :

The error is not related to any specific extension, as I tried to disable all but one (different tries) and it still happens. (Removing all extensions from the list builds fine)

I’m aware this issue would probably get fixed with a more decent flakey configuration to achieve the same, since afaik nobody report this problem for more than a month, but this is where I’m at right now :slight_smile: and I guess it’s still worth pursuing.

What am I missing? Thanks yall!