diff --git a/lib/system-nixpkgs-map.nix b/lib/system-nixpkgs-map.nix index 53f31132f..f979bfd0c 100644 --- a/lib/system-nixpkgs-map.nix +++ b/lib/system-nixpkgs-map.nix @@ -17,6 +17,10 @@ let lndir ${pkgs.buildPackages.gcc.cc} $out '') ] else []; + # In newer versions of nixpkgs `pg_config` has been moved to its own derivation. + # Haskell libs that depend on the `pq` library (like `postgresql-libpq`) + # are likely to require `pg_config` to be in the `PATH` as well. + postgresqlLibs = [ postgresql ] ++ lib.optional (postgresql ? pg_config) postgresql.pg_config; in # -- linux { crypto = [ openssl ]; @@ -57,10 +61,10 @@ in bz2 = [ bzip2 ]; util = [ utillinux ]; magic = [ file ]; - pgcommon = [ postgresql ]; - pgport = [ postgresql] ; - pq = [ postgresql ]; - libpq = [ postgresql ]; + pgcommon = postgresqlLibs; + pgport = postgresqlLibs; + pq = postgresqlLibs; + libpq = postgresqlLibs; iconv = [ libiconv ]; lapack = [ liblapack ]; boost_atomic = [ boost ];