2021-01-15 06:42:41 +01:00
|
|
|
{ lib, fetchurl, stdenv }:
|
2011-08-31 13:55:51 +02:00
|
|
|
|
2021-11-07 21:29:51 +01:00
|
|
|
stdenv.mkDerivation rec{
|
|
|
|
pname = "antiword";
|
|
|
|
version = "0.37";
|
2011-08-31 13:55:51 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-11-07 21:29:51 +01:00
|
|
|
url = "http://www.winfield.demon.nl/linux/antiword-${version}.tar.gz";
|
2011-08-31 13:55:51 +02:00
|
|
|
sha256 = "1b7mi1l20jhj09kyh0bq14qzz8vdhhyf35gzwsq43mn6rc7h0b4f";
|
|
|
|
};
|
|
|
|
|
2016-09-17 04:49:23 +02:00
|
|
|
prePatch = ''
|
2011-08-31 14:06:27 +02:00
|
|
|
sed -i -e "s|/usr/local/bin|$out/bin|g" -e "s|/usr/share|$out/share|g" Makefile antiword.h
|
2017-04-20 23:39:56 +02:00
|
|
|
substituteInPlace Makefile --replace "gcc" "cc"
|
2011-08-31 14:06:27 +02:00
|
|
|
'';
|
|
|
|
|
2020-05-06 23:18:09 +02:00
|
|
|
patches = [ ./10_fix_buffer_overflow_wordole_c_CVE-2014-8123.patch ];
|
2015-03-09 18:27:25 +01:00
|
|
|
|
2019-11-04 12:23:53 +01:00
|
|
|
installTargets = [ "global_install" ];
|
2011-08-31 13:55:51 +02:00
|
|
|
|
|
|
|
meta = {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.winfield.demon.nl/";
|
2013-10-05 16:22:46 +02:00
|
|
|
description = "Convert MS Word documents to plain text or PostScript";
|
2021-01-15 06:42:41 +01:00
|
|
|
license = lib.licenses.gpl2;
|
2011-08-31 13:55:51 +02:00
|
|
|
|
2021-01-15 06:42:41 +01:00
|
|
|
platforms = with lib.platforms; linux ++ darwin;
|
2011-08-31 13:55:51 +02:00
|
|
|
};
|
|
|
|
}
|