nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchurl, python, pkgconfig, readline, tdb, talloc, tevent
2, popt, libxslt, docbook_xsl, docbook_xml_dtd_42, cmocka
3}:
4
5stdenv.mkDerivation rec {
6 name = "ldb-1.3.3";
7
8 src = fetchurl {
9 url = "mirror://samba/ldb/${name}.tar.gz";
10 sha256 = "14gsrm7dvyjpbpnc60z75j6fz2p187abm2h353lq95kx2bv70c1b" ;
11 };
12
13 outputs = [ "out" "dev" ];
14
15 nativeBuildInputs = [ pkgconfig ];
16 buildInputs = [
17 python readline tdb talloc tevent popt
18 libxslt docbook_xsl docbook_xml_dtd_42
19 cmocka
20 ];
21
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 })
31 ];
32
33 preConfigure = ''
34 sed -i 's,#!/usr/bin/env python,#!${python}/bin/python,g' buildtools/bin/waf
35 '';
36
37 configureFlags = [
38 "--bundled-libraries=NONE"
39 "--builtin-libraries=replace"
40 ];
41
42 stripDebugList = "bin lib modules";
43
44 meta = with stdenv.lib; {
45 description = "A LDAP-like embedded database";
46 homepage = https://ldb.samba.org/;
47 license = licenses.lgpl3Plus;
48 platforms = platforms.all;
49 };
50}