Try running
nurl --hash -f fetchPypi https://pypi.org/project/semgrep 1.32.0 -A format wheel -A dist cp37.cp38.cp39.cp310.cp311.py37.py38.py39.py310.py311 -A python cp37.cp38.cp39.cp310.cp311.py37.py38.py39.py310.py311 -A platform macosx_11_0_arm64
on Nix 2.15 or 2.16.1, and you'll see a message saying that the flakes feature needs to be enabled, like this:
error:
… while calling the 'import' builtin
at «string»:1:2:
1| (import(<nixpkgs>){}).fetchPypi{pname="semgrep";version="1.32.0";hash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";format="wheel";dist="cp37.cp38.cp39.cp310.cp311.py37.py38.py39.py310.py311";python="cp37.cp38.cp39.cp310.cp311.py37.py38.py39.py310.py311";platform="macosx_11_0_arm64";}
| ^
… while calling the 'findFile' builtin
at «string»:1:9:
1| (import(<nixpkgs>){}).fetchPypi{pname="semgrep";version="1.32.0";hash="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";format="wheel";dist="cp37.cp38.cp39.cp310.cp311.py37.py38.py39.py310.py311";python="cp37.cp38.cp39.cp310.cp311.py37.py38.py39.py310.py311";platform="macosx_11_0_arm64";}
| ^
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
```
Since I already have flakes enabled, changing the `nix-build` invocation to `--extra-experimental-features` instead of `--experimental-features` fixes the problem for me.
Try running
on Nix 2.15 or 2.16.1, and you'll see a message saying that the flakes feature needs to be enabled, like this: