Skip to content

Commit

Permalink
mdbtools: Allow building with unixODBC and libiodbc
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyFrogeye committed Oct 8, 2024
1 parent 75a846a commit e64cf99
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkgs/tools/misc/mdbtools/default.nix
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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 ];

Expand Down

0 comments on commit e64cf99

Please sign in to comment.