From ed3f60f8f84cd2cd07c0266eac06f8c55addd0d7 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 13 Apr 2023 07:04:06 +0000 Subject: [PATCH] serf: support cross compilation serf consumes apr-util's apu-1-config file to obtain linker flags, so we extend the existing Makefile patch there to also apply to apu-1-config --- pkgs/development/libraries/apr-util/default.nix | 2 ++ pkgs/development/libraries/serf/scons.patch | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix index 594ecfbdb306..dd4b157d7a23 100644 --- a/pkgs/development/libraries/apr-util/default.nix +++ b/pkgs/development/libraries/apr-util/default.nix @@ -48,6 +48,8 @@ stdenv.mkDerivation rec { lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' substituteInPlace Makefile \ --replace "-ldb-6.9" "-ldb" + substituteInPlace apu-1-config \ + --replace "-ldb-6.9" "-ldb" ''; propagatedBuildInputs = [ apr expat libiconv libxcrypt ] diff --git a/pkgs/development/libraries/serf/scons.patch b/pkgs/development/libraries/serf/scons.patch index acfece7ef5fe..5f168ce7f2eb 100644 --- a/pkgs/development/libraries/serf/scons.patch +++ b/pkgs/development/libraries/serf/scons.patch @@ -11,10 +11,11 @@ index 4358a23..6ce7776 100644 if target in build_targets: return PathVariable.PathIsDirCreate(key, val, env) else: -@@ -155,6 +155,7 @@ if sys.platform == 'win32': +@@ -155,6 +155,8 @@ if sys.platform == 'win32': env = Environment(variables=opts, tools=('default', 'textfile',), CPPPATH=['.', ], ++ AR=os.environ['AR'], + ENV=os.environ, )