2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, wafHook
|
|
|
|
, python3
|
|
|
|
, readline
|
|
|
|
, libxslt
|
2022-10-30 15:09:59 +00:00
|
|
|
, libxcrypt
|
2020-04-24 23:36:52 +00:00
|
|
|
, docbook-xsl-nons
|
|
|
|
, docbook_xml_dtd_45
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tdb";
|
2023-03-24 00:07:29 +00:00
|
|
|
version = "1.4.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://samba/tdb/${pname}-${version}.tar.gz";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-hDTJyFfRPOP6hGb3VgHyXDaTZ2s2kZ8VngrWEhuvXOg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-08-05 21:33:18 +00:00
|
|
|
python3
|
2020-04-24 23:36:52 +00:00
|
|
|
pkg-config
|
|
|
|
wafHook
|
|
|
|
libxslt
|
|
|
|
docbook-xsl-nons
|
|
|
|
docbook_xml_dtd_45
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
python3
|
|
|
|
readline # required to build python
|
2022-10-30 15:09:59 +00:00
|
|
|
libxcrypt
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
# otherwise the configure script fails with
|
|
|
|
# PYTHONHASHSEED=1 missing! Don't use waf directly, use ./configure and make!
|
|
|
|
preConfigure = ''
|
|
|
|
export PKGCONFIG="$PKG_CONFIG"
|
|
|
|
export PYTHONHASHSEED=1
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
wafPath = "buildtools/bin/waf";
|
|
|
|
|
|
|
|
wafConfigureFlags = [
|
|
|
|
"--bundled-libraries=NONE"
|
|
|
|
"--builtin-libraries=replace"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postFixup = if stdenv.isDarwin
|
|
|
|
then ''install_name_tool -id $out/lib/libtdb.dylib $out/lib/libtdb.dylib''
|
|
|
|
else null;
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
# python-config from build Python gives incorrect values when cross-compiling.
|
|
|
|
# If python-config is not found, the build falls back to using the sysconfig
|
|
|
|
# module, which works correctly in all cases.
|
|
|
|
PYTHON_CONFIG = "/invalid";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "The trivial database";
|
|
|
|
longDescription = ''
|
|
|
|
TDB is a Trivial Database. In concept, it is very much like GDBM,
|
|
|
|
and BSD's DB except that it allows multiple simultaneous writers
|
|
|
|
and uses locking internally to keep writers from trampling on each
|
|
|
|
other. TDB is also extremely small.
|
|
|
|
'';
|
|
|
|
homepage = "https://tdb.samba.org/";
|
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|