diff options
author | Guillaume Girol <symphorien@users.noreply.github.com> | 2022-02-16 21:04:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 21:04:01 +0000 |
commit | 8481553b61b29023c5f307c0ff7f2f8646907fa5 (patch) | |
tree | 72b1116622fa5c7b76699c270843a0cc0b95cba6 | |
parent | fa69e31bb0237af3c857da642cc2812be666aa65 (diff) | |
parent | bc0839b3d6e286926459f2e56cddd4b953b799bf (diff) |
Merge pull request #151823 from Mindavi/apr-util/eval
aprutil: fix evaluation, support cross-compilation
-rw-r--r-- | pkgs/development/libraries/apr-util/default.nix | 11 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 |
2 files changed, 11 insertions, 6 deletions
diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix index 1cb253774d4e1..57bf47f3abf17 100644 --- a/pkgs/development/libraries/apr-util/default.nix +++ b/pkgs/development/libraries/apr-util/default.nix @@ -26,6 +26,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; outputBin = "dev"; + nativeBuildInputs = [ makeWrapper ]; buildInputs = optional stdenv.isFreeBSD autoreconfHook; configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ] @@ -38,7 +39,15 @@ stdenv.mkDerivation rec { "--without-freetds" "--without-berkeley-db" "--without-crypto" ] ; - propagatedBuildInputs = [ makeWrapper apr expat libiconv ] + # For some reason, db version 6.9 is selected when cross-compiling. + # It's unclear as to why, it requires someone with more autotools / configure knowledge to go deeper into that. + # Always replacing the link flag with a generic link flag seems to help though, so let's do that for now. + postConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + substituteInPlace Makefile \ + --replace "-ldb-6.9" "-ldb" + ''; + + propagatedBuildInputs = [ apr expat libiconv ] ++ optional sslSupport openssl ++ optional bdbSupport db ++ optional ldapSupport openldap diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aff871b2ff929..b08ca10b2d4f0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15898,11 +15898,7 @@ with pkgs; autoreconfHook = buildPackages.autoreconfHook269; }; - aprutil = callPackage ../development/libraries/apr-util { - db = if stdenv.isFreeBSD then db4 else db; - # XXX: only the db_185 interface was available through - # apr with db58 on freebsd (nov 2015), for unknown reasons - }; + aprutil = callPackage ../development/libraries/apr-util { }; aravis = callPackage ../development/libraries/aravis { inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad; |