From bcb314853a6f6124ac5f86b8cc56c04a0849c4ff Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 2 Jul 2015 01:47:15 +0200 Subject: [PATCH 1/4] unrtf: init at 0.21.9 --- pkgs/tools/text/unrtf/default.nix | 27 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/tools/text/unrtf/default.nix diff --git a/pkgs/tools/text/unrtf/default.nix b/pkgs/tools/text/unrtf/default.nix new file mode 100644 index 00000000000..6b177b8b37b --- /dev/null +++ b/pkgs/tools/text/unrtf/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, autoconf, automake }: + +stdenv.mkDerivation rec { + name = "unrtf-${version}"; + version = "0.21.9"; + + src = fetchurl { + url = "https://www.gnu.org/software/unrtf/${name}.tar.gz"; + sha256 = "1pcdzf2h1prn393dkvg93v80vh38q0v817xnbwrlwxbdz4k7i8r2"; + }; + + buildInputs = [ autoconf automake ]; + + preConfigure = "./bootstrap"; + + meta = with stdenv.lib; { + description = "A converter from Rich Text Format to other formats"; + longDescription = '' + UnRTF converts documents in Rich Text Format to other + formats, including HTML, LaTeX, and RTF itself. + ''; + homepage = https://www.gnu.org/software/unrtf/; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ joachifm ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b3e7849dd1a..9eb8e045398 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3170,6 +3170,8 @@ let unoconv = callPackage ../tools/text/unoconv { }; + unrtf = callPackage ../tools/text/unrtf { }; + upx = callPackage ../tools/compression/upx { }; urlview = callPackage ../applications/misc/urlview {}; From 4bd52ddb88dd5bb9aed7bd674d3754391d3ddc94 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 2 Jul 2015 02:02:36 +0200 Subject: [PATCH 2/4] untex: init at 1.2 --- pkgs/tools/text/untex/default.nix | 27 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/tools/text/untex/default.nix diff --git a/pkgs/tools/text/untex/default.nix b/pkgs/tools/text/untex/default.nix new file mode 100644 index 00000000000..e2f6142a2a0 --- /dev/null +++ b/pkgs/tools/text/untex/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "untex-${version}"; + version = "1.2"; + + src = fetchurl { + url = "https://www.ctan.org/tex-archive/support/untex/${name}.tar.gz"; + sha256 = "07p836jydd5yjy905m5ylnnac1h4cc4jsr41panqb808mlsiwmmy"; + }; + + unpackPhase = "tar xf $src"; + installTargets = "install install.man"; + installFlags = "BINDIR=$(out)/bin MANDIR=$(out)/share/man/man1"; + preBuild = '' + sed -i '1i#include \n#include ' untex.c + mkdir -p $out/bin $out/share/man/man1 + ''; + + meta = with stdenv.lib; { + description = "A utility which removes LaTeX commands from input"; + homepage = https://www.ctan.org/pkg/untex; + license = licenses.gpl1; + maintainers = with maintainers; [ joachifm ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9eb8e045398..129af9c5deb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3172,6 +3172,8 @@ let unrtf = callPackage ../tools/text/unrtf { }; + untex = callPackage ../tools/text/untex { }; + upx = callPackage ../tools/compression/upx { }; urlview = callPackage ../applications/misc/urlview {}; From ba03068c210ada1b5c3dee56cb90708af3057e48 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 2 Jul 2015 02:17:50 +0200 Subject: [PATCH 3/4] libwpd: add meta.{description,license,homepage} --- pkgs/development/libraries/libwpd/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/libwpd/default.nix b/pkgs/development/libraries/libwpd/default.nix index df5917fb05c..01ae59efdf4 100644 --- a/pkgs/development/libraries/libwpd/default.nix +++ b/pkgs/development/libraries/libwpd/default.nix @@ -11,4 +11,10 @@ stdenv.mkDerivation rec { buildInputs = [ glib libgsf libxml2 zlib librevenge ]; nativeBuildInputs = [ pkgconfig ]; + + meta = with stdenv.lib; { + description = "A library for importing and exporting WordPerfect documents"; + homepage = http://libwpd.sourceforge.net/; + license = licenses.lgpl21; + }; } From ef772328ebd98b2d570de54e2f61a46b0aecf9b9 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 2 Jul 2015 02:19:03 +0200 Subject: [PATCH 4/4] recoll: make use of unrtf, untex, and Word Perfect filters --- pkgs/applications/search/recoll/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix index 0eb4632a4c0..3182f4a5c66 100644 --- a/pkgs/applications/search/recoll/default.nix +++ b/pkgs/applications/search/recoll/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl , qt4, xapian, file, python , djvulibre, groff, libxslt, unzip, xpdf, antiword, catdoc, lyx +, libwpd, unrtf, untex , ghostscript, gawk, gnugrep, gnused, gnutar, gzip, libiconv }: assert stdenv.system != "powerpc-linux"; @@ -40,12 +41,11 @@ stdenv.mkDerivation rec { substituteInPlace $f --replace unzip ${unzip}/bin/unzip substituteInPlace $f --replace xls2csv ${catdoc}/bin/xls2csv substituteInPlace $f --replace xsltproc ${libxslt}/bin/xsltproc + substituteInPlace $f --replace unrtf ${unrtf}/bin/unrtf + substituteInPlace $f --replace untex ${untex}/bin/untex + substituteInPlace $f --replace wpd2html ${libwpd}/bin/wpd2html done ''; - # TODO: - #substituteInPlace $f --replace unrtf ${unrtf}/bin/unrtf - #substituteInPlace $f --replace untex ${untex}/bin/untex - #substituteInPlace $f --replace wpd2html ${wpd2html}/bin/wpd2html meta = with stdenv.lib; { description = "A full-text search tool";