2017-10-14 07:40:48 +01:00
|
|
|
{ stdenv, fetchurl
|
2014-10-29 04:04:12 +00:00
|
|
|
, odbcSupport ? false, unixODBC ? null }:
|
|
|
|
|
|
|
|
assert odbcSupport -> unixODBC != null;
|
2011-11-10 22:20:48 +00:00
|
|
|
|
2015-05-18 07:43:26 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2017-10-14 07:40:48 +01:00
|
|
|
name = "freetds-0.91";
|
2011-11-10 22:20:48 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-10-14 07:40:48 +01:00
|
|
|
url = "http://mirrors.ibiblio.org/freetds/stable/${name}.tar.gz";
|
|
|
|
sha256 = "0r946axzxs0czsmr7283w7vmk5jx3jnxxc32d2ncxsrsh2yli0ba";
|
2011-11-10 22:20:48 +00:00
|
|
|
};
|
|
|
|
|
2017-10-14 07:40:48 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-07 16:22:44 +00:00
|
|
|
|
2017-10-14 07:40:48 +01:00
|
|
|
buildInputs = stdenv.lib.optional odbcSupport [ unixODBC ];
|
2014-10-29 04:04:12 +00:00
|
|
|
|
2017-10-14 07:40:48 +01:00
|
|
|
configureFlags = stdenv.lib.optionalString odbcSupport "--with-odbc=${unixODBC}";
|
2014-10-29 04:04:12 +00:00
|
|
|
|
2017-10-14 07:40:48 +01:00
|
|
|
doDist = true;
|
2014-06-11 11:58:40 +01:00
|
|
|
|
2017-10-14 07:40:48 +01:00
|
|
|
distPhase = ''
|
|
|
|
touch $out/include/tds.h
|
|
|
|
touch $out/lib/libtds.a
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description =
|
|
|
|
"Libraries to natively talk to Microsoft SQL Server and Sybase databases";
|
|
|
|
homepage = http://www.freetds.org;
|
|
|
|
license = "lgpl";
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
2011-11-10 22:20:48 +00:00
|
|
|
};
|
|
|
|
}
|