tinyxml2: fix cross compilation

- use native unzip
- add target prefix to LD
This commit is contained in:
Matthew Bauer 2020-04-01 22:18:53 -04:00
parent 71a9eb80e7
commit 5c80a3585b

View File

@ -23,14 +23,14 @@ in stdenv.mkDerivation {
./2.6.2-cxx.patch ./2.6.2-cxx.patch
]; ];
preConfigure = "export LD=${if stdenv.isDarwin then "clang++" else "g++"}"; preConfigure = "export LD=${stdenv.cc.targetPrefix}c++";
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
NIX_CFLAGS_COMPILE = NIX_CFLAGS_COMPILE =
stdenv.lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9"; stdenv.lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9";
buildInputs = [ unzip ]; nativeBuildInputs = [ unzip ];
buildPhase = '' buildPhase = ''
# use STL (xbmc requires it) # use STL (xbmc requires it)
sed '1i#define TIXML_USE_STL 1' -i tinyxml.h sed '1i#define TIXML_USE_STL 1' -i tinyxml.h