diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/search/recoll | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/search/recoll')
3 files changed, 101 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/search/recoll/default.nix b/nixpkgs/pkgs/applications/search/recoll/default.nix new file mode 100644 index 000000000000..15c78fd81bb5 --- /dev/null +++ b/nixpkgs/pkgs/applications/search/recoll/default.nix @@ -0,0 +1,77 @@ +{ stdenv, fetchurl, lib, bison +, qt4, xapian, file, python, perl +, djvulibre, groff, libxslt, unzip, poppler_utils, antiword, catdoc, lyx +, libwpd, unrtf, untex +, ghostscript, gawk, gnugrep, gnused, gnutar, gzip, libiconv, zlib +, withGui ? true }: + +assert stdenv.hostPlatform.system != "powerpc-linux"; + +stdenv.mkDerivation rec { + ver = "1.24.4"; + name = "recoll-${ver}"; + + src = fetchurl { + url = "https://www.lesbonscomptes.com/recoll/${name}.tar.gz"; + sha256 = "0b1rz679gbv2qy5b5jgr25h1dk8560iac16lq0h2021nrv6ix74q"; + }; + + configureFlags = [ "--enable-recollq" ] + ++ lib.optionals (!withGui) [ "--disable-qtgui" "--disable-x11mon" ] + ++ (if stdenv.isLinux then [ "--with-inotify" ] else [ "--without-inotify" ]); + + buildInputs = [ xapian file python bison zlib ] + ++ lib.optional withGui qt4 + ++ lib.optional stdenv.isDarwin libiconv; + + patchPhase = stdenv.lib.optionalString stdenv.isDarwin '' + sed -i 's/-Wl,--no-undefined -Wl,--warn-unresolved-symbols//' Makefile.am + sed -i 's/-Wl,--no-undefined -Wl,--warn-unresolved-symbols//' Makefile.in + ''; + + # the filters search through ${PATH} using a sh proc 'checkcmds' for the + # filtering utils. Short circuit this by replacing the filtering command with + # the absolute path to the filtering command. + postInstall = '' + for f in $out/share/recoll/filters/* ; do + if [[ ! "$f" =~ \.zip$ ]]; then + substituteInPlace $f --replace '"antiword"' '"${lib.getBin antiword}/bin/antiword"' + substituteInPlace $f --replace '"awk"' '"${lib.getBin gawk}/bin/awk"' + substituteInPlace $f --replace '"catppt"' '"${lib.getBin catdoc}/bin/catppt"' + substituteInPlace $f --replace '"djvused"' '"${lib.getBin djvulibre}/bin/djvused"' + substituteInPlace $f --replace '"djvutxt"' '"${lib.getBin djvulibre}/bin/djvutxt"' + substituteInPlace $f --replace '"egrep"' '"${lib.getBin gnugrep}/bin/egrep"' + substituteInPlace $f --replace '"groff"' '"${lib.getBin groff}/bin/groff"' + substituteInPlace $f --replace '"gunzip"' '"${lib.getBin gzip}/bin/gunzip"' + substituteInPlace $f --replace '"iconv"' '"${lib.getBin libiconv}/bin/iconv"' + substituteInPlace $f --replace '"pdftotext"' '"${lib.getBin poppler_utils}/bin/pdftotext"' + substituteInPlace $f --replace '"pstotext"' '"${lib.getBin ghostscript}/bin/ps2ascii"' + substituteInPlace $f --replace '"sed"' '"${lib.getBin gnused}/bin/sed"' + substituteInPlace $f --replace '"tar"' '"${lib.getBin gnutar}/bin/tar"' + substituteInPlace $f --replace '"unzip"' '"${lib.getBin unzip}/bin/unzip"' + substituteInPlace $f --replace '"xls2csv"' '"${lib.getBin catdoc}/bin/xls2csv"' + substituteInPlace $f --replace '"xsltproc"' '"${lib.getBin libxslt}/bin/xsltproc"' + substituteInPlace $f --replace '"unrtf"' '"${lib.getBin unrtf}/bin/unrtf"' + substituteInPlace $f --replace '"untex"' '"${lib.getBin untex}/bin/untex"' + substituteInPlace $f --replace '"wpd2html"' '"${lib.getBin libwpd}/bin/wpd2html"' + substituteInPlace $f --replace /usr/bin/perl ${lib.getBin perl}/bin/perl + fi + done + '' + stdenv.lib.optionalString stdenv.isLinux '' + substituteInPlace $f --replace '"lyx"' '"${lib.getBin lyx}/bin/lyx"' + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "A full-text search tool"; + longDescription = '' + Recoll is an Xapian frontend that can search through files, archive + members, email attachments. + ''; + homepage = http://www.lesbonscomptes.com/recoll/; + license = licenses.gpl2; + platforms = platforms.unix; + maintainers = [ maintainers.jcumming ]; + }; +} diff --git a/nixpkgs/pkgs/applications/search/recoll/nodeblayout.patch b/nixpkgs/pkgs/applications/search/recoll/nodeblayout.patch new file mode 100644 index 000000000000..39988423ae1f --- /dev/null +++ b/nixpkgs/pkgs/applications/search/recoll/nodeblayout.patch @@ -0,0 +1,12 @@ +diff -ru recoll-1.21.3-orig/recollinstall.in recoll-1.21.3/recollinstall.in +--- recoll-1.21.3-orig/recollinstall.in 2015-09-28 08:08:42.000000000 +0100 ++++ recoll-1.21.3/recollinstall.in 2015-12-13 22:48:30.361776374 +0000 +@@ -45,9 +45,6 @@ + mandir=$DESTDIR/$mandir + ROOTFORPYTHON="--root=${DESTDIR}" + fi +-if test -f /etc/debian_version ; then +- OPTSFORPYTHON=--install-layout=deb +-fi + + echo "Installing to $PREFIX" diff --git a/nixpkgs/pkgs/applications/search/recoll/versionawk.patch b/nixpkgs/pkgs/applications/search/recoll/versionawk.patch new file mode 100644 index 000000000000..a03ffbc16df1 --- /dev/null +++ b/nixpkgs/pkgs/applications/search/recoll/versionawk.patch @@ -0,0 +1,12 @@ +diff -ru recoll-1.21.3-orig/filters/rclpdf recoll-1.21.3/filters/rclpdf +--- recoll-1.21.3-orig/filters/rclpdf 2015-09-28 08:08:15.000000000 +0100 ++++ recoll-1.21.3/filters/rclpdf 2015-12-14 21:37:01.984945925 +0000 +@@ -129,7 +129,7 @@ + { + # Test poppler version: at some point before 0.24, poppler began + # to properly escape text inside the header (but not the body). +- XYZ=`pdftotext -v 2>&1 | awk '/pdftotext/{print $3}'` ++ XYZ=`pdftotext -v 2>&1 | awk '/version/{print $3}'` + MAJOR=`echo $XYZ | cut -d. -f 1` + MINOR=`echo $XYZ | cut -d. -f 2` + escapeheader=1 |