about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/X11/xpra/default.nix11
-rw-r--r--pkgs/tools/X11/xpra/gtk3.nix17
-rw-r--r--pkgs/tools/backup/bareos/default.nix4
-rw-r--r--pkgs/tools/compression/brotli/unstable.nix46
-rw-r--r--pkgs/tools/filesystems/sshfs-fuse/default.nix16
-rw-r--r--pkgs/tools/misc/mimeo/default.nix33
-rw-r--r--pkgs/tools/misc/xdo/default.nix6
-rw-r--r--pkgs/tools/networking/curl/default.nix2
-rw-r--r--pkgs/tools/networking/dropbear/default.nix4
-rw-r--r--pkgs/tools/networking/openssh/default.nix20
-rw-r--r--pkgs/tools/networking/speedtest-cli/default.nix5
-rw-r--r--pkgs/tools/networking/unbound/default.nix5
-rw-r--r--pkgs/tools/security/gnupg/1compat.nix4
-rw-r--r--pkgs/tools/security/gpgstats/default.nix3
-rw-r--r--pkgs/tools/security/lastpass-cli/default.nix4
-rw-r--r--pkgs/tools/security/sshuttle/default.nix4
-rw-r--r--pkgs/tools/system/awstats/default.nix58
-rw-r--r--pkgs/tools/text/diction/default.nix21
-rw-r--r--pkgs/tools/typesetting/pygmentex/default.nix45
-rw-r--r--pkgs/tools/typesetting/tex/nix/default.nix4
-rw-r--r--pkgs/tools/video/flvtool2/default.nix31
21 files changed, 278 insertions, 65 deletions
diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix
index e0e12051bffd..b0c79342d42a 100644
--- a/pkgs/tools/X11/xpra/default.nix
+++ b/pkgs/tools/X11/xpra/default.nix
@@ -6,12 +6,11 @@
 , libfakeXinerama }:
 
 buildPythonApplication rec {
-  name = "xpra-0.15.3";
+  name = "xpra-0.16.2";
   namePrefix = "";
-
   src = fetchurl {
-    url = "https://www.xpra.org/src/${name}.tar.xz";
-    sha256 = "1671r4ah2h0i3qbp27csck506n5y1zr9fv0869cv09knspa358i4";
+    url = "http://xpra.org/src/${name}.tar.xz";
+    sha256 = "0h55rv46byzv2g8g77bm0a0py8jpz3gbr5fhr5jy9sisyr0vk6ff";
   };
 
   buildInputs = [
@@ -36,7 +35,7 @@ buildPythonApplication rec {
   preBuild = ''
     export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-2.0) $(pkg-config --cflags pygtk-2.0) $(pkg-config --cflags xtst)"
   '';
-  setupPyBuildFlags = ["--with-Xdummy"];
+  setupPyBuildFlags = ["--with-Xdummy" "--without-strict"];
 
   preInstall = ''
     # see https://bitbucket.org/pypa/setuptools/issue/130/install_data-doesnt-respect-prefix
@@ -52,6 +51,8 @@ buildPythonApplication rec {
       --prefix PATH : ${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin
   '';
 
+  preCheck = "exit 0";
+
   #TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though
   #postFixup = ''
   #  sed -i '2iexport XKB_BINDIR="${xkbcomp}/bin"' $out/bin/xpra
diff --git a/pkgs/tools/X11/xpra/gtk3.nix b/pkgs/tools/X11/xpra/gtk3.nix
index 5b81ec0a7edc..7fd24a510d5d 100644
--- a/pkgs/tools/X11/xpra/gtk3.nix
+++ b/pkgs/tools/X11/xpra/gtk3.nix
@@ -6,14 +6,19 @@
 , libfakeXinerama }:
 
 buildPythonApplication rec {
-  name = "xpra-0.14.19";
+  name = "xpra-0.16.2";
   namePrefix = "";
 
   src = fetchurl {
-    url = "https://www.xpra.org/src/${name}.tar.xz";
-    sha256 = "0jifaysz4br1v0zibnzgd0k02rgybbsysvwrgbar1452sjb3db5m";
+    url = "http://xpra.org/src/${name}.tar.xz";
+    sha256 = "0h55rv46byzv2g8g77bm0a0py8jpz3gbr5fhr5jy9sisyr0vk6ff";
   };
 
+  patchPhase = ''
+    substituteInPlace setup.py --replace 'pycairo' 'py3cairo'
+    substituteInPlace xpra/client/gtk3/cairo_workaround.pyx --replace 'pycairo/pycairo.h' 'py3cairo.h'
+  '';
+
   buildInputs = [
     pkgconfig
 
@@ -36,8 +41,7 @@ buildPythonApplication rec {
   preBuild = ''
     export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-3.0) $(pkg-config --cflags xtst)"
   '';
-  setupPyBuildFlags = [ "--with-gtk3" "--without-gtk2" "--with-Xdummy" ];
-
+  setupPyBuildFlags = [ "--without-strict" "--with-gtk3" "--without-gtk2" "--with-Xdummy" ];
 
   preInstall = ''
     # see https://bitbucket.org/pypa/setuptools/issue/130/install_data-doesnt-respect-prefix
@@ -53,6 +57,9 @@ buildPythonApplication rec {
       --prefix PATH : ${getopt}/bin:${xorgserver}/bin:${xauth}/bin:${which}/bin:${utillinux}/bin
   '';
 
+  preCheck = "exit 0";
+  doInstallCheck = false;
+
   #TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though
   #postFixup = ''
   #  sed -i '2iexport XKB_BINDIR="${xkbcomp}/bin"' $out/bin/xpra
diff --git a/pkgs/tools/backup/bareos/default.nix b/pkgs/tools/backup/bareos/default.nix
index b34c62514058..5a7c35e460fe 100644
--- a/pkgs/tools/backup/bareos/default.nix
+++ b/pkgs/tools/backup/bareos/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, pkgconfig, nettools, gettext, libtool, flex
-, readline ? null, openssl ? null, python ? null, ncurses ? null
+, readline ? null, openssl ? null, python ? null, ncurses ? null, rocksdb
 , sqlite ? null, postgresql ? null, libmysql ? null, zlib ? null, lzo ? null
 , jansson ? null, acl ? null, glusterfs ? null, libceph ? null, libcap ? null
 }:
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [
     nettools gettext readline openssl python flex ncurses sqlite postgresql
-    libmysql zlib lzo jansson acl glusterfs libceph libcap
+    libmysql zlib lzo jansson acl glusterfs libceph libcap rocksdb
   ];
 
   postPatch = ''
diff --git a/pkgs/tools/compression/brotli/unstable.nix b/pkgs/tools/compression/brotli/unstable.nix
new file mode 100644
index 000000000000..59eb1e1d469a
--- /dev/null
+++ b/pkgs/tools/compression/brotli/unstable.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchFromGitHub }:
+
+# ?TODO: there's also python lib in there
+
+stdenv.mkDerivation rec {
+  name = "brotli-20160112";
+  version = "bed93862";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "brotli";
+    rev = "bed93862608d4d232ebe6d229f04e48399775e8b";
+    sha256 = "0g94kqh984qkbqbj4fpkkyji9wnbrb9cs32r9d6niw1sqfnfkd6f";
+  };
+
+  preConfigure = "cd tools";
+
+  # Debian installs "brotli" instead of "bro" but let's keep upstream choice for now.
+  installPhase = ''
+    mkdir -p "$out/bin"
+    mv ./bro "$out/bin/"
+  '';
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+
+    description = "A generic-purpose lossless compression algorithm and tool";
+
+    longDescription =
+      ''  Brotli is a generic-purpose lossless compression algorithm that
+          compresses data using a combination of a modern variant of the LZ77
+          algorithm, Huffman coding and 2nd order context modeling, with a
+          compression ratio comparable to the best currently available
+          general-purpose compression methods. It is similar in speed with
+          deflate but offers more dense compression.
+
+          The specification of the Brotli Compressed Data Format is defined
+          in the following internet draft:
+          http://www.ietf.org/id/draft-alakuijala-brotli
+      '';
+
+    license = licenses.mit;
+    maintainers = [];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/tools/filesystems/sshfs-fuse/default.nix b/pkgs/tools/filesystems/sshfs-fuse/default.nix
index a5b01db4cd2a..3a460241daaa 100644
--- a/pkgs/tools/filesystems/sshfs-fuse/default.nix
+++ b/pkgs/tools/filesystems/sshfs-fuse/default.nix
@@ -1,14 +1,18 @@
-{ stdenv, fetchurl, pkgconfig, glib, fuse }:
+{ stdenv, fetchFromGitHub, pkgconfig, glib, fuse, autoreconfHook }:
 
 stdenv.mkDerivation rec {
-  name = "sshfs-fuse-2.5";
+  version = "2.7";
+  name = "sshfs-fuse-${version}";
   
-  src = fetchurl {
-    url = "mirror://sourceforge/fuse/${name}.tar.gz";
-    sha256 = "0gp6qr33l2p0964j0kds0dfmvyyf5lpgsn11daf0n5fhwm9185z9";
+  src = fetchFromGitHub {
+    repo = "sshfs";
+    owner = "libfuse";
+    rev = "sshfs-${version}";
+    sha256 = "17l9b89zy5qzfcknw3krk74rfrqaa8q1r8jwdsahaqajsy09h4x4";
   };
   
-  buildInputs = [ pkgconfig glib fuse ];
+  buildInputs = [ pkgconfig glib fuse autoreconfHook ];
+
   postInstall = ''
     mkdir -p $out/sbin
     ln -sf $out/bin/sshfs $out/sbin/mount.sshfs
diff --git a/pkgs/tools/misc/mimeo/default.nix b/pkgs/tools/misc/mimeo/default.nix
new file mode 100644
index 000000000000..66e91ed14240
--- /dev/null
+++ b/pkgs/tools/misc/mimeo/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, desktop_file_utils, file, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+  name = "mimeo-${version}";
+  version = "2016.2";
+
+  src = fetchurl {
+    url = "http://xyne.archlinux.ca/projects/mimeo/src/${name}.tar.xz";
+    sha256 = "1y3a60983ind2cakjwxq3cgc76xhcdqz5lcpnyii34s6wviybkn1";
+  };
+
+  buildInputs = [ file desktop_file_utils ];
+
+  propagatedBuildInputs = [ python3Packages.pyxdg ];
+
+  preConfigure = ''
+    substituteInPlace Mimeo.py \
+      --replace "EXE_UPDATE_DESKTOP_DATABASE = 'update-desktop-database'" \
+                "EXE_UPDATE_DESKTOP_DATABASE = '${desktop_file_utils}/bin/update-desktop-database'" \
+      --replace "EXE_FILE = 'file'" \
+                "EXE_FILE = '${file}/bin/file'"
+  '';
+
+  installPhase = "install -Dm755 Mimeo.py $out/bin/mimeo";
+
+  meta = with stdenv.lib; {
+    description = "Open files by MIME-type or file name using regular expressions";
+    homepage = http://xyne.archlinux.ca/projects/mimeo/;
+    license = [ licenses.gpl2 ];
+    maintainers = [ maintainers.rycee ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/tools/misc/xdo/default.nix b/pkgs/tools/misc/xdo/default.nix
index e7a3d91967e6..26a5b485bf61 100644
--- a/pkgs/tools/misc/xdo/default.nix
+++ b/pkgs/tools/misc/xdo/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, libxcb, xcbutilwm }:
 
 stdenv.mkDerivation rec {
-   name = "xdo-0.3";
+   name = "xdo-0.5";
 
    src = fetchurl {
-     url = "https://github.com/baskerville/xdo/archive/0.3.tar.gz";
-     sha256 = "128flaydag9ixsai87p85r84arg2pn1j9h3zgdjwlmbcpb8d4ia8";
+     url = "https://github.com/baskerville/xdo/archive/0.5.tar.gz";
+     sha256 = "0sjnjs12i0gp1dg1m5jid4a3bg9am4qkf0qafyp6yn176yzcz1i6";
    };
 
    prePatch = ''sed -i "s@/usr/local@$out@" Makefile'';
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix
index c75cceb46a57..c59ea619942d 100644
--- a/pkgs/tools/networking/curl/default.nix
+++ b/pkgs/tools/networking/curl/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
   name = "curl-7.47.1";
 
   src = fetchurl {
-    url = "http://ngcobalt13.uxnr.de/mirror/curl/${name}.tar.bz2";
+    url = "http://curl.haxx.se/download/${name}.tar.bz2";
     sha256 = "13z9gba3q2ybp50z0gdkzhwcx9m0i7qkvm278yz4pql2jfml7inx";
   };
 
diff --git a/pkgs/tools/networking/dropbear/default.nix b/pkgs/tools/networking/dropbear/default.nix
index c76c6d0dd7f4..1f3a09e63f9c 100644
--- a/pkgs/tools/networking/dropbear/default.nix
+++ b/pkgs/tools/networking/dropbear/default.nix
@@ -2,11 +2,11 @@
 sftpPath ? "/var/run/current-system/sw/libexec/sftp-server" }:
 
 stdenv.mkDerivation rec {
-  name = "dropbear-2015.71";
+  name = "dropbear-2016.72";
 
   src = fetchurl {
     url = "http://matt.ucc.asn.au/dropbear/releases/${name}.tar.bz2";
-    sha256 = "1bw3lzmisn6gs6zy9vcqbfnicl437ydskqcayklpw60fkhb18qip";
+    sha256 = "10fnlaf6rm537v3rml1gnd58d42plv2q5cp7svbrysap69npc8wk";
   };
 
   dontDisableStatic = enableStatic;
diff --git a/pkgs/tools/networking/openssh/default.nix b/pkgs/tools/networking/openssh/default.nix
index 4d3ffb1257f9..957d5e715e78 100644
--- a/pkgs/tools/networking/openssh/default.nix
+++ b/pkgs/tools/networking/openssh/default.nix
@@ -2,11 +2,13 @@
 , etcDir ? null
 , hpnSupport ? false
 , withKerberos ? false
-, withGssapiPatches ? withKerberos
+, withGssapiPatches ? false
 , kerberos
+, linkOpenssl? true
 }:
 
 assert withKerberos -> kerberos != null;
+assert withGssapiPatches -> withKerberos;
 
 let
 
@@ -16,18 +18,20 @@ let
   };
 
   gssapiSrc = fetchpatch {
-    url = "http://anonscm.debian.org/cgit/pkg-ssh/openssh.git/plain/debian/patches/gssapi.patch?h=debian/7.1p2-2";
-    sha256 = "05nsch879nlpyyiwm240wlq9rasy71j9d03j1rfi8kp865zhjfbm";
+    url = "https://anonscm.debian.org/cgit/pkg-ssh/openssh.git/plain/debian/patches/gssapi.patch?id=46961f5704f8e86cea3e99253faad55aef4d8f35";
+    sha256 = "01mf2vx1gavypbdx06mcbmcrkm2smff0h3jfmr61k6h6j3xk88y5";
   };
 
 in
 with stdenv.lib;
 stdenv.mkDerivation rec {
-  name = "openssh-7.2p1";
+  # Please ensure that openssh_with_kerberos still builds when
+  # bumping the version here!
+  name = "openssh-7.2p2";
 
   src = fetchurl {
     url = "mirror://openbsd/OpenSSH/portable/${name}.tar.gz";
-    sha256 = "1hsa1f3641pdj57a55gmnvcya3wwww2fc2cvb77y95rm5xxw6g4p";
+    sha256 = "132lh9aanb0wkisji1d6cmsxi520m8nh7c7i9wi6m1s3l38q29x7";
   };
 
   prePatch = optionalString hpnSupport
@@ -46,6 +50,7 @@ stdenv.mkDerivation rec {
   # I set --disable-strip because later we strip anyway. And it fails to strip
   # properly when cross building.
   configureFlags = [
+    "--sbindir=\${out}/bin"
     "--localstatedir=/var"
     "--with-pid-dir=/run"
     "--with-mantype=man"
@@ -54,7 +59,8 @@ stdenv.mkDerivation rec {
     (if pam != null then "--with-pam" else "--without-pam")
   ] ++ optional (etcDir != null) "--sysconfdir=${etcDir}"
     ++ optional withKerberos "--with-kerberos5=${kerberos}"
-    ++ optional stdenv.isDarwin "--disable-libutil";
+    ++ optional stdenv.isDarwin "--disable-libutil"
+    ++ optional (!linkOpenssl) "--without-openssl";
 
   preConfigure = ''
     configureFlagsArray+=("--with-privsep-path=$out/empty")
@@ -76,7 +82,7 @@ stdenv.mkDerivation rec {
   ];
 
   meta = {
-    homepage = "http://www.openssh.org/";
+    homepage = "http://www.openssh.com/";
     description = "An implementation of the SSH protocol";
     license = stdenv.lib.licenses.bsd2;
     platforms = platforms.unix;
diff --git a/pkgs/tools/networking/speedtest-cli/default.nix b/pkgs/tools/networking/speedtest-cli/default.nix
index 10b35298461b..80bcb7ae9879 100644
--- a/pkgs/tools/networking/speedtest-cli/default.nix
+++ b/pkgs/tools/networking/speedtest-cli/default.nix
@@ -2,12 +2,11 @@
 
 pythonPackages.buildPythonApplication rec {
   name = "speedtest-cli-${version}";
-  version = "0.3.1";
-  namePrefix = "";
+  version = "0.3.4";
   
   src = fetchurl {
     url = "https://pypi.python.org/packages/source/s/speedtest-cli/speedtest-cli-${version}.tar.gz";
-    sha256 = "0ln2grbskh39ph79lhcim2axm7hp4xhzbrag8xfqbfihq7jdm6ya";
+    sha256 = "19i671cd815fcv0x7h2m0a493slzwkzn7r926g8myx1srkss0q6d";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix
index 4819c004c1b8..edbf32bb775a 100644
--- a/pkgs/tools/networking/unbound/default.nix
+++ b/pkgs/tools/networking/unbound/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "unbound-${version}";
-  version = "1.5.7";
+  version = "1.5.8";
 
   src = fetchurl {
     url = "http://unbound.net/downloads/${name}.tar.gz";
-    sha256 = "1a0wfgp6wqpf7cxlcbprqhnjx6z9ywf0rhrpcf7x98l1mbjqh82b";
+    sha256 = "33567a20f73e288f8daa4ec021fbb30fe1824b346b34f12677ad77899ecd09be";
   };
 
   buildInputs = [ openssl expat libevent ];
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
     "--with-libevent=${libevent}"
     "--localstatedir=/var"
     "--sysconfdir=/etc"
+    "--sbindir=\${out}/bin"
     "--enable-pie"
     "--enable-relro-now"
   ];
diff --git a/pkgs/tools/security/gnupg/1compat.nix b/pkgs/tools/security/gnupg/1compat.nix
index 9bd71467f0ea..d875413cc791 100644
--- a/pkgs/tools/security/gnupg/1compat.nix
+++ b/pkgs/tools/security/gnupg/1compat.nix
@@ -6,12 +6,12 @@ stdenv.mkDerivation {
   builder = writeScript "gnupg1compat-builder" ''
     # First symlink all top-level dirs
     ${coreutils}/bin/mkdir -p $out
-    ${coreutils}/bin/ln -s ${gnupg}/* $out
+    ${coreutils}/bin/ln -s "${gnupg}/"* $out
 
     # Replace bin with directory and symlink it contents
     ${coreutils}/bin/rm $out/bin
     ${coreutils}/bin/mkdir -p $out/bin
-    ${coreutils}/bin/ln -s ${gnupg}/bin/* $out/bin
+    ${coreutils}/bin/ln -s "${gnupg}/bin/"* $out/bin
 
     # Add gpg->gpg2 and gpgv->gpgv2 symlinks
     ${coreutils}/bin/ln -s gpg2 $out/bin/gpg
diff --git a/pkgs/tools/security/gpgstats/default.nix b/pkgs/tools/security/gpgstats/default.nix
index 480ef5bf3e7e..e9929cb2e6fc 100644
--- a/pkgs/tools/security/gpgstats/default.nix
+++ b/pkgs/tools/security/gpgstats/default.nix
@@ -16,6 +16,9 @@ stdenv.mkDerivation rec {
     cp gpgstats $out/bin
   '';
 
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionals (!stdenv.is64bit)
+    [ "-D_FILE_OFFSET_BITS=64" "-DLARGEFILE_SOURCE=1" ];
+
   meta = with stdenv.lib; {
     description = "Calculates statistics on the keys in your gpg key-ring";
     longDescription = ''
diff --git a/pkgs/tools/security/lastpass-cli/default.nix b/pkgs/tools/security/lastpass-cli/default.nix
index 01495156810b..bfd1343f5e58 100644
--- a/pkgs/tools/security/lastpass-cli/default.nix
+++ b/pkgs/tools/security/lastpass-cli/default.nix
@@ -3,13 +3,13 @@
 stdenv.mkDerivation rec {
   name = "lastpass-cli-${version}";
 
-  version = "0.7.0";
+  version = "0.9.0";
 
   src = fetchFromGitHub {
     owner = "lastpass";
     repo = "lastpass-cli";
     rev = "v${version}";
-    sha256 = "18dn4sx173666w6aaqhwcya5x2z3q0fmhg8h76lgdmx8adrhzdzc";
+    sha256 = "1iaz36bcyss2kahhlm92l7yh26rxvs12wnkkh1289yarl5wi0yld";
   };
 
   buildInputs = [
diff --git a/pkgs/tools/security/sshuttle/default.nix b/pkgs/tools/security/sshuttle/default.nix
index b78eb43782ed..4a8d7518e9c2 100644
--- a/pkgs/tools/security/sshuttle/default.nix
+++ b/pkgs/tools/security/sshuttle/default.nix
@@ -3,10 +3,10 @@
   
 pythonPackages.buildPythonApplication rec {
   name = "sshuttle-${version}";
-  version = "0.76";
+  version = "0.77.2";
 
   src = fetchurl {
-    sha256 = "1q0hr0vhdvv23cw5dqndsmf61283mvs6b14662ci00xj6zp5v48b";
+    sha256 = "1fwlhr5r9pl3pns65nn4mxf5ivypmd2a12gv3vpyznfy5f097k10";
     url = "https://pypi.python.org/packages/source/s/sshuttle/${name}.tar.gz";
   };
 
diff --git a/pkgs/tools/system/awstats/default.nix b/pkgs/tools/system/awstats/default.nix
new file mode 100644
index 000000000000..f4a14155d689
--- /dev/null
+++ b/pkgs/tools/system/awstats/default.nix
@@ -0,0 +1,58 @@
+{ stdenv, fetchurl, perlPackages, jdk }:
+
+perlPackages.buildPerlPackage rec {
+  name = "awstats-${version}";
+  version = "7.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/awstats/${name}.tar.gz";
+    sha256 = "0mdbilsl8g9a84qgyws4pakhqr3mfhs5g5dqbgsn9gn285rzxas3";
+  };
+
+  postPatch = ''
+    substituteInPlace wwwroot/cgi-bin/awstats.pl \
+      --replace /usr/share/awstats/ "$out/wwwroot/cgi-bin/"
+  '';
+
+  outputs = [ "out" "bin" "doc" ];
+
+  buildInputs = with perlPackages; [ ]; # plugins will need some
+
+  preConfigure = ''
+    touch Makefile.PL
+    patchShebangs .
+  '';
+
+  # build our own JAR
+  preBuild = ''
+    (
+      cd wwwroot/classes/src
+      rm ../*.jar
+      PATH="${jdk}/bin" "$(type -P perl)" Makefile.pl
+      test -f ../*.jar
+    )
+  '';
+
+  doCheck = false;
+
+  installPhase = ''
+    mkdir "$out"
+    mv wwwroot "$out/wwwroot"
+    rm -r "$out/wwwroot/classes/src/"
+
+    mkdir -p "$bin/bin"
+    ln -s "$out/wwwroot/cgi-bin/awstats.pl" "$bin/bin/awstats"
+
+    mkdir -p "$doc/share/"
+    mv README.md docs/
+    mv docs "$doc/share/awstats"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Real-time logfile analyzer to get advanced statistics";
+    homepage = http://awstats.org;
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/pkgs/tools/text/diction/default.nix b/pkgs/tools/text/diction/default.nix
new file mode 100644
index 000000000000..51366c36bc61
--- /dev/null
+++ b/pkgs/tools/text/diction/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "diction-1.11";
+
+  src = fetchurl {
+    url = "mirror://gnu/diction/${name}.tar.gz";
+    sha256 = "1xi4l1x1vvzmzmbhpx0ghmfnwwrhabjwizrpyylmy3fzinzz3him";
+  };
+
+  meta = {
+    description = "GNU style and diction utilities";
+    longDescription = ''
+      Diction and style are two old standard Unix commands. Diction identifies
+      wordy and commonly misused phrases. Style analyses surface
+      characteristics of a document, including sentence length and other
+      readability measures.
+    '';
+    license = stdenv.lib.licenses.gpl3Plus;
+  };
+}
diff --git a/pkgs/tools/typesetting/pygmentex/default.nix b/pkgs/tools/typesetting/pygmentex/default.nix
new file mode 100644
index 000000000000..da029639c3d2
--- /dev/null
+++ b/pkgs/tools/typesetting/pygmentex/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchzip, python2Packages }:
+
+python2Packages.buildPythonApplication rec {
+  name = "pygmentex-${version}";
+  version = "0.8";
+
+  src = fetchzip {
+      url = "http://mirrors.ctan.org/macros/latex/contrib/pygmentex.zip";
+      sha256 = "1nm19pvhlv51mv2sdankndhw64ys9r7ch6szzd6i4jz8zr86kn9v";
+  };
+
+  pythonPath = [ python2Packages.pygments python2Packages.chardet ];
+
+  buildPhase = ":";
+  
+  doCheck = false;
+  
+  installPhase = ''
+  
+    mkdir -p $out/bin
+    cp -a pygmentex.py $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://www.ctan.org/pkg/pygmentex;
+    description = "Auxiliary tool for typesetting code listings in LaTeX documents using Pygments";
+    longDescription = ''
+      PygmenTeX is a Python-based LaTeX package that can be used for
+      typesetting code listings in a LaTeX document using Pygments.
+
+      Pygments is a generic syntax highlighter for general use in all kinds of
+      software such as forum systems, wikis or other applications that need to
+      prettify source code.
+
+      This package installs just the script needed to process code listings
+      snippets extracted from the a LaTeX document by the pygmentex LaTeX
+      package. In order to use it effectivelly the texlive package pygmentex
+      also has to be installed. This can be done by adding pygmentex to
+      texlive.combine.
+    '';
+    license = licenses.lppl13c;
+    maintainers = with maintainers; [ romildo ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/tools/typesetting/tex/nix/default.nix b/pkgs/tools/typesetting/tex/nix/default.nix
index 5cd5515400de..ce5c025475a0 100644
--- a/pkgs/tools/typesetting/tex/nix/default.nix
+++ b/pkgs/tools/typesetting/tex/nix/default.nix
@@ -17,7 +17,9 @@ rec {
     assert generatePDF -> !generatePS;
 
     let
-      tex = pkgs.texlive.combine texPackages;
+      tex = pkgs.texlive.combine
+        # always include basic stuff you need for LaTeX
+        ({inherit (pkgs.texlive) scheme-basic;} // texPackages);
     in
 
     pkgs.stdenv.mkDerivation {
diff --git a/pkgs/tools/video/flvtool2/default.nix b/pkgs/tools/video/flvtool2/default.nix
index dbda4e117708..65bc240af001 100644
--- a/pkgs/tools/video/flvtool2/default.nix
+++ b/pkgs/tools/video/flvtool2/default.nix
@@ -1,28 +1,15 @@
-{ stdenv, fetchurl, ruby }:
+{ buildRubyGem, lib, ruby_2_2 }:
 
-stdenv.mkDerivation rec {
-  name = "flvtool2-1.0.6";
-  
-  src = fetchurl {
-    url = "http://rubyforge.org/frs/download.php/17497/${name}.tgz";
-    sha256 = "1pbsf0fvqrs6xzfkqal020bplb68dfiz6c5sfcz36k255v7c5w9a";
-  };
-
-  buildInputs = [ ruby ];
-
-  configurePhase =
-    ''
-      substituteInPlace bin/flvtool2 --replace "/usr/bin/env ruby" "ruby -I$out/lib/ruby/site_ruby/1.8"
-      ruby setup.rb config --prefix=$out --siterubyver=$out/lib/ruby/site_ruby/1.8
-    '';
-  
-  installPhase =
-    ''
-      ruby setup.rb install
-    '';
+buildRubyGem rec {
+  ruby = ruby_2_2;
+  name = "${gemName}-${version}";
+  gemName = "flvtool2";
+  version = "1.0.6";
+  sha256 = "0xsla1061pi4ryh3jbvwsbs8qchprchbqjy7652g2g64v37i74qj";
 
   meta = {
-    homepage = http://www.inlet-media.de/flvtool2/;
+    homepage = https://github.com/unnu/flvtool2;
     description = "A tool to manipulate Macromedia Flash Video files";
+    platforms = ruby.meta.platforms;
   };
 }