2021-01-15 22:18:51 +00:00
|
|
|
{ lib, fetchurl, stdenv }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec{
|
|
|
|
pname = "antiword";
|
|
|
|
version = "0.37";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "http://www.winfield.demon.nl/linux/antiword-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1b7mi1l20jhj09kyh0bq14qzz8vdhhyf35gzwsq43mn6rc7h0b4f";
|
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
sed -i -e "s|/usr/local/bin|$out/bin|g" -e "s|/usr/share|$out/share|g" Makefile antiword.h
|
2023-04-12 12:48:02 +00:00
|
|
|
substituteInPlace Makefile --replace "gcc" '$(CC)'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
patches = [ ./10_fix_buffer_overflow_wordole_c_CVE-2014-8123.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
makeFlags = [
|
|
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installTargets = [ "global_install" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://www.winfield.demon.nl/";
|
|
|
|
description = "Convert MS Word documents to plain text or PostScript";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl2;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = with lib.platforms; linux ++ darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|