Sandbox error when running nix build

I’m trying to go through the week 1 exercises for the plutus pioneer program and I’m running into the following error when running nix build -f default.nix plutus.haskell.packages.plutus-core

❮❮❮ nix build -f default.nix plutus.haskell.packages.plutus-core
trace: To materialize project.plan-nix for Agda entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
builder for '/nix/store/gpkkaj0mcs6wxaknfjm0jh389x8l4gwb-plutus-core-0.1.0.0-coverage-report.drv' failed with exit code 65; last 1 log lines:
  sandbox-exec: pattern serialization length 71571 exceeds maximum (65535)
[0 built (1 failed), 0.0 MiB DL]

Does anyone know what this means and how to fix it? I’ve searched the plutus communit docs but haven’t found an descriptions/solutions to this error.

I’ve set up the IOHK GHC cache for nix and am running this command on commit ea0ca4e9f9821a9dbfc5255fa0f42b6f2b3887c4.

I’ve also created a stack overflow post: plutus - Sandbox error when running nix build - Cardano Stack Exchange

EDIT: this also happens on master on commit 8ce0d58c0a169f4c8a1104757502f342e750c863

Figured it out. Posted the answer in the linked Stack Overflow post.