From c8acbfccd9cb3fe0247e3fd612ff84e785ba9e68 Mon Sep 17 00:00:00 2001 From: Marie Ramlow Date: Fri, 23 Aug 2024 18:36:18 +0200 Subject: [PATCH] gsoap: fix cross compilation gsoap requires a soapcpp2 for the build platform when cross compiling. --- pkgs/development/libraries/gsoap/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gsoap/default.nix b/pkgs/development/libraries/gsoap/default.nix index 08b8146ac0a8..1a40b87c01aa 100644 --- a/pkgs/development/libraries/gsoap/default.nix +++ b/pkgs/development/libraries/gsoap/default.nix @@ -1,7 +1,8 @@ -{ lib, stdenv, fetchurl, autoreconfHook, unzip, m4, bison, flex, openssl, zlib }: +{ lib, stdenv, fetchurl, autoreconfHook, unzip, m4, bison, flex, openssl, zlib, buildPackages }: let majorVersion = "2.8"; + isCross = stdenv.hostPlatform != stdenv.buildPlatform; in stdenv.mkDerivation rec { pname = "gsoap"; @@ -22,6 +23,10 @@ in stdenv.mkDerivation rec { prePatch = '' substituteInPlace configure.ac \ --replace 'AM_INIT_AUTOMAKE([foreign])' 'AM_INIT_AUTOMAKE([foreign subdir-objects])' + ${lib.optionalString isCross '' + substituteInPlace gsoap/wsdl/Makefile.am \ + --replace-fail 'SOAP=$(top_builddir)/gsoap/src/soapcpp2$(EXEEXT)' 'SOAP=${lib.getExe' buildPackages.gsoap "soapcpp2"}' + ''} ''; meta = with lib; {