nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at fix-function-merge 90 lines 1.9 kB view raw
1{ lib, 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 15, buildPackages 16, libxcrypt 17, testers 18}: 19 20stdenv.mkDerivation (finalAttrs: { 21 pname = "ldb"; 22 version = "2.9.1"; 23 24 src = fetchurl { 25 url = "mirror://samba/ldb/ldb-${finalAttrs.version}.tar.gz"; 26 hash = "sha256-yV5Nwy3qiGS3mJnuNAyf3yi0hvRku8OLqZFRoItJP5s="; 27 }; 28 29 outputs = [ "out" "dev" ]; 30 31 nativeBuildInputs = [ 32 pkg-config 33 python3 34 wafHook 35 libxslt 36 docbook-xsl-nons 37 docbook_xml_dtd_42 38 tdb 39 tevent 40 ]; 41 42 buildInputs = [ 43 python3 44 readline # required to build python 45 tdb 46 talloc 47 tevent 48 popt 49 cmocka 50 libxcrypt 51 ]; 52 53 # otherwise the configure script fails with 54 # PYTHONHASHSEED=1 missing! Don't use waf directly, use ./configure and make! 55 preConfigure = '' 56 export PKGCONFIG="$PKG_CONFIG" 57 export PYTHONHASHSEED=1 58 ''; 59 60 wafPath = "buildtools/bin/waf"; 61 62 wafConfigureFlags = [ 63 "--bundled-libraries=NONE" 64 "--builtin-libraries=replace" 65 "--without-ldb-lmdb" 66 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 67 "--cross-compile" 68 "--cross-execute=${stdenv.hostPlatform.emulator buildPackages}" 69 ]; 70 71 # python-config from build Python gives incorrect values when cross-compiling. 72 # If python-config is not found, the build falls back to using the sysconfig 73 # module, which works correctly in all cases. 74 PYTHON_CONFIG = "/invalid"; 75 76 stripDebugList = [ "bin" "lib" "modules" ]; 77 78 passthru.tests.pkg-config = testers.hasPkgConfigModules { 79 package = finalAttrs.finalPackage; 80 }; 81 82 meta = with lib; { 83 broken = stdenv.isDarwin; 84 description = "LDAP-like embedded database"; 85 homepage = "https://ldb.samba.org/"; 86 license = licenses.lgpl3Plus; 87 pkgConfigModules = [ "ldb" ]; 88 platforms = platforms.all; 89 }; 90})