1{ lib, stdenv, fetchurl, autoreconfHook, pkg-config
2, openssl
3, odbcSupport ? true, unixODBC ? null }:
4
5assert odbcSupport -> unixODBC != null;
6
7# Work is in progress to move to cmake so revisit that later
8
9stdenv.mkDerivation rec {
10 pname = "freetds";
11 version = "1.4.6";
12
13 src = fetchurl {
14 url = "https://www.freetds.org/files/stable/${pname}-${version}.tar.bz2";
15 hash = "sha256-gTgCoca8Av4WlrbqMapTUiVxl3dza1v8I6OheFiVasA=";
16 };
17
18 buildInputs = [
19 openssl
20 ] ++ lib.optional odbcSupport unixODBC;
21
22 nativeBuildInputs = [ autoreconfHook pkg-config ];
23
24 meta = with lib; {
25 description = "Libraries to natively talk to Microsoft SQL Server and Sybase databases";
26 homepage = "https://www.freetds.org";
27 changelog = "https://github.com/FreeTDS/freetds/releases/tag/v${version}";
28 license = licenses.lgpl2;
29 maintainers = with maintainers; [ peterhoeg ];
30 platforms = platforms.all;
31 };
32}