libtommath: fix cross build (#370328)

authored by Ben Siraphob and committed by GitHub 7e962376 2d7d0c97

+6 -4
+6 -4
pkgs/by-name/li/libtommath/package.nix
··· 14 14 sha256 = "sha256-KWJy2TQ1mRMI63NgdgDANLVYgHoH6CnnURQuZcz6nQg="; 15 15 }; 16 16 17 - nativeBuildInputs = [ libtool ]; 18 - 19 17 postPatch = '' 20 - substituteInPlace makefile.shared --replace glibtool libtool 21 - substituteInPlace makefile_include.mk --replace "shell arch" "shell uname -m" 18 + substituteInPlace makefile.shared \ 19 + --replace-fail glibtool libtool \ 20 + --replace-fail libtool "${lib.getExe (libtool.override { stdenv = stdenv; })}" 21 + substituteInPlace makefile_include.mk \ 22 + --replace-fail "gcc" "${stdenv.cc.targetPrefix}cc" 22 23 ''; 23 24 24 25 preBuild = '' 25 26 makeFlagsArray=(PREFIX=$out \ 27 + CC=${stdenv.cc.targetPrefix}cc \ 26 28 INSTALL_GROUP=$(id -g) \ 27 29 INSTALL_USER=$(id -u)) 28 30 '';