2 # unixODBC drivers (this solution is not perfect.. Because the user has to
3 # ask the admin to add a driver.. but it's simple and works
6 iniDescription = pkg: ''
8 Description = ${pkg.meta.description}
9 Driver = ${pkg}/${pkg.driver}
16 environment.unixODBCDrivers = lib.mkOption {
17 type = lib.types.listOf lib.types.package;
19 example = lib.literalExpression "with pkgs.unixODBCDrivers; [ sqlite psql ]";
21 Specifies Unix ODBC drivers to be registered in
22 {file}`/etc/odbcinst.ini`. You may also want to
23 add `pkgs.unixODBC` to the system path to get
24 a command line client to connect to ODBC databases.
31 config = lib.mkIf (config.environment.unixODBCDrivers != []) {
32 environment.etc."odbcinst.ini".text = lib.concatMapStringsSep "\n" iniDescription config.environment.unixODBCDrivers;