@@ -1,49 +1,62 @@
1−{ stdenv, fetchurl, python, pkgconfig, readline, tdb, talloc, tevent
2−, popt, libxslt, docbook_xsl, docbook_xml_dtd_42, cmocka
1+{ stdenv
2+, fetchurl
3+, python3
4+, pkg-config
5+, readline
6+, tdb
7+, talloc
8+, tevent
9+, popt
10+, libxslt
11+, docbook-xsl-nons
12+, docbook_xml_dtd_42
13+, cmocka
14+, wafHook
315}:
416
517stdenv.mkDerivation rec {
6− name = "ldb-1.3.3";
18+ pname = "ldb";
19+ version = "2.1.1";
720
821 src = fetchurl {
9− url = "mirror://samba/ldb/${name}.tar.gz";
10− sha256 = "14gsrm7dvyjpbpnc60z75j6fz2p187abm2h353lq95kx2bv70c1b" ;
22+ url = "mirror://samba/ldb/${pname}-${version}.tar.gz";
23+ sha256 = "jO+y8l/KkT+hinktDvsDrwf4f1uVGkze0DD1uY8lx7A=";
1124 };
1225
1326 outputs = [ "out" "dev" ];
1427
15− nativeBuildInputs = [ pkgconfig ];
16− buildInputs = [
17− python readline tdb talloc tevent popt
18− libxslt docbook_xsl docbook_xml_dtd_42
19− cmocka
28+ nativeBuildInputs = [
29+ pkg-config
30+ python3
31+ wafHook
32+ libxslt
33+ docbook-xsl-nons
34+ docbook_xml_dtd_42
2035 ];
2136
22− patches = [
23− # CVE-2019-3824
24− # downloading the patch from debian as they have ported the patch from samba to ldb but otherwise is identical to
25− # https://bugzilla.samba.org/attachment.cgi?id=14857
26− (fetchurl {
27− name = "CVE-2019-3824.patch";
28− url = "https://sources.debian.org/data/main/l/ldb/2:1.1.27-1+deb9u1/debian/patches/CVE-2019-3824-master-v4-5-02.patch";
29− sha256 = "1idnqckvjh18rh9sbq90rr4sxfviha9nd1ca9pd6lai0y6r6q4yd";
30− })
37+ buildInputs = [
38+ python3
39+ readline # required to build python
40+ tdb
41+ talloc
42+ tevent
43+ popt
44+ cmocka
3145 ];
3246
33− preConfigure = ''
34− sed -i 's,#!/usr/bin/env python,#!${python}/bin/python,g' buildtools/bin/waf
35− '';
47+ wafPath = "buildtools/bin/waf";
3648
37− configureFlags = [
49+ wafConfigureFlags = [
3850 "--bundled-libraries=NONE"
3951 "--builtin-libraries=replace"
52+ "--without-ldb-lmdb"
4053 ];
4154
4255 stripDebugList = "bin lib modules";
4356
4457 meta = with stdenv.lib; {
4558 description = "A LDAP-like embedded database";
46− homepage = https://ldb.samba.org/;
59+ homepage = "https://ldb.samba.org/";
4760 license = licenses.lgpl3Plus;
4861 platforms = platforms.all;
4962 };