unixODBCDrivers.msodbcsql17: add missing openssl dependency

This commit is contained in:
Aaron Andersen 2019-10-21 15:04:11 -04:00
parent 1125fb02cc
commit 18ad0a8028

View File

@ -1,4 +1,4 @@
{ fetchurl, stdenv, unixODBC, cmake, postgresql, mysql, libmysqlclient, sqlite, zlib, libxml2, dpkg, lib, openssl, kerberos, curl, libuuid, autoPatchelfHook }:
{ fetchurl, stdenv, unixODBC, cmake, postgresql, mysql, libmysqlclient, sqlite, zlib, libxml2, dpkg, lib, openssl, kerberos, libuuid, patchelf }:
# I haven't done any parameter tweaking.. So the defaults provided here might be bad
@ -138,8 +138,7 @@
sha256 = "0jb16irr7qlgd2zshg0vyia7zqipd0pcvwfcr6z807pss1mnzj8w";
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ unixODBC dpkg kerberos libuuid stdenv.cc.cc ];
nativeBuildInputs = [ dpkg patchelf ];
unpackPhase = "dpkg -x $src ./";
buildPhase = "";
@ -150,6 +149,11 @@
cp -r opt/microsoft/msodbcsql${versionMajor}/lib64 opt/microsoft/msodbcsql${versionMajor}/share $out/
'';
postFixup = ''
patchelf --set-rpath ${lib.makeLibraryPath [ unixODBC openssl.out kerberos libuuid stdenv.cc.cc ]} \
$out/lib/libmsodbcsql-${versionMajor}.${versionMinor}.so.${versionAdditional}
'';
passthru = {
fancyName = "ODBC Driver 17 for SQL Server";
driver = "lib/libmsodbcsql-${versionMajor}.${versionMinor}.so.${versionAdditional}";