diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-12-06 19:57:55 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-02-08 13:48:30 +0000 |
commit | bf3aadfdd39aa197e18bade671fab6726349ffa4 (patch) | |
tree | 698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/libraries/unixODBCDrivers | |
parent | f4afc5a01d9539ce09e47494e679c51f80723d07 (diff) | |
parent | 99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff) | |
download | nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2 nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip |
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/unixODBCDrivers')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/unixODBCDrivers/default.nix | 58 |
1 files changed, 54 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/libraries/unixODBCDrivers/default.nix b/nixpkgs/pkgs/development/libraries/unixODBCDrivers/default.nix index 958e417ca17c..1e5149683d4c 100644 --- a/nixpkgs/pkgs/development/libraries/unixODBCDrivers/default.nix +++ b/nixpkgs/pkgs/development/libraries/unixODBCDrivers/default.nix @@ -20,8 +20,9 @@ }; meta = with lib; { + broken = stdenv.isDarwin; description = "Official PostgreSQL ODBC Driver"; - homepage = "https://odbc.postgresql.org/"; + homepage = "https://odbc.postgresql.org/"; license = licenses.lgpl2; platforms = platforms.linux; }; @@ -61,8 +62,9 @@ }; meta = with lib; { + broken = stdenv.isDarwin; description = "MariaDB ODBC database driver"; - homepage = "https://downloads.mariadb.org/connector-odbc/"; + homepage = "https://downloads.mariadb.org/connector-odbc/"; license = licenses.gpl2; platforms = platforms.linux ++ platforms.darwin; }; @@ -89,7 +91,7 @@ }; meta = with lib; { - description = "MariaDB ODBC database driver"; + description = "MySQL ODBC database driver"; homepage = "https://dev.mysql.com/downloads/connector/odbc/"; license = licenses.gpl2; platforms = platforms.linux; @@ -124,6 +126,7 @@ }; meta = with lib; { + broken = stdenv.isDarwin; description = "ODBC driver for SQLite"; homepage = "http://www.ch-werner.de/sqliteodbc"; license = licenses.bsd2; @@ -157,7 +160,7 @@ ''; postFixup = '' - patchelf --set-rpath ${lib.makeLibraryPath [ unixODBC openssl.out libkrb5 libuuid stdenv.cc.cc ]} \ + patchelf --set-rpath ${lib.makeLibraryPath [ unixODBC openssl libkrb5 libuuid stdenv.cc.cc ]} \ $out/lib/libmsodbcsql-${versionMajor}.${versionMinor}.so.${versionAdditional} ''; @@ -167,11 +170,58 @@ }; meta = with lib; { + broken = stdenv.isDarwin; description = "ODBC Driver 17 for SQL Server"; homepage = "https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; platforms = platforms.linux; maintainers = with maintainers; [ spencerjanssen ]; }; }; + + redshift = stdenv.mkDerivation rec { + pname = "redshift-odbc"; + version = "1.4.49.1000"; + + src = fetchurl { + url = "https://s3.amazonaws.com/redshift-downloads/drivers/odbc/${version}/AmazonRedshiftODBC-64-bit-${version}-1.x86_64.deb"; + sha256 = "sha256-r5HvsZjB7+x+ClxtWoONkE1/NAbz90NbHfzxC6tf7jA="; + }; + + nativeBuildInputs = [ dpkg ]; + + unpackPhase = '' + dpkg -x $src src + cd src + ''; + + # `unixODBC` is loaded with `dlopen`, so `autoPatchElfHook` cannot see it, and `patchELF` phase would strip the manual patchelf. Thus: + # - Manually patchelf with `unixODCB` libraries + # - Disable automatic `patchELF` phase + installPhase = '' + mkdir -p $out/lib + cp opt/amazon/redshiftodbc/lib/64/* $out/lib + patchelf --set-rpath ${unixODBC}/lib/ $out/lib/libamazonredshiftodbc64.so + ''; + + dontPatchELF = true; + + buildInputs = [ unixODBC ]; + + passthru = { + fancyName = "Amazon Redshift (x64)"; + driver = "lib/libamazonredshiftodbc64.so"; + }; + + meta = with lib; { + broken = stdenv.isDarwin; + description = "Amazon Redshift ODBC driver"; + homepage = "https://docs.aws.amazon.com/redshift/latest/mgmt/configure-odbc-connection.html"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.unfree; + platforms = platforms.linux; + maintainers = with maintainers; [ sir4ur0n ]; + }; + }; } |