p7zip: fix cross-compilation
commitfbeeed1c5c81dec0823ca12691a6cd66d5c7599f
authorvolth <volth@webmaster.ms>
dateFri 12 Oct 2018, 12:36 (8 years ago)
parentc4afb45
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 = ''