From d314be66d67ecded018119593bef0a3e4d0f86cd Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 5 Apr 2023 18:53:39 -0700 Subject: [PATCH] antiword: fix cross compilation --- pkgs/applications/office/antiword/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/office/antiword/default.nix b/pkgs/applications/office/antiword/default.nix index 5da7d84905bb5..09e387cb0554c 100644 --- a/pkgs/applications/office/antiword/default.nix +++ b/pkgs/applications/office/antiword/default.nix @@ -11,11 +11,15 @@ stdenv.mkDerivation rec{ prePatch = '' sed -i -e "s|/usr/local/bin|$out/bin|g" -e "s|/usr/share|$out/share|g" Makefile antiword.h - substituteInPlace Makefile --replace "gcc" "cc" + substituteInPlace Makefile --replace "gcc" '$(CC)' ''; patches = [ ./10_fix_buffer_overflow_wordole_c_CVE-2014-8123.patch ]; + makeFlags = [ + "CC=${stdenv.cc.targetPrefix}cc" + ]; + installTargets = [ "global_install" ]; meta = {