Unable to rebuild system with Plasma enabled

I wanted to give Plasma a try, but for some reason, building with it enabled is throwing this error: error: getting status of '/nix/store/rwgvww93dwp0dyzmhwjyd9p6nd95wiqh-set-gdfontpath-from-fontconfig.sh'. My config builds with no issue with Plasma disabled.

As far as I can tell this script is only present for building Gnuplot which some Plasma packages seem to rely on. I have no idea why this can’t build, and show-trace is not giving any extra output.

Here is a link to my flake, I would greatly appreciate some help. I am building the desktop configuration. Another odd thing is that it builds correctly in the laptop build, which mostly contains much of the same content.

I would really appreciate any help here, I can’t find any other example of this issue.

Even with this incredibly minimal config my system fails to build.

{ pkgs, ... }: {
  imports = [
    ./hardware.nix
  ];

  boot.loader.grub = {
    enable = true;
    device = "nodev";
  };

  services.xserver = {
    enable = true;
    desktopManager.plasma5.enable = true;
  };

  system.stateVersion = "22.05";
}

Disabling Plasma makes it build. Every other desktop manager works, I have no idea what is happening.

In case anybody runs into a similar issue, I believe I solved it by running nix-store --verify --check-contents --repair