Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unixODBCDrivers.mdb: init as mdbtools alias #347347

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkgs/development/libraries/unixODBCDrivers/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ fetchurl, stdenv, unixODBC, cmake, mariadb, sqlite, zlib, libxml2, dpkg, lib, openssl, libkrb5, libuuid, patchelf, libiconv, fixDarwinDylibNames, fetchFromGitHub, psqlodbc }:
{ fetchurl, stdenv, unixODBC, cmake, mariadb, sqlite, zlib, libxml2, dpkg, lib, openssl, libkrb5, libuuid, patchelf, libiconv, fixDarwinDylibNames, fetchFromGitHub, psqlodbc, mdbtools }:

# Each of these ODBC drivers can be configured in your odbcinst.ini file using
# the various passthru and meta values. Of note are:
Expand Down Expand Up @@ -309,4 +309,6 @@
maintainers = with maintainers; [ sir4ur0n ];
};
};

mdb = mdbtools.override { withUnixODBC = true; withLibiodbc = false; };
}
18 changes: 15 additions & 3 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,22 +16,32 @@ 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 ];

enableParallelBuilding = true;

passthru = lib.optionalAttrs withUnixODBC {
fancyName = "MDBTools";
driver = "lib/odbc/libmdbodbc.so";
};

meta = with lib; {
description = ".mdb (MS Access) format tools";
license = with licenses; [ gpl2Plus lgpl2 ];
maintainers = [ ];
maintainers = with lib.maintainers; [ geoffreyfrogeye ];
platforms = platforms.unix;
inherit (src.meta) homepage;
};
Expand Down
Loading