about summary refs log tree commit diff
path: root/pkgs/applications/misc
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2013-05-09 13:58:08 +0200
committerVladimír Čunát <vcunat@gmail.com>2013-05-09 14:03:35 +0200
commitec3965d8d0b5594a9db11e6c9cd1c28d36e91cde (patch)
tree9bb0bc5ac4f3c6aaa170a9df5562f10e30ade47f /pkgs/applications/misc
parent84b0bf63b7f07dc1d9d19458dcbba6d02b4e2811 (diff)
downloadnixlib-ec3965d8d0b5594a9db11e6c9cd1c28d36e91cde.tar
nixlib-ec3965d8d0b5594a9db11e6c9cd1c28d36e91cde.tar.gz
nixlib-ec3965d8d0b5594a9db11e6c9cd1c28d36e91cde.tar.bz2
nixlib-ec3965d8d0b5594a9db11e6c9cd1c28d36e91cde.tar.lz
nixlib-ec3965d8d0b5594a9db11e6c9cd1c28d36e91cde.tar.xz
nixlib-ec3965d8d0b5594a9db11e6c9cd1c28d36e91cde.tar.zst
nixlib-ec3965d8d0b5594a9db11e6c9cd1c28d36e91cde.zip
Revert Merge x-updates into master due to mesa bloat
See #490 discussion.

This reverts commit 1278859d3167b9f84bfab680d9c8c463adf64a60, reversing
changes made to 0c020c98f9d4f49d5c9907db5f4b35aac7df959b.

