1{ lib, stdenv, fetchurl, libiodbc, postgresql, openssl }:
2
3stdenv.mkDerivation rec {
4 pname = "psqlodbc";
5 version = "16.00.0000";
6
7 src = fetchurl {
8 url = "https://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-${version}.tar.gz";
9 hash = "sha256-r9iS+J0uzujT87IxTxvVvy0CIBhyxuNDHlwxCW7KTIs=";
10 };
11
12 buildInputs = [ libiodbc postgresql openssl ];
13
14 configureFlags = [
15 "--with-iodbc=${libiodbc}"
16 "--with-libpq=${lib.getDev postgresql}/bin/pg_config"
17 ];
18
19 meta = with lib; {
20 homepage = "https://odbc.postgresql.org/";
21 description = "ODBC driver for PostgreSQL";
22 license = licenses.lgpl2;
23 platforms = platforms.linux;
24 maintainers = [ ];
25 };
26}