Haskell stack 在NixOS上运行堆栈会导致缺少C编译器错误

Haskell stack 在NixOS上运行堆栈会导致缺少C编译器错误,haskell-stack,nixos,Haskell Stack,Nixos,在NixOS构建上运行stack build甚至stack--nix build,会产生以下结果: Linking /run/user/1000/stack7176/old-time-1.1.0.3/.stack-work/dist/x86_64-linux-nix/Cabal-1.22.5.0/setup/setup ... Configuring old-time-1.1.0.3... configure: WARNING: unrecognized options: --with-comp

在NixOS构建上运行
stack build
甚至
stack--nix build
,会产生以下结果:

Linking /run/user/1000/stack7176/old-time-1.1.0.3/.stack-work/dist/x86_64-linux-nix/Cabal-1.22.5.0/setup/setup ...
Configuring old-time-1.1.0.3...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/run/user/1000/stack7176/old-time-1.1.0.3':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

我已经在我的系统上安装了
gcc
clang
,并验证了
gcc
确实在我的路径上。如何解决这个问题?

你使用的是什么NixOS频道?@Chris:
NixOS-Stability
我不知道这里出了什么问题,但无论如何,你不应该安装
gcc
clang
;这就是Nix集成的全部要点,堆栈应该启动它自己的Nix shell环境,并提供它所需的一切。您可以发布一个最小的堆栈文件来复制它吗?