[Nix-dev] added unixODBC support in configuration.nix
Marc Weber
marco-oweber at gmx.de
Thu Jun 12 01:10:33 CEST 2008
On Mon, Jun 09, 2008 at 03:58:17AM +0200, Marc Weber wrote:
> I haven't looked too much into details but I wonder how to integrate
> unix odbc and drivers into nix(os)..
You can add
environment = {
unixODBCDrivers = pkgs : map (x : x.ini) (with pkgs.unixODBCDrivers; [ mysql psql psqlng ] );
}
to your configuraiton.nix file and install unixODBC (which will install
isql). After setting up some dbs in your local .odbc.ini
eg
[myc]
Description = Mammoth PostgreSQL
Driver = PostgreSQL
Trace = No
TraceFile =
Database = marc
Servername = localhost
UserName = marc
Password =
Port = 5432
Protocol = 7.0
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
ConnSettings =
[m1]
Description = MySQL test database
Trace = Off
TraceFile = stderr
Driver = MySQL
SERVER = 127.0.0.1
USER = root
PASSWORD =
PORT = 3306
DATABASE = test
you can connect using isql m1 or isql myc
Enjoy
Marc Weber
More information about the nix-dev
mailing list