From e64cf99b6dc7eb798846a4189ecfcbd550751612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Tue, 8 Oct 2024 22:11:00 +0200 Subject: [PATCH] mdbtools: Allow building with unixODBC and libiodbc --- pkgs/tools/misc/mdbtools/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/mdbtools/default.nix b/pkgs/tools/misc/mdbtools/default.nix index 9ac41fdb89f3f..979b371a26786 100644 --- a/pkgs/tools/misc/mdbtools/default.nix +++ b/pkgs/tools/misc/mdbtools/default.nix @@ -1,6 +1,8 @@ { stdenv, lib, fetchFromGitHub, glib, readline , bison, flex, pkg-config, autoreconfHook , txt2man, which +, withLibiodbc ? false, libiodbc +, withUnixODBC ? true, unixODBC }: stdenv.mkDerivation rec { @@ -14,13 +16,18 @@ stdenv.mkDerivation rec { sha256 = "sha256-e9rgTWu8cwuccpp/wAfas1ZeQPTpGcgE6YjLz7KRnhw="; }; - configureFlags = [ "--disable-scrollkeeper" ]; + configureFlags = [ "--disable-scrollkeeper" ] + ++ lib.optional withUnixODBC "--with-unixodbc=${unixODBC}" + ++ lib.optional withLibiodbc "--with-iodbc=${libiodbc}"; env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=unused-but-set-variable"; nativeBuildInputs = [ pkg-config bison flex autoreconfHook txt2man which - ]; + ] + ++ lib.optional withLibiodbc libiodbc + ++ lib.optional withUnixODBC unixODBC; + buildInputs = [ glib readline ];