Skip to content

Commit 463e08c

Browse files
authored
Fix postgresql-libpq-configure (#2370)
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
1 parent b921608 commit 463e08c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/configuration-nix.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,7 @@ in addPackageKeys {
203203
pkgs.apple-sdk_11
204204
(pkgs.darwinMinVersionHook "11.0")
205205
];
206+
207+
packages.postgresql-libpq-configure.components.library.libs = [ (lib.getDev pkgs.postgresql) ]
208+
++ lib.optional (pkgs.postgresql ? pg_config) [ pkgs.postgresql.pg_config ];
206209
}

0 commit comments

Comments
 (0)