on iko/ghcjs-patch-master help sign in
Use configuration-nix to include freetds dependency of the odbc package (#1000)

I think this is more correct: other package that depend on the system odbc package may not need freetds, the problem is that the Haskell odbc package doesn't declare its dependency on freetds.

commit8455f75c8cd8e48bd877ca8a2896088229dbab13 authorMichael Peyton Jones <michael.peyton-jones@iohk.io> dateSat 16 Jan 2021, 00:16 (6 years ago) parent17e2b7c
2 files changed+7−4
lib/system-nixpkgs-map.nix+2−3 modules/configuration-nix.nix+5−1
lib/system-nixpkgs-map.nix+2−3
@@ -73,10 +73,9 @@ with pkgs;
7373 boost_wave = [ boost ];
7474 boost_wserialization = [ boost ];
7575 tensorflow = [ libtensorflow ];
76− # odbc package requires both freetds (https://github.com/fpco/odbc/commit/9457377089dbe84d8c329560fa1bc1a2797c821d)
77− # and unixODBC packages to be installed in order to successfully
76+ # odbc package requires unixODBC packages to be installed in order to successfully
7877 # compile C sources (https://github.com/fpco/odbc/blob/master/cbits/odbc.c)
79− odbc = [ freetds unixODBC ];
78+ odbc = [ unixODBC ];
8079 opencv = [ opencv3 ];
8180 icuuc = [ icu ];
8281 icui18n = [ icu ];
modules/configuration-nix.nix+5−1
@@ -7,7 +7,7 @@
77 # terminfo doesn't list libtinfo in its cabal file. We could ignore
88 # this if we used the terminfo shipped with GHC, but this package is
99 # reinstallable so we'd rather have it defined in the plan.
10− packages.terminfo.components.library.libs = [pkgs.ncurses];
10+ packages.terminfo.components.library.libs = [ pkgs.ncurses ];
1111
1212 # The `extra-libraries` field in `X11.cabal` does not include Xss and Xinerama
1313 # see https://github.com/input-output-hk/haskell.nix/pull/988
@@ -16,6 +16,10 @@
1616 pkgs.xorg.libXinerama
1717 ];
1818
19+ # odbc needs this package to provide odbcss.h on Linux and macOS, see
20+ # https://github.com/fpco/odbc#common-issues
21+ packages.odbc.components.library.libs = [ pkgs.freetds ];
22+
1923 # These packages have `license: LGPL` in their .cabal file, but
2024 # do not specify the version. Setting the version here on
2125 # examination of the license files included in the packages.