Skip to content

Commit

Permalink
gsoap: fix cross compilation
Browse files Browse the repository at this point in the history
gsoap requires a soapcpp2 for the build platform when cross compiling.

(cherry picked from commit c8acbfc)
  • Loading branch information
NyCodeGHG authored and github-actions[bot] committed Aug 28, 2024
1 parent ae2fc9e commit 4d3347c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkgs/development/libraries/gsoap/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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; {
Expand Down

0 comments on commit 4d3347c

Please sign in to comment.