summary refs log tree commit diff
path: root/pkgs/tools/misc/mdbtools/default.nix
blob: 0a887531fb86d869890c15e4791276a947597ca7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, fetchFromGitHub, glib, readline
, bison, flex, pkgconfig, autoreconfHook
, txt2man, which }:

let version = "0.7.1";
in stdenv.mkDerivation {
  pname = "mdbtools";
  inherit version;

  src = fetchFromGitHub {
    owner = "brianb";
    repo = "mdbtools";
    rev = version;
    sha256 = "0gwcpp9y09xhs21g7my2fs8ncb8i6ahlyixcx8jd3q97jbzj441l";
  };

  nativeBuildInputs = [ pkgconfig bison flex autoreconfHook txt2man which ];
  buildInputs = [ glib readline ];

  preConfigure = ''
    sed -e 's@static \(GHashTable [*]mdb_backends;\)@\1@' -i src/libmdb/backend.c
  '';

  meta = with stdenv.lib; {
    description = ".mdb (MS Access) format tools";
    homepage = "http://mdbtools.sourceforge.net";
    platforms = platforms.unix;
    license = with licenses; [ gpl2 lgpl2 ];
  };
}