Haskell Stack does not create postgresql-libpq on Nixos

After adding postgresql-libpq to my project file, the stack build failed with the following:

Configuring postgresql-libpq-0.9.1.1...
setup: The program 'pg_config' is required but it could not be found.

I am on Nixos and pg_config is installed on my PATH too:

$ whereis pg_config
pg_config: /nix/store/5bc6hzqkyw8dpi91sqznd3ik42mllwyz-system-path/bin/pg_config

I am using stack 1.0.2 and it seems that it will not be updated even after switching nixos-rebuild -upgrade to an unstable channel. Is this a mistake on my side or is it something else?

+4
source share
2 answers

I ran into this problem with the stack on nixos and walked past it when my nix block stack.yamlwas changed to the following.

nix:
  pure: true
  enable: true
  packages: [ postgresql ]
+2
source

, docs, . . :

nix:
  enable: true
  pure: false

, , , , : ~/.stack/config.yaml. , :

stack --nix --no-nix-pure build

"" nix-shell , .

+1

Source: https://habr.com/ru/post/1655251/


All Articles