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