1 { lib, fetchurl, stdenv }:
3 stdenv.mkDerivation rec{
8 url = "http://www.winfield.demon.nl/linux/antiword-${version}.tar.gz";
9 sha256 = "1b7mi1l20jhj09kyh0bq14qzz8vdhhyf35gzwsq43mn6rc7h0b4f";
13 sed -i -e "s|/usr/local/bin|$out/bin|g" -e "s|/usr/share|$out/share|g" Makefile antiword.h
14 substituteInPlace Makefile --replace "gcc" '$(CC)'
17 patches = [ ./10_fix_buffer_overflow_wordole_c_CVE-2014-8123.patch ];
20 "CC=${stdenv.cc.targetPrefix}cc"
23 installTargets = [ "global_install" ];
26 homepage = "http://www.winfield.demon.nl/";
27 description = "Convert MS Word documents to plain text or PostScript";
28 license = lib.licenses.gpl2;
30 platforms = with lib.platforms; linux ++ darwin;