summary refs log tree commit diff
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-07-20 11:00:04 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-07-20 11:00:04 +0200
commit52b3546e4ada1b6280f6759ecf181fe7a3dd6db1 (patch)
treeb1cc44735961ad61df683fcc440e58527e92f4ac
parent37dcb18a5e1a3adfa5a8276f8835a0ad28aa8f97 (diff)
parentef772328ebd98b2d570de54e2f61a46b0aecf9b9 (diff)
downloadnixlib-52b3546e4ada1b6280f6759ecf181fe7a3dd6db1.tar
nixlib-52b3546e4ada1b6280f6759ecf181fe7a3dd6db1.tar.gz
nixlib-52b3546e4ada1b6280f6759ecf181fe7a3dd6db1.tar.bz2
nixlib-52b3546e4ada1b6280f6759ecf181fe7a3dd6db1.tar.lz
nixlib-52b3546e4ada1b6280f6759ecf181fe7a3dd6db1.tar.xz
nixlib-52b3546e4ada1b6280f6759ecf181fe7a3dd6db1.tar.zst
nixlib-52b3546e4ada1b6280f6759ecf181fe7a3dd6db1.zip
merge #8617: recoll: filters for LaTeX, RTF, and WP
-rw-r--r--pkgs/applications/search/recoll/default.nix8
-rw-r--r--pkgs/development/libraries/libwpd/default.nix6
-rw-r--r--pkgs/tools/text/unrtf/default.nix27
-rw-r--r--pkgs/tools/text/untex/default.nix27
-rw-r--r--pkgs/top-level/all-packages.nix4
5 files changed, 68 insertions, 4 deletions
diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix
index 0eb4632a4c00..3182f4a5c66c 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";
diff --git a/pkgs/development/libraries/libwpd/default.nix b/pkgs/development/libraries/libwpd/default.nix
index df5917fb05cf..01ae59efdf41 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;
+  };
 }
diff --git a/pkgs/tools/text/unrtf/default.nix b/pkgs/tools/text/unrtf/default.nix
new file mode 100644
index 000000000000..6b177b8b37be
--- /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/tools/text/untex/default.nix b/pkgs/tools/text/untex/default.nix
new file mode 100644
index 000000000000..e2f6142a2a0f
--- /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 <stdlib.h>\n#include <string.h>' 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 4bfe93a445e7..32dda557f1d6 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3192,6 +3192,10 @@ let
 
   unoconv = callPackage ../tools/text/unoconv { };
 
+  unrtf = callPackage ../tools/text/unrtf { };
+
+  untex = callPackage ../tools/text/untex { };
+
   upx = callPackage ../tools/compression/upx { };
 
   uriparser = callPackage ../development/libraries/uriparser {};