Haskell Stack无法在Nixos上构建postgresql-libpq

Mar*_*ani 5 haskell nixos haskell-stack

postgresql-libpq添加到我的项目的cabal文件后,堆栈构建失败,并显示以下内容:

Configuring postgresql-libpq-0.9.1.1...
setup: The program 'pg_config' is required but it could not be found.
Run Code Online (Sandbox Code Playgroud)

我在Nixos上,并且已安装pg_config并在我的PATH上:

$ whereis pg_config
pg_config: /nix/store/5bc6hzqkyw8dpi91sqznd3ik42mllwyz-system-path/bin/pg_config
Run Code Online (Sandbox Code Playgroud)

我正在使用堆栈1.0.2,即使在不稳定通道上执行nixos-rebuild开关--upgrade之后,它似乎也不会更新。这是我这方面的错误还是其他原因?

mhe*_*rzl 5

我在 nixos 上的 stack 上遇到了这个问题,当我的 nix 块stack.yaml更改为以下内容时,我就解决了这个问题。

nix:
  pure: true
  enable: true
  packages: [ postgresql ]
Run Code Online (Sandbox Code Playgroud)