unix-odbc-drivers module: update for new unixODBCDrivers

+10 -7
+10 -7
nixos/modules/config/unix-odbc-drivers.nix
··· 5 5 # unixODBC drivers (this solution is not perfect.. Because the user has to 6 6 # ask the admin to add a driver.. but it's simple and works 7 7 8 - { 8 + let 9 + iniDescription = pkg: '' 10 + [${pkg.fancyName}] 11 + Description = ${pkg.meta.description} 12 + Driver = ${pkg}/${pkg.driver} 13 + ''; 14 + 15 + in { 9 16 ###### interface 10 17 11 18 options = { 12 19 environment.unixODBCDrivers = mkOption { 13 20 type = types.listOf types.package; 14 21 default = []; 15 - example = literalExample "with pkgs.unixODBCDrivers; [ mysql psql psqlng ]"; 22 + example = literalExample "with pkgs.unixODBCDrivers; [ sqlite psql ]"; 16 23 description = '' 17 24 Specifies Unix ODBC drivers to be registered in 18 25 <filename>/etc/odbcinst.ini</filename>. You may also want to ··· 25 32 ###### implementation 26 33 27 34 config = mkIf (config.environment.unixODBCDrivers != []) { 28 - 29 - environment.etc."odbcinst.ini".text = 30 - let inis = map (x : x.ini) config.environment.unixODBCDrivers; 31 - in lib.concatStringsSep "\n" inis; 32 - 35 + environment.etc."odbcinst.ini".text = concatMapStringsSep "\n" iniDescription config.environment.unixODBCDrivers; 33 36 }; 34 37 35 38 }