about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/ldb/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/ldb/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/ldb/default.nix20
1 files changed, 18 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/libraries/ldb/default.nix b/nixpkgs/pkgs/development/libraries/ldb/default.nix
index d81e3eeabe6d..72ae892dca2c 100644
--- a/nixpkgs/pkgs/development/libraries/ldb/default.nix
+++ b/nixpkgs/pkgs/development/libraries/ldb/default.nix
@@ -12,15 +12,16 @@
 , docbook_xml_dtd_42
 , cmocka
 , wafHook
+, libxcrypt
 }:
 
 stdenv.mkDerivation rec {
   pname = "ldb";
-  version = "2.3.0";
+  version = "2.6.2";
 
   src = fetchurl {
     url = "mirror://samba/ldb/${pname}-${version}.tar.gz";
-    sha256 = "0bcjj4gv48ddg44wyxpsvrs26xry6yy9x9k16qgz0bljs2rhilx4";
+    hash = "sha256-XLxjw1KTwjSzn5S6n/yonW0HiSXX+QIfgIZz3t8tkl4=";
   };
 
   outputs = [ "out" "dev" ];
@@ -32,6 +33,8 @@ stdenv.mkDerivation rec {
     libxslt
     docbook-xsl-nons
     docbook_xml_dtd_42
+    tdb
+    tevent
   ];
 
   buildInputs = [
@@ -42,8 +45,16 @@ stdenv.mkDerivation rec {
     tevent
     popt
     cmocka
+    libxcrypt
   ];
 
+  # 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
+  '';
+
   wafPath = "buildtools/bin/waf";
 
   wafConfigureFlags = [
@@ -52,6 +63,11 @@ stdenv.mkDerivation rec {
     "--without-ldb-lmdb"
   ];
 
+  # 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";
+
   stripDebugList = [ "bin" "lib" "modules" ];
 
   meta = with lib; {