Merge pull request #48266 from volth/patch-265
p7zip: fix cross-compilation
commit5bd1b675c668cf249ebdeaf72ec6fe5b5f4fab00
authorJörg Thalheim <Mic92@users.noreply.github.com>
dateFri 12 Oct 2018, 14:12 (8 years ago)
parentc2129a8fbeeed1
pkgs/tools/archivers/p7zip/default.nix+4
@@ -20,6 +20,10 @@ stdenv.mkDerivation rec {
2020
2121 # I think this is a typo and should be CXX? Either way let's kill it
2222 sed -i '/XX=\/usr/d' makefile.macosx_llvm_64bits
23+ '' + stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
24+ substituteInPlace makefile.machine \
25+ --replace 'CC=gcc' 'CC=${stdenv.cc.targetPrefix}gcc' \
26+ --replace 'CXX=g++' 'CXX=${stdenv.cc.targetPrefix}g++'
2327 '';
2428
2529 preConfigure = ''