Conflicts:
	pkgs/desktops/xfce/core/xfce4-session.nix (take master)
	pkgs/lib/misc.nix (auto)
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r--pkgs/applications/misc/blender/fix-include.patch12
-rw-r--r--pkgs/applications/misc/calibre/default.nix14
-rw-r--r--pkgs/applications/misc/djvulibre/default.nix10
-rw-r--r--pkgs/applications/misc/djvulibre/gcc-4.6.patch658
-rw-r--r--pkgs/applications/misc/evince/default.nix59
5 files changed, 731 insertions, 22 deletions
diff --git a/pkgs/applications/misc/blender/fix-include.patch b/pkgs/applications/misc/blender/fix-include.patch
deleted file mode 100644
index 44e2147d073c..000000000000
--- a/pkgs/applications/misc/blender/fix-include.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/intern/smoke/intern/WAVELET_NOISE.h b/intern/smoke/intern/WAVELET_NOISE.h
-index fce901b..1f73c5e 100644
---- a/intern/smoke/intern/WAVELET_NOISE.h
-+++ b/intern/smoke/intern/WAVELET_NOISE.h
-@@ -43,6 +43,7 @@
- #ifndef WAVELET_NOISE_H
- #define WAVELET_NOISE_H
- 
-+#include <string.h>
- #include <MERSENNETWISTER.h>
- 
- #ifdef WIN32
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index 23b5092cd4d8..562a9dd52ad4 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -1,15 +1,17 @@
 { stdenv, fetchurl, python, pyqt4, sip, popplerQt4, pkgconfig, libpng
 , imagemagick, libjpeg, fontconfig, podofo, qt4, icu, sqlite
-, pil, makeWrapper, unrar, chmlib, pythonPackages, xz, udisks, libusb1, libmtp
+, pil, makeWrapper, unrar, chmlib, pythonPackages, xz
 }:
 
 stdenv.mkDerivation rec {
-  name = "calibre-0.8.70";
-  # 0.9.* versions won't build: https://bugs.launchpad.net/calibre/+bug/1094719
+  name = "calibre-0.8.51";
 
   src = fetchurl {
-    url = "mirror://sourceforge/calibre/${name}.tar.xz";
-    sha256 = "12avwp8r6cnrw6c32gmd2hksa9rszdb76zs6fcmr3n8r1wkwa71g";
+    urls = [ 
+      "http://calibre-ebook.googlecode.com/files/${name}.tar.xz"
+      "mirror://sourceforge/calibre/${name}.tar.xz"
+    ];
+    sha256 = "1grcc0k9qpfpwp863x52rl9wj4wz61hcz67l8h2jmli0wxiq44z1";
   };
 
   inherit python;
@@ -21,7 +23,7 @@ stdenv.mkDerivation rec {
       fontconfig podofo qt4 pil chmlib icu
       pythonPackages.mechanize pythonPackages.lxml pythonPackages.dateutil
       pythonPackages.cssutils pythonPackages.beautifulsoup
-      pythonPackages.sqlite3 sqlite udisks libusb1 libmtp
+      pythonPackages.sqlite3 sqlite
     ];
 
   installPhase = ''
diff --git a/pkgs/applications/misc/djvulibre/default.nix b/pkgs/applications/misc/djvulibre/default.nix
index 4a51ec2d1acd..e22dce72b628 100644
--- a/pkgs/applications/misc/djvulibre/default.nix
+++ b/pkgs/applications/misc/djvulibre/default.nix
@@ -1,14 +1,16 @@
-{ stdenv, fetchurl, libjpeg, libtiff, librsvg }:
+{ stdenv, fetchurl, libjpeg, libtiff, libpng, ghostscript, libungif, zlib }:
 
 stdenv.mkDerivation rec {
-  name = "djvulibre-3.5.25.3";
+  name = "djvulibre-3.5.24";
 
   src = fetchurl {
     url = "mirror://sourceforge/djvu/${name}.tar.gz";
-    sha256 = "1q5i5ha4zmj2ahjfhi8cv1rah80vm43m9ads46ji38rgvpb7x3c9";
+    sha256 = "0d1592cmc7scg2jzah47mnvbqldhxb1x9vxm7y64a3iasa0lqwy0";
   };
 
-  buildInputs = [ libjpeg libtiff librsvg ];
+  buildInputs = [ libjpeg libtiff libpng ghostscript zlib libungif ];
+
+  patches = [ ./gcc-4.6.patch ];
 
   meta = {
     description = "A library and viewer for the DJVU file format for scanned images";
diff --git a/pkgs/applications/misc/djvulibre/gcc-4.6.patch b/pkgs/applications/misc/djvulibre/gcc-4.6.patch
new file mode 100644
index 000000000000..48fbc2bc7aca
--- /dev/null
+++ b/pkgs/applications/misc/djvulibre/gcc-4.6.patch
@@ -0,0 +1,658 @@
+commit 3341545edba359b292a8ef6db1b7d342caf3dcf1
+Author: Leon Bottou <leon@bottou.org>
+Date:   Wed May 4 21:25:35 2011 -0700
+
+    Added include <stddef.h> for gcc-4.6
+
+diff --git a/libdjvu/BSByteStream.cpp b/libdjvu/BSByteStream.cpp
+index b762ccf..d662ab0 100644
+--- a/libdjvu/BSByteStream.cpp
++++ b/libdjvu/BSByteStream.cpp
+@@ -62,6 +62,7 @@
+ 
+ // - Author: Leon Bottou, 07/1998
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/BSEncodeByteStream.cpp b/libdjvu/BSEncodeByteStream.cpp
+index 5d80e51..68bc3e3 100644
+--- a/libdjvu/BSEncodeByteStream.cpp
++++ b/libdjvu/BSEncodeByteStream.cpp
+@@ -71,6 +71,7 @@
+ #include "GOS.h"
+ #endif
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/ByteStream.cpp b/libdjvu/ByteStream.cpp
+index 158c33c..be01847 100644
+--- a/libdjvu/ByteStream.cpp
++++ b/libdjvu/ByteStream.cpp
+@@ -73,6 +73,7 @@
+ #include "GOS.h"
+ #include "GURL.h"
+ #include "DjVuMessage.h"
++#include <stddef.h>
+ #include <fcntl.h>
+ #if defined(WIN32) || defined(__CYGWIN32__)
+ # include <io.h>
+diff --git a/libdjvu/DjVuFileCache.cpp b/libdjvu/DjVuFileCache.cpp
+index 6b1e85d..7d7a192 100644
+--- a/libdjvu/DjVuFileCache.cpp
++++ b/libdjvu/DjVuFileCache.cpp
+@@ -63,6 +63,7 @@
+ #include "DjVuFileCache.h"
+ #include "debug.h"
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ 
+ 
+diff --git a/libdjvu/DjVuGlobal.cpp b/libdjvu/DjVuGlobal.cpp
+index e6d3cec..df9278e 100644
+--- a/libdjvu/DjVuGlobal.cpp
++++ b/libdjvu/DjVuGlobal.cpp
+@@ -76,6 +76,8 @@
+ #include "GThreads.h"
+ #include "GException.h"
+ #include "GContainer.h"
++
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/DjVuGlobalMemory.cpp b/libdjvu/DjVuGlobalMemory.cpp
+index 3c6012c..c8ba309 100644
+--- a/libdjvu/DjVuGlobalMemory.cpp
++++ b/libdjvu/DjVuGlobalMemory.cpp
+@@ -67,6 +67,8 @@
+ 
+ #include "DjVuGlobal.h"
+ #include "GException.h"
++
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "debug.h"
+diff --git a/libdjvu/DjVuMessage.cpp b/libdjvu/DjVuMessage.cpp
+index 6f5a735..1726025 100644
+--- a/libdjvu/DjVuMessage.cpp
++++ b/libdjvu/DjVuMessage.cpp
+@@ -71,6 +71,7 @@
+ #include "debug.h"
+ #include <ctype.h>
+ #include <string.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #ifdef WIN32
+ # include <tchar.h>
+diff --git a/libdjvu/DjVuMessageLite.cpp b/libdjvu/DjVuMessageLite.cpp
+index b8c1010..5daa9d9 100644
+--- a/libdjvu/DjVuMessageLite.cpp
++++ b/libdjvu/DjVuMessageLite.cpp
+@@ -73,8 +73,8 @@
+ #include "debug.h"
+ #include <ctype.h>
+ #include <string.h>
++#include <stddef.h>
+ #include <stdlib.h>
+-// #include <stdio.h>
+ #ifdef WIN32
+ #include <tchar.h>
+ #include <windows.h>
+diff --git a/libdjvu/DjVuPalette.cpp b/libdjvu/DjVuPalette.cpp
+index c489f7b..76b0bf4 100644
+--- a/libdjvu/DjVuPalette.cpp
++++ b/libdjvu/DjVuPalette.cpp
+@@ -64,6 +64,8 @@
+ #include "ByteStream.h"
+ #include "BSByteStream.h"
+ #include "DjVuPalette.h"
++
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <math.h>
+ 
+diff --git a/libdjvu/DjVuPort.h b/libdjvu/DjVuPort.h
+index f6a92f6..e2b3125 100644
+--- a/libdjvu/DjVuPort.h
++++ b/libdjvu/DjVuPort.h
+@@ -65,6 +65,7 @@
+ 
+ #include "GThreads.h"
+ #include "GURL.h"
++#include "stddef.h"
+ 
+ #ifdef HAVE_NAMESPACES
+ namespace DJVU {
+diff --git a/libdjvu/DjVuToPS.cpp b/libdjvu/DjVuToPS.cpp
+index 5517bf3..6914ff9 100644
+--- a/libdjvu/DjVuToPS.cpp
++++ b/libdjvu/DjVuToPS.cpp
+@@ -72,6 +72,7 @@
+ #include "GPixmap.h"
+ #include "debug.h"
+ #include <stdarg.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <time.h>
+diff --git a/libdjvu/GBitmap.cpp b/libdjvu/GBitmap.cpp
+index ab5c0de..797edcc 100644
+--- a/libdjvu/GBitmap.cpp
++++ b/libdjvu/GBitmap.cpp
+@@ -66,6 +66,8 @@
+ #include "GString.h"
+ #include "GThreads.h"
+ #include "GException.h"
++#include <stddef.h>
++#include <stdlib.h>
+ #include <string.h>
+ 
+ // - Author: Leon Bottou, 05/1997
+diff --git a/libdjvu/GException.cpp b/libdjvu/GException.cpp
+index 2ea179a..89da70f 100644
+--- a/libdjvu/GException.cpp
++++ b/libdjvu/GException.cpp
+@@ -60,6 +60,7 @@
+ # pragma implementation
+ #endif
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/GOS.cpp b/libdjvu/GOS.cpp
+index e784932..d2088e2 100644
+--- a/libdjvu/GOS.cpp
++++ b/libdjvu/GOS.cpp
+@@ -65,6 +65,7 @@
+ #include "GOS.h"
+ #include "GURL.h"
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <ctype.h>
+diff --git a/libdjvu/GPixmap.cpp b/libdjvu/GPixmap.cpp
+index 392df54..4bf6f57 100644
+--- a/libdjvu/GPixmap.cpp
++++ b/libdjvu/GPixmap.cpp
+@@ -75,6 +75,8 @@
+ #include "GThreads.h"
+ #include "Arrays.h"
+ #include "JPEGDecoder.h"
++
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <math.h>
+ #include <assert.h>
+diff --git a/libdjvu/GSmartPointer.cpp b/libdjvu/GSmartPointer.cpp
+index 6e523e7..58aef5b 100644
+--- a/libdjvu/GSmartPointer.cpp
++++ b/libdjvu/GSmartPointer.cpp
+@@ -67,6 +67,7 @@
+ // Our original implementation consisted of multiple classes.
+ // <http://prdownloads.sourceforge.net/djvu/DjVu2_2b-src.tgz>.
+ 
++#include <stddef.h>
+ #include <string.h>
+ #if PARANOID_DEBUG
+ # include <assert.h>
+diff --git a/libdjvu/GSmartPointer.h b/libdjvu/GSmartPointer.h
+index 82781bd..8a8bb8a 100644
+--- a/libdjvu/GSmartPointer.h
++++ b/libdjvu/GSmartPointer.h
+@@ -97,6 +97,8 @@
+ #include "DjVuGlobal.h"
+ #include "atomic.h"
+ 
++#include <stddef.h>
++
+ #ifdef HAVE_NAMESPACES
+ namespace DJVU {
+ # ifdef NOT_DEFINED // Just to fool emacs c++ mode
+diff --git a/libdjvu/GString.cpp b/libdjvu/GString.cpp
+index 03f6226..350b11b 100644
+--- a/libdjvu/GString.cpp
++++ b/libdjvu/GString.cpp
+@@ -73,6 +73,7 @@
+ #include "GThreads.h"
+ #include "debug.h"
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/GString.h b/libdjvu/GString.h
+index b63b753..3aa1f76 100644
+--- a/libdjvu/GString.h
++++ b/libdjvu/GString.h
+@@ -108,6 +108,7 @@
+ #include "DjVuGlobal.h"
+ #include "GContainer.h"
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #ifdef WIN32
+diff --git a/libdjvu/GThreads.cpp b/libdjvu/GThreads.cpp
+index d81f3c3..253fed8 100644
+--- a/libdjvu/GThreads.cpp
++++ b/libdjvu/GThreads.cpp
+@@ -71,6 +71,8 @@
+ #include "GThreads.h"
+ #include "GException.h"
+ #include "DjVuMessageLite.h"
++
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ 
+diff --git a/libdjvu/GURL.cpp b/libdjvu/GURL.cpp
+index c37bf52..a80078c 100644
+--- a/libdjvu/GURL.cpp
++++ b/libdjvu/GURL.cpp
+@@ -72,6 +72,7 @@
+ #include "GURL.h"
+ #include "debug.h"
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <ctype.h>
+diff --git a/libdjvu/GUnicode.cpp b/libdjvu/GUnicode.cpp
+index 415c081..a8b25b8 100644
+--- a/libdjvu/GUnicode.cpp
++++ b/libdjvu/GUnicode.cpp
+@@ -62,6 +62,8 @@
+ 
+ #include "GString.h"
+ 
++#include <stddef.h>
++
+ #if HAS_ICONV
+ #include <iconv.h>
+ #endif
+diff --git a/libdjvu/IFFByteStream.h b/libdjvu/IFFByteStream.h
+index a653f8c..e31b216 100644
+--- a/libdjvu/IFFByteStream.h
++++ b/libdjvu/IFFByteStream.h
+@@ -124,6 +124,7 @@
+ 
+ 
+ #include "DjVuGlobal.h"
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/IW44EncodeCodec.cpp b/libdjvu/IW44EncodeCodec.cpp
+index 8d7b12c..49081b7 100644
+--- a/libdjvu/IW44EncodeCodec.cpp
++++ b/libdjvu/IW44EncodeCodec.cpp
+@@ -76,6 +76,7 @@
+ #include "IFFByteStream.h"
+ #include "GRect.h"
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+diff --git a/libdjvu/IW44Image.cpp b/libdjvu/IW44Image.cpp
+index 9476726..4a19fb5 100644
+--- a/libdjvu/IW44Image.cpp
++++ b/libdjvu/IW44Image.cpp
+@@ -76,6 +76,7 @@
+ #include "IFFByteStream.h"
+ #include "GRect.h"
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+diff --git a/libdjvu/JPEGDecoder.h b/libdjvu/JPEGDecoder.h
+index bd430a0..fad1d4c 100644
+--- a/libdjvu/JPEGDecoder.h
++++ b/libdjvu/JPEGDecoder.h
+@@ -64,6 +64,7 @@
+ 
+ #ifdef NEED_JPEG_DECODER
+ 
++#include <stddef.h>
+ #include <string.h>
+ #include <setjmp.h>
+ 
+diff --git a/libdjvu/MMX.cpp b/libdjvu/MMX.cpp
+index 5ab60bb..528dab6 100644
+--- a/libdjvu/MMX.cpp
++++ b/libdjvu/MMX.cpp
+@@ -62,6 +62,7 @@
+ 
+ #include "MMX.h"
+ #include <stdio.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ 
+ 
+diff --git a/libdjvu/UnicodeByteStream.h b/libdjvu/UnicodeByteStream.h
+index 0ae112b..9b49a17 100644
+--- a/libdjvu/UnicodeByteStream.h
++++ b/libdjvu/UnicodeByteStream.h
+@@ -88,6 +88,7 @@
+ #include "GString.h"
+ #include "ByteStream.h"
+ 
++#include <stddef.h>
+ 
+ #ifdef HAVE_NAMESPACES
+ namespace DJVU {
+diff --git a/libdjvu/XMLParser.cpp b/libdjvu/XMLParser.cpp
+index 84386c5..7da923a 100644
+--- a/libdjvu/XMLParser.cpp
++++ b/libdjvu/XMLParser.cpp
+@@ -75,6 +75,7 @@
+ #include "debug.h"
+ #include <stdio.h>
+ #include <ctype.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ 
+ 
+diff --git a/libdjvu/ZPCodec.cpp b/libdjvu/ZPCodec.cpp
+index f6e971d..ff5b9bf 100644
+--- a/libdjvu/ZPCodec.cpp
++++ b/libdjvu/ZPCodec.cpp
+@@ -66,6 +66,8 @@
+ #include "ZPCodec.h"
+ #include "ByteStream.h"
+ #include "GException.h"
++
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <assert.h>
+ #include <math.h>
+diff --git a/libdjvu/atomic.cpp b/libdjvu/atomic.cpp
+index bdc193e..63fd483 100644
+--- a/libdjvu/atomic.cpp
++++ b/libdjvu/atomic.cpp
+@@ -28,6 +28,7 @@
+ # include "config.h"
+ #endif
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <assert.h>
+ #include "atomic.h"
+diff --git a/libdjvu/ddjvuapi.cpp b/libdjvu/ddjvuapi.cpp
+index b18b84b..f40f5aa 100644
+--- a/libdjvu/ddjvuapi.cpp
++++ b/libdjvu/ddjvuapi.cpp
+@@ -60,6 +60,7 @@
+ # pragma implementation "ddjvuapi.h"
+ #endif
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/ddjvuapi.h b/libdjvu/ddjvuapi.h
+index d0ed48f..841f223 100644
+--- a/libdjvu/ddjvuapi.h
++++ b/libdjvu/ddjvuapi.h
+@@ -64,6 +64,7 @@ extern "C" {
+ }
+ #endif
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ 
+diff --git a/libdjvu/miniexp.cpp b/libdjvu/miniexp.cpp
+index e0fb087..fc51297 100644
+--- a/libdjvu/miniexp.cpp
++++ b/libdjvu/miniexp.cpp
+@@ -23,6 +23,7 @@
+ # pragma implementation "miniexp.h"
+ #endif
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <ctype.h>
+diff --git a/libdjvu/miniexp.h b/libdjvu/miniexp.h
+index 91e345d..993005b 100644
+--- a/libdjvu/miniexp.h
++++ b/libdjvu/miniexp.h
+@@ -38,7 +38,8 @@ extern "C" {
+ #ifndef MINILISPAPI
+ # define MINILISPAPI /**/
+ #endif
+-  
++
++#include <stddef.h>  
+ 
+ /* -------------------------------------------------- */
+ /* LISP EXPRESSIONS                                   */
+diff --git a/tools/bzz.cpp b/tools/bzz.cpp
+index ca092e1..2ebc7b9 100644
+--- a/tools/bzz.cpp
++++ b/tools/bzz.cpp
+@@ -94,6 +94,7 @@
+ #include "GURL.h"
+ #include "DjVuMessage.h"
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ 
+ static const char *program = "(unknown)";
+diff --git a/tools/c44.cpp b/tools/c44.cpp
+index 6f23b53..855504b 100644
+--- a/tools/c44.cpp
++++ b/tools/c44.cpp
+@@ -226,6 +226,7 @@
+ #include <locale.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ 
+ // command line data
+diff --git a/tools/cjb2.cpp b/tools/cjb2.cpp
+index 8cf89b9..11eb662 100644
+--- a/tools/cjb2.cpp
++++ b/tools/cjb2.cpp
+@@ -120,6 +120,7 @@
+ #include "jb2tune.h"
+ 
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #if HAVE_TIFF
+ #include <tiffio.h>
+diff --git a/tools/cpaldjvu.cpp b/tools/cpaldjvu.cpp
+index 111cbd3..b640a7a 100644
+--- a/tools/cpaldjvu.cpp
++++ b/tools/cpaldjvu.cpp
+@@ -118,6 +118,7 @@
+ #include "jb2tune.h"
+ 
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <math.h>
+ 
+diff --git a/tools/csepdjvu.cpp b/tools/csepdjvu.cpp
+index cd721f8..d5203d5 100644
+--- a/tools/csepdjvu.cpp
++++ b/tools/csepdjvu.cpp
+@@ -162,6 +162,7 @@
+ #include "jb2tune.h"
+ 
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ 
+ #undef MIN
+diff --git a/tools/ddjvu.cpp b/tools/ddjvu.cpp
+index 817e045..981a270 100644
+--- a/tools/ddjvu.cpp
++++ b/tools/ddjvu.cpp
+@@ -62,6 +62,7 @@
+ # include "config.h"
+ #endif
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+diff --git a/tools/djvm.cpp b/tools/djvm.cpp
+index 951bd66..6ea88c2 100644
+--- a/tools/djvm.cpp
++++ b/tools/djvm.cpp
+@@ -135,9 +135,9 @@
+ #include "DjVuMessage.h"
+ 
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+-#include <stdlib.h>
+ 
+ static const char * progname;
+ 
+diff --git a/tools/djvmcvt.cpp b/tools/djvmcvt.cpp
+index 9ca1c54..20b468a 100644
+--- a/tools/djvmcvt.cpp
++++ b/tools/djvmcvt.cpp
+@@ -144,6 +144,7 @@
+ 
+ #include <locale.h>
+ #include <stdio.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ 
+ static const char * progname;
+diff --git a/tools/djvudump.cpp b/tools/djvudump.cpp
+index 6a0215a..2dddbdf 100644
+--- a/tools/djvudump.cpp
++++ b/tools/djvudump.cpp
+@@ -119,6 +119,7 @@ xxx
+ #include <locale.h>
+ #include <stdio.h>
+ #include <ctype.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ 
+ void
+diff --git a/tools/djvuextract.cpp b/tools/djvuextract.cpp
+index 4a9f381..907b99c 100644
+--- a/tools/djvuextract.cpp
++++ b/tools/djvuextract.cpp
+@@ -105,6 +105,7 @@
+ #include "GOS.h"
+ #include "DjVuMessage.h"
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ 
+ 
+diff --git a/tools/djvumake.cpp b/tools/djvumake.cpp
+index 7020484..4c5fc0f 100644
+--- a/tools/djvumake.cpp
++++ b/tools/djvumake.cpp
+@@ -153,6 +153,7 @@
+ 
+ #include <locale.h>
+ #include <stdio.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <ctype.h>
+ 
+diff --git a/tools/djvups.cpp b/tools/djvups.cpp
+index 51aa999..632b832 100644
+--- a/tools/djvups.cpp
++++ b/tools/djvups.cpp
+@@ -57,6 +57,7 @@
+ # include "config.h"
+ #endif
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+diff --git a/tools/djvused.cpp b/tools/djvused.cpp
+index de84dcd..687fdca 100644
+--- a/tools/djvused.cpp
++++ b/tools/djvused.cpp
+@@ -61,6 +61,7 @@
+ #endif
+ 
+ #include <stdio.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <errno.h>
+diff --git a/tools/djvuserve.cpp b/tools/djvuserve.cpp
+index 19a17da..818fe78 100644
+--- a/tools/djvuserve.cpp
++++ b/tools/djvuserve.cpp
+@@ -73,6 +73,7 @@
+ 
+ #include <locale.h>
+ #include <stdio.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <sys/stat.h>
+ #include <time.h>
+diff --git a/tools/djvutxt.cpp b/tools/djvutxt.cpp
+index ba2c745..9e9124c 100644
+--- a/tools/djvutxt.cpp
++++ b/tools/djvutxt.cpp
+@@ -61,6 +61,7 @@
+ # include "config.h"
+ #endif
+ 
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+diff --git a/tools/tiff2pdf.h b/tools/tiff2pdf.h
+index 082f5fb..656dc43 100644
+--- a/tools/tiff2pdf.h
++++ b/tools/tiff2pdf.h
+@@ -22,6 +22,7 @@
+ # endif
+ # if HAVE_TIFF
+ #  include <stdio.h>
++#  include <stddef.h>
+ #  include <stdlib.h>
+ #  include <tiff.h>
+ #  include <tiffio.h>
+diff --git a/xmltools/djvutoxml.cpp b/xmltools/djvutoxml.cpp
+index 17c769b..b40535e 100644
+--- a/xmltools/djvutoxml.cpp
++++ b/xmltools/djvutoxml.cpp
+@@ -71,6 +71,7 @@
+ 
+ #include <locale.h>
+ #include <stdio.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <sys/stat.h>
+ #include <assert.h>
+diff --git a/xmltools/djvuxmlparser.cpp b/xmltools/djvuxmlparser.cpp
+index bdc5768..6679a9d 100644
+--- a/xmltools/djvuxmlparser.cpp
++++ b/xmltools/djvuxmlparser.cpp
+@@ -70,6 +70,7 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ 
+ static void 
diff --git a/pkgs/applications/misc/evince/default.nix b/pkgs/applications/misc/evince/default.nix
new file mode 100644
index 000000000000..793c7bda2994
--- /dev/null
+++ b/pkgs/applications/misc/evince/default.nix
@@ -0,0 +1,59 @@
+{ fetchurl, stdenv, perl, perlXMLParser, gettext, intltool
+, pkgconfig, glib, gtk, gnomedocutils, gnomeicontheme
+, libgnome, libgnomeui, scrollkeeper, libxslt
+, libglade, libgnome_keyring, dbus, dbus_glib
+, poppler, libspectre, djvulibre, shared_mime_info
+, makeWrapper, which, ghostscript
+, recentListSize ? null # 5 is not enough, allow passing a different number
+}:
+
+stdenv.mkDerivation rec {
+  name = "evince-2.32.0";
+
+  src = fetchurl {
+    url = "http://ftp.gnome.org/pub/GNOME/sources/evince/2.32/${name}.tar.bz2";
+    sha256 = "2a4c91ae38f8b5028cebb91b9da9ddc50ea8ae3f3d429df89ba351da2d787ff7";
+  };
+
+  buildInputs = [
+    perl perlXMLParser gettext intltool pkgconfig glib gtk
+    gnomedocutils gnomeicontheme libgnome libgnomeui libglade
+    scrollkeeper libgnome_keyring
+    libxslt  # for `xsltproc'
+    dbus dbus_glib poppler libspectre djvulibre makeWrapper which
+    ghostscript
+  ];
+
+  configureFlags = "--with-libgnome --enable-dbus --enable-pixbuf "
+
+    # Do not use nautilus
+    + " --disable-nautilus "
+    # Do not update Scrollkeeper's database (GNOME's help system).
+    + "--disable-scrollkeeper";
+
+  postUnpack = if recentListSize != null then ''
+    sed -i 's/\(gtk_recent_chooser_set_limit .*\)5)/\1${builtins.toString recentListSize})/' */shell/ev-open-recent-action.c
+    sed -i 's/\(if (++n_items == \)5\(.*\)/\1${builtins.toString recentListSize}\2/' */shell/ev-window.c
+  '' else "";
+
+  postInstall = ''
+    # Tell Glib/GIO about the MIME info directory, which is used
+    # by `g_file_info_get_content_type ()'.
+    wrapProgram "$out/bin/evince" \
+      --prefix XDG_DATA_DIRS : "${shared_mime_info}/share:$out/share"
+  '';
+
+  meta = {
+    homepage = http://www.gnome.org/projects/evince/;
+    description = "Evince, GNOME's document viewer";
+
+    longDescription = ''
+      Evince is a document viewer for multiple document formats.  It
+      currently supports PDF, PostScript, DjVu, TIFF and DVI.  The goal
+      of Evince is to replace the multiple document viewers that exist
+      on the GNOME Desktop with a single simple application.
+    '';
+
+    license = "GPLv2+";
+  };
+}