Skip to content

Conversation

hamishmack
Copy link
Collaborator

It needs posgresql and pg_config, but does not explicitly list the dependency in the .cabal file.

With this change both use-pkg-config on and off work. Tested with:

nix build --impure --expr '((import ./. {}).pkgs-unstable.haskell-nix.hackage-package {compiler-nix-name="ghc9122"; name = "postgresql-libpq"; cabalProjectLocal = "package postgresql-libpq\n flags: -use-pkg-config"; }).components.library'
nix build --impure --expr '((import ./. {}).pkgs-unstable.haskell-nix.hackage-package {compiler-nix-name="ghc9122"; name = "postgresql-libpq"; cabalProjectLocal = "package postgresql-libpq\n flags: +use-pkg-config"; }).components.library'

Fixes #2281

It needs posgresql and pg_config, but does not explicitly list the dependency in the `.cabal` file.

With this change both `use-pkg-config` on and off work. Tested with:

```
nix build --impure --expr '((import ./. {}).pkgs-unstable.haskell-nix.hackage-package {compiler-nix-name="ghc9122"; name = "postgresql-libpq"; cabalProjectLocal = "package postgresql-libpq\n flags: -use-pkg-config"; }).components.library'
nix build --impure --expr '((import ./. {}).pkgs-unstable.haskell-nix.hackage-package {compiler-nix-name="ghc9122"; name = "postgresql-libpq"; cabalProjectLocal = "package postgresql-libpq\n flags: +use-pkg-config"; }).components.library'
```

Fixes #2281
@hamishmack hamishmack merged commit 463e08c into master May 22, 2025
6529 of 6701 checks passed
thomasjm added a commit to codedownio/haskell.nix that referenced this pull request Jun 4, 2025
thomasjm added a commit to codedownio/haskell.nix that referenced this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

postgresql-libpq 0.10.2.0 or higher won't build - where's the fix go?
1 participant