summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-08-23 16:04:53 +0200
committerVladimír Čunát <vcunat@gmail.com>2014-08-23 16:04:53 +0200
commit96cec2a7bdf2482ae58fe04cce5e87a1eec644f9 (patch)
treeea48b901c9ba0ac2b4a249ae94bd966c4a025001 /pkgs/development/tools
parentdb83d9a35b09a7cc548d9b8b2ad63c1f8ca8ba28 (diff)
parent084626deecaffcaa017af07eaab00682eff5d6f3 (diff)
downloadnixpkgs-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.tar
nixpkgs-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.tar.gz
nixpkgs-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.tar.bz2
nixpkgs-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.tar.lz
nixpkgs-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.tar.xz
nixpkgs-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.tar.zst
nixpkgs-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.zip
Merge 'staging' into multiple-outputs
Conflicts:
	pkgs/applications/audio/flac/default.nix
	pkgs/build-support/gcc-wrapper/builder.sh
	pkgs/development/libraries/apr-util/default.nix
	pkgs/development/libraries/apr/default.nix
	pkgs/development/libraries/atk/default.nix
	pkgs/development/libraries/freetype/default.nix
	pkgs/development/libraries/gdk-pixbuf/default.nix
	pkgs/development/libraries/glib/default.nix
	pkgs/development/libraries/glibc/2.17/builder.sh
	pkgs/development/libraries/glibc/2.17/locales.nix
	pkgs/development/libraries/libjpeg/default.nix
	pkgs/development/libraries/libogg/default.nix
	pkgs/development/libraries/libsamplerate/default.nix
	pkgs/development/libraries/libtiff/default.nix
	pkgs/development/libraries/libvorbis/default.nix
	pkgs/development/libraries/mesa/default.nix
	pkgs/development/libraries/pango/default.nix
	pkgs/development/web/nodejs/default.nix
	pkgs/os-specific/linux/pam/default.nix
	pkgs/os-specific/linux/systemd/default.nix
	pkgs/stdenv/generic/setup.sh
	pkgs/stdenv/linux/default.nix
	pkgs/top-level/all-packages.nix
	pkgs/top-level/release-small.nix
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/analysis/cccc/cccc.patch24
-rw-r--r--pkgs/development/tools/analysis/cccc/default.nix32
-rw-r--r--pkgs/development/tools/analysis/clang-analyzer/0001-Fix-scan-build-to-use-NIX_CFLAGS_COMPILE.patch33
-rw-r--r--pkgs/development/tools/analysis/clang-analyzer/default.nix35
-rw-r--r--pkgs/development/tools/analysis/cov-build/default.nix48
-rw-r--r--pkgs/development/tools/analysis/cppcheck/default.nix10
-rw-r--r--pkgs/development/tools/analysis/findbugs/default.nix30
-rw-r--r--pkgs/development/tools/analysis/frama-c/0004-Port-to-OCamlgraph-1.8.5.patch254
-rw-r--r--pkgs/development/tools/analysis/frama-c/default.nix96
-rw-r--r--pkgs/development/tools/analysis/lcov/default.nix16
-rw-r--r--pkgs/development/tools/analysis/lcov/find-source.patch84
-rw-r--r--pkgs/development/tools/analysis/lcov/lcov-except-unreach.patch13
-rw-r--r--pkgs/development/tools/analysis/lcov/no-warn-missing.patch54
-rw-r--r--pkgs/development/tools/analysis/radare/default.nix2
-rw-r--r--pkgs/development/tools/analysis/radare/ired.nix2
-rw-r--r--pkgs/development/tools/analysis/sparse/default.nix33
-rw-r--r--pkgs/development/tools/analysis/spin/default.nix29
-rw-r--r--pkgs/development/tools/analysis/valgrind/default.nix47
-rw-r--r--pkgs/development/tools/analysis/valgrind/glibc-2.17.patch78
-rw-r--r--pkgs/development/tools/analysis/valgrind/glibc-2.19.patch39
-rw-r--r--pkgs/development/tools/analysis/valkyrie/default.nix5
-rw-r--r--pkgs/development/tools/apktool/default.nix36
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/ant-contrib.nix17
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/builder.sh53
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/default.nix110
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/from-source.nix90
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/use-gcj.patch18
-rw-r--r--pkgs/development/tools/build-managers/buildbot-slave/default.nix6
-rw-r--r--pkgs/development/tools/build-managers/buildbot/default.nix6
-rw-r--r--pkgs/development/tools/build-managers/cmake/762-13887.patch17
-rw-r--r--pkgs/development/tools/build-managers/cmake/default.nix25
-rw-r--r--pkgs/development/tools/build-managers/cmake/search-path.patch72
-rwxr-xr-xpkgs/development/tools/build-managers/cmake/setup-hook.sh19
-rw-r--r--pkgs/development/tools/build-managers/colormake/default.nix2
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.80/default.nix (renamed from pkgs/development/tools/build-managers/gnumake-3.80/default.nix)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.80/log.patch (renamed from pkgs/development/tools/build-managers/gnumake-3.80/log.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.81/default.nix (renamed from pkgs/development/tools/build-managers/gnumake/3.81.nix)2
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.81/impure-dirs.patch (renamed from pkgs/development/tools/build-managers/gnumake/impure-dirs.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.81/log-3.81.patch (renamed from pkgs/development/tools/build-managers/gnumake/log-3.81.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/MAKEFLAGS-reexec.patch (renamed from pkgs/development/tools/build-managers/gnumake/MAKEFLAGS-reexec.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/archives-many-objs.patch (renamed from pkgs/development/tools/build-managers/gnumake/archives-many-objs.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/construct-command-line.patch (renamed from pkgs/development/tools/build-managers/gnumake/construct-command-line.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/copy-on-expand.patch (renamed from pkgs/development/tools/build-managers/gnumake/copy-on-expand.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/darwin-library_search-dylib.patch (renamed from pkgs/development/tools/build-managers/gnumake/darwin-library_search-dylib.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/default.nix (renamed from pkgs/development/tools/build-managers/gnumake/default.nix)2
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/glob-speedup.patch (renamed from pkgs/development/tools/build-managers/gnumake/glob-speedup.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/impure-dirs.patch34
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/intermediate-parallel.patch (renamed from pkgs/development/tools/build-managers/gnumake/intermediate-parallel.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/log.patch (renamed from pkgs/development/tools/build-managers/gnumake/log.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/long-command-line.patch (renamed from pkgs/development/tools/build-managers/gnumake/long-command-line.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/memory-corruption.patch (renamed from pkgs/development/tools/build-managers/gnumake/memory-corruption.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/oneshell.patch (renamed from pkgs/development/tools/build-managers/gnumake/oneshell.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/3.82/parallel-remake.patch (renamed from pkgs/development/tools/build-managers/gnumake/parallel-remake.patch)0
-rw-r--r--pkgs/development/tools/build-managers/gnumake/4.0/darwin-library_search-dylib.patch17
-rw-r--r--pkgs/development/tools/build-managers/gnumake/4.0/default.nix49
-rw-r--r--pkgs/development/tools/build-managers/gnumake/4.0/impure-dirs.patch34
-rw-r--r--pkgs/development/tools/build-managers/gradle/default.nix8
-rw-r--r--pkgs/development/tools/build-managers/leiningen/builder.sh13
-rw-r--r--pkgs/development/tools/build-managers/leiningen/default.nix17
-rw-r--r--pkgs/development/tools/build-managers/leiningen/lein-fix-jar-path.patch4
-rw-r--r--pkgs/development/tools/build-managers/leiningen/lein_2.3.0.patch4
-rw-r--r--pkgs/development/tools/build-managers/ninja/default.nix8
-rw-r--r--pkgs/development/tools/build-managers/rebar/default.nix10
-rw-r--r--pkgs/development/tools/build-managers/scons/default.nix8
-rw-r--r--pkgs/development/tools/build-managers/scons/default.upstream10
-rw-r--r--pkgs/development/tools/build-managers/simple-build-tool/default.nix103
-rw-r--r--pkgs/development/tools/cdecl/cdecl-2.5-gentoo.patch29
-rw-r--r--pkgs/development/tools/cdecl/cdecl-2.5-implicit-pointer.patch12
-rw-r--r--pkgs/development/tools/cdecl/cdecl-2.5-lex.patch13
-rw-r--r--pkgs/development/tools/cdecl/cdecl-2.5.patch64
-rw-r--r--pkgs/development/tools/cdecl/default.nix21
-rw-r--r--pkgs/development/tools/continuous-integration/jenkins/default.nix20
-rw-r--r--pkgs/development/tools/documentation/docutils/default.nix6
-rw-r--r--pkgs/development/tools/documentation/doxygen/1.7.nix52
-rw-r--r--pkgs/development/tools/documentation/doxygen/default.nix15
-rw-r--r--pkgs/development/tools/documentation/gnome-doc-utils/default.nix6
-rw-r--r--pkgs/development/tools/documentation/haddock/2.10.0.nix10
-rw-r--r--pkgs/development/tools/documentation/haddock/2.11.0.nix10
-rw-r--r--pkgs/development/tools/documentation/haddock/2.12.0.nix4
-rw-r--r--pkgs/development/tools/documentation/haddock/2.13.2.1.nix10
-rw-r--r--pkgs/development/tools/documentation/haddock/2.13.2.nix10
-rw-r--r--pkgs/development/tools/documentation/haddock/2.14.2.nix27
-rw-r--r--pkgs/development/tools/documentation/haddock/2.14.3.nix23
-rw-r--r--pkgs/development/tools/documentation/haddock/2.4.2.nix4
-rw-r--r--pkgs/development/tools/documentation/haddock/2.7.2.nix3
-rw-r--r--pkgs/development/tools/documentation/haddock/2.9.2.nix3
-rw-r--r--pkgs/development/tools/documentation/haddock/2.9.4.nix4
-rw-r--r--pkgs/development/tools/etcdctl/default.nix30
-rw-r--r--pkgs/development/tools/etcdctl/deps.nix27
-rw-r--r--pkgs/development/tools/exercism/default.nix47
-rw-r--r--pkgs/development/tools/gnulib/default.nix6
-rw-r--r--pkgs/development/tools/gocode/default.nix29
-rw-r--r--pkgs/development/tools/gocode/deps.nix27
-rw-r--r--pkgs/development/tools/guile/g-wrap/default.nix2
-rw-r--r--pkgs/development/tools/haskell/BNFC-meta/default.nix14
-rw-r--r--pkgs/development/tools/haskell/BNFC/default.nix6
-rw-r--r--pkgs/development/tools/haskell/DrIFT/default.nix18
-rw-r--r--pkgs/development/tools/haskell/HaRe/default.nix30
-rw-r--r--pkgs/development/tools/haskell/PastePipe/default.nix19
-rw-r--r--pkgs/development/tools/haskell/SourceGraph/default.nix22
-rw-r--r--pkgs/development/tools/haskell/alex-meta/default.nix14
-rw-r--r--pkgs/development/tools/haskell/cabal-bounds/default.nix27
-rw-r--r--pkgs/development/tools/haskell/cabal-db/default.nix22
-rw-r--r--pkgs/development/tools/haskell/cabal-delete/default.nix36
-rw-r--r--pkgs/development/tools/haskell/cabal-dev/default.nix21
-rw-r--r--pkgs/development/tools/haskell/cabal-ghci/default.nix3
-rw-r--r--pkgs/development/tools/haskell/cabal-meta/default.nix20
-rw-r--r--pkgs/development/tools/haskell/cabal2ghci/default.nix2
-rw-r--r--pkgs/development/tools/haskell/cabal2nix/default.nix12
-rw-r--r--pkgs/development/tools/haskell/cake3/default.nix25
-rw-r--r--pkgs/development/tools/haskell/codex/default.nix24
-rw-r--r--pkgs/development/tools/haskell/ghc-events-analyze/default.nix24
-rw-r--r--pkgs/development/tools/haskell/ghc-gc-tune/default.nix18
-rw-r--r--pkgs/development/tools/haskell/happy-meta/default.nix10
-rw-r--r--pkgs/development/tools/haskell/haskdogs/default.nix3
-rw-r--r--pkgs/development/tools/haskell/haskell-docs/default.nix24
-rw-r--r--pkgs/development/tools/haskell/hasktags/default.nix14
-rw-r--r--pkgs/development/tools/haskell/hdevtools/default.nix17
-rw-r--r--pkgs/development/tools/haskell/hlint/default.nix15
-rw-r--r--pkgs/development/tools/haskell/hobbes/default.nix18
-rw-r--r--pkgs/development/tools/haskell/hp2any-manager/default.nix24
-rw-r--r--pkgs/development/tools/haskell/hscolour/default.nix17
-rw-r--r--pkgs/development/tools/haskell/hscope/default.nix24
-rw-r--r--pkgs/development/tools/haskell/hslogger/default.nix7
-rw-r--r--pkgs/development/tools/haskell/jailbreak-cabal/default.nix2
-rw-r--r--pkgs/development/tools/haskell/keter/default.nix29
-rw-r--r--pkgs/development/tools/haskell/packunused/default.nix14
-rw-r--r--pkgs/development/tools/haskell/pointfree/default.nix19
-rw-r--r--pkgs/development/tools/haskell/pointful/default.nix18
-rw-r--r--pkgs/development/tools/haskell/profiteur/default.nix24
-rw-r--r--pkgs/development/tools/haskell/rehoo/default.nix21
-rw-r--r--pkgs/development/tools/haskell/splot/default.nix6
-rw-r--r--pkgs/development/tools/haskell/threadscope/default.nix9
-rw-r--r--pkgs/development/tools/haskell/timeplot/default.nix6
-rw-r--r--pkgs/development/tools/haskell/una/default.nix18
-rw-r--r--pkgs/development/tools/haskell/uuagc/bootstrap.nix3
-rw-r--r--pkgs/development/tools/haskell/uuagc/cabal.nix3
-rw-r--r--pkgs/development/tools/haskell/uuagc/default.nix7
-rw-r--r--pkgs/development/tools/java/fastjar/default.nix2
-rw-r--r--pkgs/development/tools/jq/default.nix13
-rw-r--r--pkgs/development/tools/libsigrok/default.nix24
-rw-r--r--pkgs/development/tools/libsigrokdecode/default.nix20
-rw-r--r--pkgs/development/tools/literate-programming/noweb/default.nix6
-rw-r--r--pkgs/development/tools/misc/ShellCheck/default.nix19
-rw-r--r--pkgs/development/tools/misc/arcanist/default.nix49
-rw-r--r--pkgs/development/tools/misc/astyle/default.nix4
-rw-r--r--pkgs/development/tools/misc/autobuild/default.nix2
-rw-r--r--pkgs/development/tools/misc/autoconf/2.13.nix3
-rw-r--r--pkgs/development/tools/misc/autoconf/default.nix5
-rw-r--r--pkgs/development/tools/misc/autogen/default.nix6
-rw-r--r--pkgs/development/tools/misc/automake/automake-1.11.x.nix2
-rw-r--r--pkgs/development/tools/misc/automake/automake-1.12.x.nix6
-rw-r--r--pkgs/development/tools/misc/automake/automake-1.13.x.nix2
-rw-r--r--pkgs/development/tools/misc/automake/automake-1.14.x.nix (renamed from pkgs/development/tools/misc/automake/automake-1.10.x.nix)27
-rw-r--r--pkgs/development/tools/misc/avrdude/default.nix46
-rw-r--r--pkgs/development/tools/misc/babeltrace/default.nix4
-rw-r--r--pkgs/development/tools/misc/binutils-cross/builder.sh26
-rw-r--r--pkgs/development/tools/misc/binutils-cross/default.nix13
-rw-r--r--pkgs/development/tools/misc/binutils/default.nix41
-rw-r--r--pkgs/development/tools/misc/binutils/pt-pax-flags-20121023.patch1786
-rw-r--r--pkgs/development/tools/misc/cbrowser/default.nix2
-rw-r--r--pkgs/development/tools/misc/ccache/default.nix6
-rw-r--r--pkgs/development/tools/misc/cflow/default.nix2
-rw-r--r--pkgs/development/tools/misc/cgdb/default.nix4
-rw-r--r--pkgs/development/tools/misc/chrpath/default.nix23
-rw-r--r--pkgs/development/tools/misc/cl-launch/default.nix8
-rw-r--r--pkgs/development/tools/misc/cl-launch/default.upstream2
-rw-r--r--pkgs/development/tools/misc/coccinelle/default.nix2
-rw-r--r--pkgs/development/tools/misc/complexity/default.nix9
-rw-r--r--pkgs/development/tools/misc/cpphs/default.nix12
-rw-r--r--pkgs/development/tools/misc/cppi/default.nix2
-rw-r--r--pkgs/development/tools/misc/d-feet/default.nix46
-rw-r--r--pkgs/development/tools/misc/ddd/default.nix2
-rw-r--r--pkgs/development/tools/misc/dejagnu/default.nix6
-rw-r--r--pkgs/development/tools/misc/dfu-programmer/default.nix23
-rw-r--r--pkgs/development/tools/misc/distcc/masq.nix2
-rw-r--r--pkgs/development/tools/misc/drush/default.nix38
-rw-r--r--pkgs/development/tools/misc/elfutils/CVE-2014-0172.patch32
-rw-r--r--pkgs/development/tools/misc/elfutils/default.nix13
-rw-r--r--pkgs/development/tools/misc/frama-c/0007-Port-to-OCamlgraph-1.8.2.patch64
-rw-r--r--pkgs/development/tools/misc/frama-c/default.nix67
-rw-r--r--pkgs/development/tools/misc/gdb/default.nix10
-rw-r--r--pkgs/development/tools/misc/gdb/edit-signals.patch25
-rw-r--r--pkgs/development/tools/misc/gengetopt/default.nix6
-rw-r--r--pkgs/development/tools/misc/global/default.nix8
-rw-r--r--pkgs/development/tools/misc/gnum4/default.nix12
-rw-r--r--pkgs/development/tools/misc/gnum4/no-gets.patch26
-rw-r--r--pkgs/development/tools/misc/gnum4/readlink-EINVAL.patch18
-rw-r--r--pkgs/development/tools/misc/gob2/default.nix6
-rw-r--r--pkgs/development/tools/misc/gperf/default.nix2
-rw-r--r--pkgs/development/tools/misc/grafana/default.nix29
-rw-r--r--pkgs/development/tools/misc/gtkdialog/default.nix2
-rw-r--r--pkgs/development/tools/misc/help2man/default.nix8
-rw-r--r--pkgs/development/tools/misc/hydra/default.nix2
-rw-r--r--pkgs/development/tools/misc/icon-naming-utils/default.nix7
-rw-r--r--pkgs/development/tools/misc/indent/default.nix2
-rw-r--r--pkgs/development/tools/misc/inotify-tools/default.nix17
-rw-r--r--pkgs/development/tools/misc/intel-gpu-tools/default.nix21
-rw-r--r--pkgs/development/tools/misc/intltool/default.nix2
-rw-r--r--pkgs/development/tools/misc/jscoverage/default.nix2
-rw-r--r--pkgs/development/tools/misc/libtool/default.nix2
-rw-r--r--pkgs/development/tools/misc/libtool/libtool2.nix2
-rw-r--r--pkgs/development/tools/misc/lsof/default.nix5
-rw-r--r--pkgs/development/tools/misc/ltrace/default.nix9
-rw-r--r--pkgs/development/tools/misc/lttng-tools/default.nix13
-rw-r--r--pkgs/development/tools/misc/lttng-tools/lttng-change-modprobe-path-from-sbin-modprobe-to-modprobe.patch53
-rw-r--r--pkgs/development/tools/misc/lttng-ust/default.nix4
-rw-r--r--pkgs/development/tools/misc/lttv/default.nix6
-rw-r--r--pkgs/development/tools/misc/luarocks/default.nix35
-rw-r--r--pkgs/development/tools/misc/ninka/default.nix2
-rw-r--r--pkgs/development/tools/misc/opengrok/default.nix29
-rw-r--r--pkgs/development/tools/misc/openocd/default.nix64
-rw-r--r--pkgs/development/tools/misc/patchelf/default.nix6
-rw-r--r--pkgs/development/tools/misc/patchelf/unstable.nix16
-rw-r--r--pkgs/development/tools/misc/pkgconfig/default.nix6
-rw-r--r--pkgs/development/tools/misc/pkgconfig/requires-private.patch238
-rw-r--r--pkgs/development/tools/misc/pmccabe/default.nix2
-rw-r--r--pkgs/development/tools/misc/prelink/default.nix22
-rw-r--r--pkgs/development/tools/misc/premake/default.nix6
-rw-r--r--pkgs/development/tools/misc/saleae-logic/default.nix6
-rw-r--r--pkgs/development/tools/misc/sloccount/default.nix2
-rw-r--r--pkgs/development/tools/misc/srecord/default.nix4
-rw-r--r--pkgs/development/tools/misc/stlink/default.nix5
-rw-r--r--pkgs/development/tools/misc/stm32flash/default.nix2
-rw-r--r--pkgs/development/tools/misc/strace/default.nix1
-rw-r--r--pkgs/development/tools/misc/swig/2.x.nix6
-rw-r--r--pkgs/development/tools/misc/swig/3.x.nix35
-rw-r--r--pkgs/development/tools/misc/swig/default.nix19
-rw-r--r--pkgs/development/tools/misc/sysbench/default.nix2
-rw-r--r--pkgs/development/tools/misc/tcptrack/default.nix2
-rw-r--r--pkgs/development/tools/misc/teensy/default.nix26
-rw-r--r--pkgs/development/tools/misc/texi2html/default.nix2
-rw-r--r--pkgs/development/tools/misc/texinfo/4.13a.nix2
-rw-r--r--pkgs/development/tools/misc/texinfo/4.9.nix10
-rw-r--r--pkgs/development/tools/misc/texinfo/5.2.nix (renamed from pkgs/development/tools/misc/texinfo/5.1.nix)12
-rw-r--r--pkgs/development/tools/misc/uhd/default.nix56
-rw-r--r--pkgs/development/tools/misc/uisp/default.nix2
-rw-r--r--pkgs/development/tools/misc/usb-modeswitch/default.nix14
-rw-r--r--pkgs/development/tools/misc/xxdiff/default.nix2
-rw-r--r--pkgs/development/tools/neoload/default.nix25
-rw-r--r--pkgs/development/tools/node-webkit/default.nix55
-rw-r--r--pkgs/development/tools/ocaml/camlp5/default.nix6
-rw-r--r--pkgs/development/tools/ocaml/cppo/default.nix37
-rw-r--r--pkgs/development/tools/ocaml/deriving/default.nix2
-rw-r--r--pkgs/development/tools/ocaml/findlib/default.nix9
-rw-r--r--pkgs/development/tools/ocaml/merlin/default.nix21
-rw-r--r--pkgs/development/tools/ocaml/oasis/default.nix32
-rw-r--r--pkgs/development/tools/ocaml/ocamlify/default.nix26
-rw-r--r--pkgs/development/tools/ocaml/ocamlmod/default.nix25
-rw-r--r--pkgs/development/tools/ocaml/opam/1.0.0.nix (renamed from pkgs/development/tools/ocaml/opam/default.nix)2
-rw-r--r--pkgs/development/tools/ocaml/opam/1.1.nix64
-rw-r--r--pkgs/development/tools/packer/default.nix35
-rw-r--r--pkgs/development/tools/packer/deps.nix307
-rw-r--r--pkgs/development/tools/parsing/Ebnf2ps/default.nix3
-rw-r--r--pkgs/development/tools/parsing/alex/2.3.1.nix2
-rw-r--r--pkgs/development/tools/parsing/alex/2.3.2.nix2
-rw-r--r--pkgs/development/tools/parsing/alex/2.3.3.nix2
-rw-r--r--pkgs/development/tools/parsing/alex/2.3.5.nix2
-rw-r--r--pkgs/development/tools/parsing/alex/3.0.1.nix4
-rw-r--r--pkgs/development/tools/parsing/alex/3.0.2.nix4
-rw-r--r--pkgs/development/tools/parsing/alex/3.0.5.nix5
-rw-r--r--pkgs/development/tools/parsing/alex/3.1.3.nix (renamed from pkgs/development/tools/parsing/alex/3.1.0.nix)11
-rw-r--r--pkgs/development/tools/parsing/alex/adapt-crazy-perl-regex-for-cpp-4.8.0.patch12
-rw-r--r--pkgs/development/tools/parsing/antlr/2.7.7.nix13
-rw-r--r--pkgs/development/tools/parsing/antlr/default.nix13
-rw-r--r--pkgs/development/tools/parsing/bison/2.x.nix8
-rw-r--r--pkgs/development/tools/parsing/bison/3.x.nix14
-rw-r--r--pkgs/development/tools/parsing/flex/2.5.35.nix (renamed from pkgs/development/tools/parsing/flex/flex-2.5.35.nix)14
-rw-r--r--pkgs/development/tools/parsing/flex/2.5.39.nix30
-rw-r--r--pkgs/development/tools/parsing/flex/flex-2.5.33.nix20
-rw-r--r--pkgs/development/tools/parsing/flex/flex-2.5.34.nix19
-rw-r--r--pkgs/development/tools/parsing/flex/flex-2.5.4a.nix12
-rw-r--r--pkgs/development/tools/parsing/happy/1.18.10.nix4
-rw-r--r--pkgs/development/tools/parsing/happy/1.18.11.nix18
-rw-r--r--pkgs/development/tools/parsing/happy/1.18.4.nix3
-rw-r--r--pkgs/development/tools/parsing/happy/1.18.5.nix3
-rw-r--r--pkgs/development/tools/parsing/happy/1.18.6.nix3
-rw-r--r--pkgs/development/tools/parsing/happy/1.18.9.nix4
-rw-r--r--pkgs/development/tools/parsing/happy/1.19.0.nix18
-rw-r--r--pkgs/development/tools/parsing/happy/1.19.4.nix (renamed from pkgs/development/tools/parsing/happy/1.18.8.nix)7
-rw-r--r--pkgs/development/tools/parsing/happy/adapt-crazy-perl-regex-for-cpp-4.8.0.patch12
-rw-r--r--pkgs/development/tools/parsing/jikespg/builder.sh15
-rw-r--r--pkgs/development/tools/parsing/jikespg/default.nix15
-rw-r--r--pkgs/development/tools/parsing/ragel/default.nix4
-rw-r--r--pkgs/development/tools/parsing/re2c/default.nix14
-rw-r--r--pkgs/development/tools/phantomjs/default.nix32
-rw-r--r--pkgs/development/tools/profiling/oprofile/default.nix6
-rw-r--r--pkgs/development/tools/profiling/sysprof/default.nix2
-rw-r--r--pkgs/development/tools/profiling/systemtap/default.nix7
-rw-r--r--pkgs/development/tools/pydb/default.nix2
-rw-r--r--pkgs/development/tools/quilt/default.nix33
-rw-r--r--pkgs/development/tools/selenium/chromedriver/default.nix11
-rw-r--r--pkgs/development/tools/selenium/server/default.nix27
-rw-r--r--pkgs/development/tools/sigrok-cli/default.nix20
-rw-r--r--pkgs/development/tools/slimerjs/default.nix21
-rw-r--r--pkgs/development/tools/sqsh/default.nix33
-rw-r--r--pkgs/development/tools/vagrant/default.nix93
-rw-r--r--pkgs/development/tools/watchman/default.nix36
-rw-r--r--pkgs/development/tools/yuicompressor/default.nix23
299 files changed, 5786 insertions, 1903 deletions
diff --git a/pkgs/development/tools/analysis/cccc/cccc.patch b/pkgs/development/tools/analysis/cccc/cccc.patch
new file mode 100644
index 00000000000..9454e3b18ad
--- /dev/null
+++ b/pkgs/development/tools/analysis/cccc/cccc.patch
@@ -0,0 +1,24 @@
+diff --git a/cccc/cccc_tbl.cc b/cccc/cccc_tbl.cc
+index df98e2b..59f2572 100644
+--- a/cccc/cccc_tbl.cc
++++ b/cccc/cccc_tbl.cc
+@@ -96,7 +96,7 @@ bool CCCC_Table<T>::remove(T* old_item_ptr)
+   typename map_t::iterator value_iterator=map_t::find(old_item_ptr->key());
+   if(value_iterator!=map_t::end())
+     {
+-      erase(value_iterator);
++      map_t::erase(value_iterator);
+       retval=true;
+     }
+   return retval;
+diff --git a/makefile b/makefile
+index 23ad004..2cca469 100644
+--- a/makefile
++++ b/makefile
+@@ -20,5 +20,5 @@ test :
+ 	cd test ; make -f posix.mak
+ 
+ install : 
+-	cd install ; su root -c "make -f install.mak" 
++	cd install ; make -f install.mak
+ 
diff --git a/pkgs/development/tools/analysis/cccc/default.nix b/pkgs/development/tools/analysis/cccc/default.nix
new file mode 100644
index 00000000000..c672c7964e7
--- /dev/null
+++ b/pkgs/development/tools/analysis/cccc/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl }:
+
+let
+  name = "cccc";
+  version = "3.1.4";
+in
+stdenv.mkDerivation {
+  name = "${name}-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${name}/${version}/${name}-${version}.tar.gz";
+    sha256 = "1gsdzzisrk95kajs3gfxks3bjvfd9g680fin6a9pjrism2lyrcr7";
+  };
+  patches = [ ./cccc.patch ];
+  preConfigure = ''
+    substituteInPlace install/install.mak --replace /usr/local/bin $out/bin
+    substituteInPlace install/install.mak --replace MKDIR=mkdir "MKDIR=mkdir -p"
+  '';
+
+  meta = {
+    description = "C and C++ Code Counter";
+    longDescription = ''
+      CCCC is a tool which analyzes C++ and Java files and generates a report
+      on various metrics of the code. Metrics supported include lines of code, McCabe's
+      complexity and metrics proposed by Chidamber&Kemerer and Henry&Kafura.
+    '';
+    homepage = "http://cccc.sourceforge.net/";
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = [ stdenv.lib.maintainers.linquize ];
+  };
+}
diff --git a/pkgs/development/tools/analysis/clang-analyzer/0001-Fix-scan-build-to-use-NIX_CFLAGS_COMPILE.patch b/pkgs/development/tools/analysis/clang-analyzer/0001-Fix-scan-build-to-use-NIX_CFLAGS_COMPILE.patch
new file mode 100644
index 00000000000..bcb3ac1d146
--- /dev/null
+++ b/pkgs/development/tools/analysis/clang-analyzer/0001-Fix-scan-build-to-use-NIX_CFLAGS_COMPILE.patch
@@ -0,0 +1,33 @@
+From 6ab08bc1c889e4fb9a39432b1a654eaa19ee65eb Mon Sep 17 00:00:00 2001
+From: Austin Seipp <aseipp@pobox.com>
+Date: Fri, 2 May 2014 12:28:23 -0500
+Subject: [PATCH] Fix scan-build to use NIX_CFLAGS_COMPILE
+
+Signed-off-by: Austin Seipp <aseipp@pobox.com>
+---
+ tools/scan-build/ccc-analyzer | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/tools/scan-build/ccc-analyzer b/tools/scan-build/ccc-analyzer
+index b463ec0..9d39dd0 100755
+--- a/tools/scan-build/ccc-analyzer
++++ b/tools/scan-build/ccc-analyzer
+@@ -207,6 +207,15 @@ sub Analyze {
+       push @Args, "-Xclang", "-analyzer-viz-egraph-ubigraph";
+     }
+ 
++
++    # Add Nix flags to analysis
++    if (defined $ENV{'NIX_CFLAGS_COMPILE'}) {
++      my @nixArgs = split(/\s+/, $ENV{'NIX_CFLAGS_COMPILE'});
++      foreach my $nixArg (@nixArgs) {
++        push @Args, $nixArg;
++      }
++    }
++
+     my $AnalysisArgs = GetCCArgs("--analyze", \@Args);
+     @CmdArgs = @$AnalysisArgs;
+   }
+-- 
+1.8.3.2
+
diff --git a/pkgs/development/tools/analysis/clang-analyzer/default.nix b/pkgs/development/tools/analysis/clang-analyzer/default.nix
new file mode 100644
index 00000000000..50583f65f60
--- /dev/null
+++ b/pkgs/development/tools/analysis/clang-analyzer/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, clang, llvmPackages, perl, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name    = "clang-analyzer-${version}";
+  version = "3.4";
+
+  src = fetchurl {
+    url    = "http://llvm.org/releases/${version}/clang-${version}.src.tar.gz";
+    sha256 = "06rb4j1ifbznl3gfhl98s7ilj0ns01p7y7zap4p7ynmqnc6pia92";
+  };
+
+  patches = [ ./0001-Fix-scan-build-to-use-NIX_CFLAGS_COMPILE.patch ];
+  buildInputs = [ clang llvmPackages.clang perl makeWrapper ];
+  buildPhase = "true";
+
+  installPhase = ''
+    mkdir -p $out/bin $out/libexec
+    cp -R tools/scan-view  $out/libexec
+    cp -R tools/scan-build $out/libexec
+
+    makeWrapper $out/libexec/scan-view/scan-view $out/bin/scan-view
+    makeWrapper $out/libexec/scan-build/scan-build $out/bin/scan-build \
+      --add-flags "--use-cc=${clang}/bin/clang" \
+      --add-flags "--use-c++=${clang}/bin/clang++" \
+      --add-flags "--use-analyzer='${llvmPackages.clang}/bin/clang'"
+  '';
+
+  meta = {
+    description = "Clang Static Analyzer";
+    homepage    = "http://clang-analyzer.llvm.org";
+    license     = stdenv.lib.licenses.bsd3;
+    platforms   = stdenv.lib.platforms.unix;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+  };
+}
diff --git a/pkgs/development/tools/analysis/cov-build/default.nix b/pkgs/development/tools/analysis/cov-build/default.nix
new file mode 100644
index 00000000000..fef98f1e04a
--- /dev/null
+++ b/pkgs/development/tools/analysis/cov-build/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, requireFile }:
+
+let
+  message = ''
+    Register an account at https://scan.coverity.com, download the
+    build tools, and add it to the nix store with nix-prefetch-url
+  '';
+in
+stdenv.mkDerivation rec {
+  name    = "cov-build-${version}";
+  version = "7.0.2";
+
+  src =
+    if stdenv.system == "i686-linux"
+    then requireFile {
+      name = "cov-analysis-linux32-${version}.tar.gz";
+      sha256 = "0i06wbd7blgx9adh9w09by4i18vwmldfp9ix97a5dph2cjymsviy";
+      inherit message;
+    }
+    else requireFile {
+      name = "cov-analysis-linux64-${version}.tar.gz";
+      sha256 = "0iby75p0g8gv7b501xav47milr8m9781h0hcgm1ch6x3qj6irqd8";
+      inherit message;
+    };
+
+  dontStrip = true;
+  buildPhase = false;
+  installPhase = ''
+    mkdir -p $out/bin $out/libexec
+    mv * $out/libexec
+    for x in cov-build cov-capture cov-configure cov-emit cov-emit-java \
+      cov-export-cva cov-extract-scm cov-help cov-import-scm cov-link \
+      cov-internal-clang cov-internal-emit-clang cov-internal-nm \
+      cov-internal-emit-java-bytecode cov-internal-reduce cov-translate \
+      cov-preprocess cov-internal-pid-to-db cov-manage-emit \
+      cov-manage-history; do
+        ln -s $out/libexec/bin/$x $out/bin/$x;
+    done
+  '';
+
+  meta = {
+    description = "Coverity Scan build tools";
+    homepage    = "https://scan.coverity.com";
+    license     = stdenv.lib.licenses.unfreeRedistributable;
+    platforms   = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+  };
+}
diff --git a/pkgs/development/tools/analysis/cppcheck/default.nix b/pkgs/development/tools/analysis/cppcheck/default.nix
index 8aea7bc8aa8..ca4176dbe1e 100644
--- a/pkgs/development/tools/analysis/cppcheck/default.nix
+++ b/pkgs/development/tools/analysis/cppcheck/default.nix
@@ -4,17 +4,21 @@
 
 let
   name = "cppcheck";
-  version = "1.53";
+  version = "1.65";
 in
 stdenv.mkDerivation {
   name = "${name}-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/${name}/${name}-${version}.tar.bz2";
-    sha256 = "878db83d3954d0c45135362308da951ec0670a160c76a7410466a9b539e8677f";
+    sha256 = "0rsxnqvjyiviqsq4y5x4p1jpvcmhf8hh7d710rsvnv5d4cj7lmqn";
   };
 
-  configurePhase = "makeFlags=PREFIX=$out";
+  configurePhase = ''
+    makeFlags="PREFIX=$out CFGDIR=$out/cfg"
+  '';
+
+  postInstall = "cp -r cfg $out/cfg";
 
   meta = {
     description = "Check C/C++ code for memory leaks, mismatching allocation-deallocation, buffer overrun and more";
diff --git a/pkgs/development/tools/analysis/findbugs/default.nix b/pkgs/development/tools/analysis/findbugs/default.nix
index 0623632936d..cf60f1af767 100644
--- a/pkgs/development/tools/analysis/findbugs/default.nix
+++ b/pkgs/development/tools/analysis/findbugs/default.nix
@@ -1,11 +1,11 @@
-{stdenv, fetchurl}:
+{ stdenv, fetchurl }:
 
 stdenv.mkDerivation {
-  name = "findbugs-1.3.2";
+  name = "findbugs-2.0.3";
 
   src = fetchurl {
-    url = mirror://sourceforge/findbugs/findbugs-1.3.2.tar.gz;
-    sha256 = "0mbwxzz5m9vizxlbg0i6rh5ywywiiw9zpabq5li7map43768apvr";
+    url = mirror://sourceforge/findbugs/findbugs-2.0.3.tar.gz;
+    sha256 = "17s93vszc5s2b7pwi0yk8d6w54gandxrr7vflhzmpbl6sxj2mfjr";
   };
 
   buildPhase = ''
@@ -13,9 +13,25 @@ stdenv.mkDerivation {
   '';
 
   installPhase = ''
-    mkdir -p $out
-    cp -prd bin lib plugin doc $out/
-    rm $out/bin/*.bat
+    d=$out/libexec/findbugs
+    mkdir -p $d $out/bin $out/nix-support
+
+    cp -prd bin lib plugin doc $d/
+    rm $d/bin/*.bat
+    for i in $d/bin/*; do
+      if [ -f $i ]; then ln -s $i $out/bin/; fi
+    done
+
+    # Get rid of unnecessary JARs.
+    rm $d/lib/ant.jar
+
+    # Make some JARs findable.
+    mkdir -p $out/share/java
+    ln -s $d/lib/{findbugs.jar,findbugs-ant.jar} $out/share/java/
+
+    cat <<EOF > $out/nix-support/setup-hook
+    export FINDBUGS_HOME=$d
+    EOF
   '';
 
   meta = {
diff --git a/pkgs/development/tools/analysis/frama-c/0004-Port-to-OCamlgraph-1.8.5.patch b/pkgs/development/tools/analysis/frama-c/0004-Port-to-OCamlgraph-1.8.5.patch
new file mode 100644
index 00000000000..798d17fd369
--- /dev/null
+++ b/pkgs/development/tools/analysis/frama-c/0004-Port-to-OCamlgraph-1.8.5.patch
@@ -0,0 +1,254 @@
+From: Mehdi Dogguy <mehdi@debian.org>
+Date: Sun, 27 Apr 2014 13:46:16 +0200
+Subject: Port to OCamlgraph 1.8.5
+
+---
+ src/impact/reason_graph.ml          |    2 +-
+ src/kernel/stmts_graph.ml           |   10 +++++-----
+ src/logic/property_status.ml        |    8 ++++----
+ src/misc/service_graph.ml           |    4 ++--
+ src/pdg_types/pdgTypes.ml           |    6 +++---
+ src/postdominators/print.ml         |    2 +-
+ src/semantic_callgraph/register.ml  |    4 ++--
+ src/slicing/printSlice.ml           |   10 +++++-----
+ src/syntactic_callgraph/register.ml |    4 ++--
+ src/wp/cil2cfg.ml                   |   12 ++++++------
+ 10 files changed, 31 insertions(+), 31 deletions(-)
+
+diff --git a/src/impact/reason_graph.ml b/src/impact/reason_graph.ml
+index eabacb0..ce19b4a 100644
+--- a/src/impact/reason_graph.ml
++++ b/src/impact/reason_graph.ml
+@@ -139,7 +139,7 @@ module Printer (X: AdditionalInfo) = struct
+ 
+   let graph_attributes _ = [`Label "Impact graph"]
+ 
+-  let default_vertex_attributes _g = [`Style [`Filled]; `Shape `Box]
++  let default_vertex_attributes _g = [`Style `Filled; `Shape `Box]
+   let default_edge_attributes _g = []
+ 
+   let vertex_attributes v =
+diff --git a/src/kernel/stmts_graph.ml b/src/kernel/stmts_graph.ml
+index a8fe121..16059c3 100644
+--- a/src/kernel/stmts_graph.ml
++++ b/src/kernel/stmts_graph.ml
+@@ -157,12 +157,12 @@ module TP = struct
+ 
+   let vertex_attributes s =
+     match s.skind with
+-    | Loop _ -> [`Color 0xFF0000; `Style [`Filled]]
+-    | If _ -> [`Color 0x00FF00; `Style [`Filled]; `Shape `Diamond]
+-    | Return _ -> [`Color 0x0000FF; `Style [`Filled]]
++    | Loop _ -> [`Color 0xFF0000; `Style `Filled]
++    | If _ -> [`Color 0x00FF00; `Style `Filled; `Shape `Diamond]
++    | Return _ -> [`Color 0x0000FF; `Style `Filled]
+     | Block _ -> [`Shape `Box; `Fontsize 8]
+-    | Goto _ -> [`Shape `Diamond; `Color 0x00FFFF ; `Style [`Filled]]
+-    | Instr (Skip _) -> [`Color 0x00FFFF ; `Style [`Filled]]
++    | Goto _ -> [`Shape `Diamond; `Color 0x00FFFF ; `Style `Filled]
++    | Instr (Skip _) -> [`Color 0x00FFFF ; `Style `Filled]
+     | _ -> []
+   let default_vertex_attributes _ = []
+ 
+diff --git a/src/logic/property_status.ml b/src/logic/property_status.ml
+index f7c278d..47485f6 100644
+--- a/src/logic/property_status.ml
++++ b/src/logic/property_status.ml
+@@ -1481,12 +1481,12 @@ module Consolidation_graph = struct
+                 let s = get_status p in
+ 		let color = status_color p s in
+                 let style = match s with
+-                  | Never_tried -> [`Style [`Bold]; `Width 0.8 ]
+-                  | _ -> [`Style [`Filled]]
++                  | Never_tried -> [`Style `Bold; `Width 0.8 ]
++                  | _ -> [`Style `Filled]
+                 in
+ 		style @ [ label v; `Color color; `Shape `Box ]
+               | Emitter _ as v -> 
+-		[ label v; `Shape `Diamond; `Color 0xb0c4de; `Style [`Filled] ]
++		[ label v; `Shape `Diamond; `Color 0xb0c4de; `Style `Filled ]
+               | Tuning_parameter _ as v ->
+ 		[ label v; (*`Style `Dotted;*) `Color 0xb0c4de;  ]
+ 	      (*| Correctness_parameter _ (*as v*) -> assert false (*[ label v; `Color 0xb0c4de ]*)*)
+@@ -1495,7 +1495,7 @@ module Consolidation_graph = struct
+ 	      | None -> []
+ 	      | Some s ->
+ 		let c = emitted_status_color s in
+-		[ `Color c; `Fontcolor c; `Style [`Bold] ]
++		[ `Color c; `Fontcolor c; `Style `Bold ]
+ 
+         let default_vertex_attributes _ = []
+         let default_edge_attributes _ = []
+diff --git a/src/misc/service_graph.ml b/src/misc/service_graph.ml
+index 4f866c5..d158028 100644
+--- a/src/misc/service_graph.ml
++++ b/src/misc/service_graph.ml
+@@ -289,7 +289,7 @@ Src root:%s in %s (is_root:%b) Dst:%s in %s (is_root:%b) [2d case]"
+         color e
+       else
+         match CallG.E.label e with
+-        | Inter_services -> [ `Style [`Invis] ]
++        | Inter_services -> [ `Style `Invis ]
+         | Inter_functions | Both -> color e
+ 
+     let default_edge_attributes _ = []
+@@ -303,7 +303,7 @@ Src root:%s in %s (is_root:%b) Dst:%s in %s (is_root:%b) [2d case]"
+           sg_attributes =
+             [ `Label ("S " ^ cs);
+               `Color (Extlib.number_to_color id);
+-              `Style [`Bold] ] }
++              `Style `Bold ] }
+ 
+   end
+ 
+diff --git a/src/pdg_types/pdgTypes.ml b/src/pdg_types/pdgTypes.ml
+index 05754e4..74cdebf 100644
+--- a/src/pdg_types/pdgTypes.ml
++++ b/src/pdg_types/pdgTypes.ml
+@@ -626,7 +626,7 @@ module Pdg = struct
+ 
+     let graph_attributes _ = [`Rankdir `TopToBottom ]
+ 
+-    let default_vertex_attributes _ = [`Style [`Filled]]
++    let default_vertex_attributes _ = [`Style `Filled]
+     let vertex_name v = string_of_int (Node.id v)
+ 
+     let vertex_attributes v =
+@@ -711,13 +711,13 @@ module Pdg = struct
+         if Dpd.is_ctrl d then (`Arrowtail `Odot)::attrib else attrib
+       in
+       let attrib =
+-        if Dpd.is_addr d then (`Style [`Dotted])::attrib else attrib
++        if Dpd.is_addr d then (`Style `Dotted)::attrib else attrib
+       in
+         attrib
+ 
+     let get_subgraph v =
+       let mk_subgraph name attrib =
+-        let attrib = (`Style [`Filled]) :: attrib in
++        let attrib = (`Style `Filled) :: attrib in
+         Some { Graph.Graphviz.DotAttributes.sg_name= name;
+                sg_parent = None;
+                sg_attributes = attrib }
+diff --git a/src/postdominators/print.ml b/src/postdominators/print.ml
+index f2e3a25..15f4ff2 100644
+--- a/src/postdominators/print.ml
++++ b/src/postdominators/print.ml
+@@ -63,7 +63,7 @@ module Printer = struct
+ 
+   let graph_attributes (title, _) = [`Label title]
+ 
+-  let default_vertex_attributes _g = [`Style [`Filled]]
++  let default_vertex_attributes _g = [`Style `Filled]
+   let default_edge_attributes _g = []
+ 
+   let vertex_attributes (s, has_postdom) =
+diff --git a/src/semantic_callgraph/register.ml b/src/semantic_callgraph/register.ml
+index 1c79dcc..071f061 100644
+--- a/src/semantic_callgraph/register.ml
++++ b/src/semantic_callgraph/register.ml
+@@ -102,8 +102,8 @@ module Service =
+          let name = Kernel_function.get_name
+          let attributes v =
+            [ `Style
+-               [if Kernel_function.is_definition v then `Bold
+-                else `Dotted] ]
++               (if Kernel_function.is_definition v then `Bold
++                else `Dotted) ]
+          let entry_point () =
+            try Some (fst (Globals.entry_point ()))
+            with Globals.No_such_entry_point _ -> None
+diff --git a/src/slicing/printSlice.ml b/src/slicing/printSlice.ml
+index c5363f9..211e0bb 100644
+--- a/src/slicing/printSlice.ml
++++ b/src/slicing/printSlice.ml
+@@ -227,7 +227,7 @@ module PrintProject = struct
+ 
+   let graph_attributes (name, _) = [`Label name]
+ 
+-  let default_vertex_attributes _ = [`Style [`Filled]]
++  let default_vertex_attributes _ = [`Style `Filled]
+ 
+   let vertex_name v = match v with
+     | Src fi -> SlicingMacros.fi_name fi
+@@ -280,16 +280,16 @@ module PrintProject = struct
+ 
+   let edge_attributes (e, call) =
+     let attrib = match e with
+-    | (Src _, Src _) -> [`Style [`Invis]]
+-    | (OptSliceCallers _, _) -> [`Style [`Invis]]
+-    | (_, OptSliceCallers _) -> [`Style [`Invis]]
++    | (Src _, Src _) -> [`Style `Invis]
++    | (OptSliceCallers _, _) -> [`Style `Invis]
++    | (_, OptSliceCallers _) -> [`Style `Invis]
+     | _ -> []
+     in match call with None -> attrib
+       | Some call -> (`Label (string_of_int call.sid)):: attrib
+ 
+   let get_subgraph v =
+     let mk_subgraph name attrib =
+-      let attrib = (*(`Label name) ::*) (`Style [`Filled]) :: attrib in
++      let attrib = (*(`Label name) ::*) (`Style `Filled) :: attrib in
+           Some { Graph.Graphviz.DotAttributes.sg_name= name;
+                  sg_parent = None;
+                  sg_attributes = attrib }
+diff --git a/src/syntactic_callgraph/register.ml b/src/syntactic_callgraph/register.ml
+index d4669c4..d41980e 100644
+--- a/src/syntactic_callgraph/register.ml
++++ b/src/syntactic_callgraph/register.ml
+@@ -37,8 +37,8 @@ module Service =
+          let name v = nodeName v.cnInfo
+          let attributes v =
+            [ match v.cnInfo with
+-             | NIVar (_,b) when not !b -> `Style [`Dotted]
+-             | _ -> `Style [`Bold] ]
++             | NIVar (_,b) when not !b -> `Style `Dotted
++             | _ -> `Style `Bold ]
+          let equal v1 v2 = id v1 = id v2
+ 	 let compare v1 v2 = 
+ 	   let i1 = id v1 in
+diff --git a/src/wp/cil2cfg.ml b/src/wp/cil2cfg.ml
+index 6d8cf09..ba5f410 100644
+--- a/src/wp/cil2cfg.ml
++++ b/src/wp/cil2cfg.ml
+@@ -1278,9 +1278,9 @@ module Printer (PE : sig val edge_txt : edge -> string end) = struct
+       | Vstart | Vend | Vexit -> [`Color 0x0000FF; `Shape `Doublecircle]
+       | VfctIn | VfctOut -> [`Color 0x0000FF; `Shape `Box]
+       | VblkIn _ | VblkOut _ -> [`Shape `Box]
+-      | Vloop _ | Vloop2 _ -> [`Color 0xFF0000; `Style [`Filled]]
++      | Vloop _ | Vloop2 _ -> [`Color 0xFF0000; `Style `Filled]
+       | Vtest _ | Vswitch _ ->
+-        [`Color 0x00FF00; `Style [`Filled]; `Shape `Diamond]
++        [`Color 0x00FF00; `Style `Filled; `Shape `Diamond]
+       | Vcall _ | Vstmt _ -> []
+     in (`Label (String.escaped label))::attr
+ 
+@@ -1290,15 +1290,15 @@ module Printer (PE : sig val edge_txt : edge -> string end) = struct
+     let attr = [] in
+     let attr = (`Label (String.escaped (PE.edge_txt e)))::attr in
+     let attr =
+-      if is_back_edge e then (`Constraint false)::(`Style [`Bold])::attr
++      if is_back_edge e then (`Constraint false)::(`Style `Bold)::attr
+       else attr
+     in
+     let attr = match (edge_type e) with
+       | Ethen | EbackThen -> (`Color 0x00FF00)::attr
+       | Eelse | EbackElse -> (`Color 0xFF0000)::attr
+-      | Ecase [] -> (`Color 0x0000FF)::(`Style [`Dashed])::attr
++      | Ecase [] -> (`Color 0x0000FF)::(`Style `Dashed)::attr
+       | Ecase _ -> (`Color 0x0000FF)::attr
+-      | Enext -> (`Style [`Dotted])::attr
++      | Enext -> (`Style `Dotted)::attr
+       | Eback -> attr (* see is_back_edge above *)
+       | Enone -> attr
+     in
+@@ -1308,7 +1308,7 @@ module Printer (PE : sig val edge_txt : edge -> string end) = struct
+ 
+   let get_subgraph v =
+      let mk_subgraph name attrib =
+-      let attrib = (`Style [`Filled]) :: attrib in
++      let attrib = (`Style `Filled) :: attrib in
+           Some { Graph.Graphviz.DotAttributes.sg_name= name;
+                  sg_parent = None;
+                  sg_attributes = attrib }
+-- 
diff --git a/pkgs/development/tools/analysis/frama-c/default.nix b/pkgs/development/tools/analysis/frama-c/default.nix
new file mode 100644
index 00000000000..baa63855a0a
--- /dev/null
+++ b/pkgs/development/tools/analysis/frama-c/default.nix
@@ -0,0 +1,96 @@
+{ stdenv, fetchurl, ncurses, ocamlPackages, graphviz
+, ltl2ba, coq, alt-ergo, gmp, why3 }:
+
+stdenv.mkDerivation rec {
+  name    = "frama-c-${version}";
+  version = "20140301";
+  slang   = "Neon";
+
+  src = fetchurl {
+    url    = "http://frama-c.com/download/frama-c-${slang}-${version}.tar.gz";
+    sha256 = "0ca7ky7vs34did1j64v6d8gcp2irzw3rr5qgv47jhmidbipn1865";
+  };
+
+  why2 = fetchurl {
+    url    = "http://why.lri.fr/download/why-2.34.tar.gz";
+    sha256 = "1335bhq9v3h46m8aba2c5myi9ghm87q41in0m15xvdrwq5big1jg";
+  };
+
+  buildInputs = with ocamlPackages; [
+    ncurses ocaml findlib alt-ergo ltl2ba ocamlgraph gmp
+    lablgtk coq graphviz zarith why3 zarith
+  ];
+
+
+  enableParallelBuilding = true;
+  configureFlags = [ "--disable-local-ocamlgraph" ];
+
+  unpackPhase = ''
+    tar xf $src
+    tar xf $why2
+  '';
+
+  buildPhase = ''
+    cd frama*
+    ./configure --prefix=$out
+    make -j$NIX_BUILD_CORES
+    make install
+    cd ../why*
+    FRAMAC=$out/bin/frama-c ./configure --prefix=$out
+    make
+    make install
+  '';
+
+
+  # Taken from Debian Sid
+  # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746091
+  patches = ./0004-Port-to-OCamlgraph-1.8.5.patch;
+
+  # Enter frama-c directory before patching
+  prePatch = ''cd frama*'';
+  postPatch = ''
+    # strip absolute paths to /usr/bin
+    for file in ./configure ./share/Makefile.common ./src/*/configure; do
+      substituteInPlace $file  --replace '/usr/bin/' ""
+    done
+
+    # find library paths
+    OCAMLGRAPH_HOME=`ocamlfind query ocamlgraph`
+    LABLGTK_HOME=`ocamlfind query lablgtk2`
+
+    # patch search paths
+    # ensure that the tests against the ocamlgraph version succeeds
+    # filter out the additional search paths from ocamldep
+    substituteInPlace ./configure \
+      --replace '$OCAMLLIB/ocamlgraph' "$OCAMLGRAPH_HOME" \
+      --replace '$OCAMLLIB/lablgtk2' "$LABLGTK_HOME" \
+      --replace '+ocamlgraph' "$OCAMLGRAPH_HOME" \
+    substituteInPlace ./Makefile --replace '+lablgtk2' "$LABLGTK_HOME" \
+      --replace '$(patsubst +%,.,$(INCLUDES) $(GUI_INCLUDES))' \
+                '$(patsubst /%,.,$(patsubst +%,.,$(INCLUDES) $(GUI_INCLUDES)))'
+
+    substituteInPlace ./src/aorai/aorai_register.ml --replace '"ltl2ba' '"${ltl2ba}/bin/ltl2ba'
+
+    cd ../why*
+    substituteInPlace ./frama-c-plugin/Makefile --replace 'shell frama-c' "shell $out/bin/frama-c"
+    substituteInPlace ./jc/jc_make.ml --replace ' why-dp '       " $out/bin/why-dp "
+    substituteInPlace ./jc/jc_make.ml --replace "?= why@\n"      "?= $out/bin/why@\n"
+    substituteInPlace ./jc/jc_make.ml --replace ' gwhy-bin@'     " $out/bin/gwhy-bin@"
+    substituteInPlace ./jc/jc_make.ml --replace ' why3 '         " ${why3}/bin/why3 "
+    substituteInPlace ./jc/jc_make.ml --replace ' why3ide '      " ${why3}/bin/why3ide "
+    substituteInPlace ./jc/jc_make.ml --replace ' why3replayer ' " ${why3}/bin/why3replayer "
+    substituteInPlace ./jc/jc_make.ml --replace ' why3ml '       " ${why3}/bin/why3ml "
+    substituteInPlace ./jc/jc_make.ml --replace ' coqdep@'       " ${coq}/bin/coqdep@"
+    substituteInPlace ./jc/jc_make.ml --replace 'coqc'           " ${coq}/bin/coqc"
+    substituteInPlace ./frama-c-plugin/register.ml --replace ' jessie ' " $out/bin/jessie "
+    cd ..
+  '';
+
+  meta = {
+    description = "Frama-C is an extensible tool for source-code analysis of C software";
+    homepage    = http://frama-c.com/;
+    license     = stdenv.lib.licenses.lgpl21;
+    maintainers = with stdenv.lib.maintainers; [ thoughtpolice amiddelk ];
+    platforms   = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/development/tools/analysis/lcov/default.nix b/pkgs/development/tools/analysis/lcov/default.nix
index 21064ebe870..89a17d28a1b 100644
--- a/pkgs/development/tools/analysis/lcov/default.nix
+++ b/pkgs/development/tools/analysis/lcov/default.nix
@@ -1,16 +1,16 @@
 {stdenv, fetchurl, perl}:
 
 stdenv.mkDerivation rec {
-  name = "lcov-1.9";
+  name = "lcov-1.10";
 
   src = fetchurl {
     url = "mirror://sourceforge/ltp/${name}.tar.gz";
-    sha256 = "1jhs1x2qy5la5gpdfl805zm11rsz6anla3b0wffk6wq79xfi4zn3";
+    sha256 = "13xq2ln4jjasslqzzhr5g11q1c19gwpng1jphzbzmylmrjz62ila";
   };
 
   patches =
-    [ ./find-source.patch ]
-    ++ (stdenv.lib.optional stdenv.isFreeBSD ./freebsd-install.patch);
+    [ ./lcov-except-unreach.patch ./no-warn-missing.patch ]
+    ++ stdenv.lib.optional stdenv.isFreeBSD ./freebsd-install.patch;
 
   preBuild = ''
     makeFlagsArray=(PREFIX=$out BIN_DIR=$out/bin MAN_DIR=$out/share/man)
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     done
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "LCOV, a code coverage tool that enhances GNU gcov";
 
     longDescription =
@@ -39,9 +39,9 @@ stdenv.mkDerivation rec {
       '';
 
     homepage = http://ltp.sourceforge.net/coverage/lcov.php;
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
-    maintainers = [ ];
-    platforms = stdenv.lib.platforms.all;
+    maintainers = [ maintainers.mornfall ];
+    platforms = platforms.all;
   };
 }
diff --git a/pkgs/development/tools/analysis/lcov/find-source.patch b/pkgs/development/tools/analysis/lcov/find-source.patch
deleted file mode 100644
index 428ae399d4e..00000000000
--- a/pkgs/development/tools/analysis/lcov/find-source.patch
+++ /dev/null
@@ -1,84 +0,0 @@
---- lcov-1.8/bin/geninfo	2010-01-29 11:14:46.000000000 +0100
-+++ lcov-1.8/bin/geninfo	2010-04-18 23:33:43.000000000 +0200
-@@ -51,6 +51,7 @@
- 
- use strict;
- use File::Basename; 
-+use Cwd qw(abs_path);
- use File::Spec::Functions qw /abs2rel catdir file_name_is_absolute splitdir
- 			      splitpath rel2abs/;
- use Getopt::Long;
-@@ -95,6 +96,7 @@ sub match_filename($@);
- sub solve_ambiguous_match($$$);
- sub split_filename($);
- sub solve_relative_path($$);
-+sub find_source_file($$);
- sub read_gcov_header($);
- sub read_gcov_file($);
- sub info(@);
-@@ -964,7 +966,7 @@ sub process_dafile($$)
- 
- 		if (defined($source))
- 		{
--			$source = solve_relative_path($base_dir, $source);
-+ 			$source = find_source_file($base_dir, $source);
- 		}
- 
- 		# gcov will happily create output even if there's no source code
-@@ -981,18 +983,9 @@ sub process_dafile($$)
- 			die("ERROR: could not read source file $source\n");
- 		}
- 
--		@matches = match_filename(defined($source) ? $source :
--					  $gcov_file, keys(%{$instr}));
-+		next if ! -r $source;
- 
--		# Skip files that are not mentioned in the graph file
--		if (!@matches)
--		{
--			warn("WARNING: cannot find an entry for ".$gcov_file.
--			     " in $graph_file_extension file, skipping ".
--			     "file!\n");
--			unlink($gcov_file);
--			next;
--		}
-+		@matches = ($source);
- 
- 		# Read in contents of gcov file
- 		@result = read_gcov_file($gcov_file);
-@@ -1242,6 +1235,25 @@ sub solve_relative_path($$)
- }
- 
- 
-+sub find_source_file($$)
-+{
-+        my ($base_dir, $source) = @_;
-+        my $dir = $base_dir;
-+
-+        # Hack to make absolute paths work on Nixpkgs coverage
-+        # reports.  The source is in /nix/store/<bla>/.build/<bla>.
-+        $source = $1 if $source =~ /^\/.*\/\.build\/(.*)$/;
-+        
-+        while (!-e "$dir/$source") {
-+                $dir = $dir . "/..";
-+                if (length $dir > 1000) {
-+                        return "$base_dir/$source";
-+                }
-+        }
-+        return abs_path("$dir/$source");
-+}
-+
-+
- #
- # match_filename(gcov_filename, list)
- #
-@@ -1918,7 +1930,7 @@ sub process_graphfile($$)
- 
- 	# Get path to data file in absolute and normalized form (begins with /,
- 	# contains no more ../ or ./)
--	$graph_filename = solve_relative_path($cwd, $graph_filename);
-+	$graph_filename = find_source_file($cwd, $graph_filename);
- 
- 	# Get directory and basename of data file
- 	($graph_dir, $graph_basename) = split_filename($graph_filename);
-
diff --git a/pkgs/development/tools/analysis/lcov/lcov-except-unreach.patch b/pkgs/development/tools/analysis/lcov/lcov-except-unreach.patch
new file mode 100644
index 00000000000..6c8d8664d02
--- /dev/null
+++ b/pkgs/development/tools/analysis/lcov/lcov-except-unreach.patch
@@ -0,0 +1,13 @@
+http://ltp.cvs.sourceforge.net/viewvc/ltp/utils/analysis/lcov/bin/geninfo?r1=1.117&r2=1.118&view=patch
+
+--- a/bin/geninfo	2012/10/10 08:36:16	1.117
++++ b/bin/geninfo	2012/11/13 09:58:53	1.118
+@@ -1833,7 +1833,7 @@
+ 						push(@result, 0);
+ 					} else {
+ 						# Check for zero count
+-						if ($count eq "#####") {
++						if ($count =~ /^[#=]/) {
+ 							$count = 0;
+ 						}
+ 						push(@result, 1);
diff --git a/pkgs/development/tools/analysis/lcov/no-warn-missing.patch b/pkgs/development/tools/analysis/lcov/no-warn-missing.patch
new file mode 100644
index 00000000000..fa1f476fba0
--- /dev/null
+++ b/pkgs/development/tools/analysis/lcov/no-warn-missing.patch
@@ -0,0 +1,54 @@
+http://ltp.cvs.sourceforge.net/viewvc/ltp/utils/analysis/lcov/bin/geninfo?view=log
+
+--- a/bin/geninfo	2013/01/10 09:02:32	1.119
++++ b/bin/geninfo	2013/02/22 14:09:08	1.120
+@@ -864,7 +864,6 @@
+ 	my $source;		# gcov source header information
+ 	my $object;		# gcov object header information
+ 	my @matches;		# List of absolute paths matching filename
+-	my @unprocessed;	# List of unprocessed source code files
+ 	my $base_dir;		# Base directory for current file
+ 	my @tmp_links;		# Temporary links to be cleaned up
+ 	my @result;
+@@ -1060,7 +1059,6 @@
+ 
+ 	# Traverse the list of generated .gcov files and combine them into a
+ 	# single .info file
+-	@unprocessed = keys(%{$instr});
+ 	foreach $gcov_file (sort(@gcov_list))
+ 	{
+ 		my $i;
+@@ -1143,16 +1141,6 @@
+ 						\@matches, \@gcov_content);
+ 		}
+ 
+-		# Remove processed file from list
+-		for ($index = scalar(@unprocessed) - 1; $index >= 0; $index--)
+-		{
+-			if ($unprocessed[$index] eq $source_filename)
+-			{
+-				splice(@unprocessed, $index, 1);
+-				last;
+-			}
+-		}
+-
+ 		# Skip external files if requested
+ 		if (!$opt_external) {
+ 			if (is_external($source_filename)) {
+@@ -1297,16 +1285,6 @@
+ 		unlink($gcov_file);
+ 	}
+ 
+-	# Check for files which show up in the graph file but were never
+-	# processed
+-	if (@unprocessed && @gcov_list)
+-	{
+-		foreach (@unprocessed)
+-		{
+-			warn("WARNING: no data found for $_\n");
+-		}
+-	}
+-
+ 	if (!($output_filename && ($output_filename eq "-")))
+ 	{
+ 		close(INFO_HANDLE);
diff --git a/pkgs/development/tools/analysis/radare/default.nix b/pkgs/development/tools/analysis/radare/default.nix
index d549bd8fb19..2ab8c05ebf8 100644
--- a/pkgs/development/tools/analysis/radare/default.nix
+++ b/pkgs/development/tools/analysis/radare/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Free advanced command line hexadecimal editor";
     homepage = http://radare.org/;
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
     maintainers = with stdenv.lib.maintainers; [viric];
     platforms = with stdenv.lib.platforms; all;
   };
diff --git a/pkgs/development/tools/analysis/radare/ired.nix b/pkgs/development/tools/analysis/radare/ired.nix
index f7fb810410d..a2d135d4484 100644
--- a/pkgs/development/tools/analysis/radare/ired.nix
+++ b/pkgs/development/tools/analysis/radare/ired.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Interactive Raw Editor";
     homepage = http://radare.org/;
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
     maintainers = with stdenv.lib.maintainers; [viric];
     platforms = with stdenv.lib.platforms; all;
   };
diff --git a/pkgs/development/tools/analysis/sparse/default.nix b/pkgs/development/tools/analysis/sparse/default.nix
index f860f05c36a..6d0e28f0ab2 100644
--- a/pkgs/development/tools/analysis/sparse/default.nix
+++ b/pkgs/development/tools/analysis/sparse/default.nix
@@ -1,38 +1,25 @@
-{ fetchurl, stdenv, pkgconfig }:
+{ fetchurl, stdenv, pkgconfig, libxml2, llvm }:
 
 stdenv.mkDerivation rec {
-  name = "sparse-0.4.4";
+  name = "sparse-0.5.0";
 
   src = fetchurl {
-    url = "mirror://kernel/software/devel/sparse/dist/${name}.tar.gz";
-    sha256 = "5ad02110130fd8f8d82f2b030de5f2db6f924fd805593a5b8be8072a620414c6";
+    url = "mirror://kernel/software/devel/sparse/dist/${name}.tar.xz";
+    sha256 = "1mc86jc5xdrdmv17nqj2cam2yqygnj6ar1iqkwsx2y37ij8wy7wj";
   };
 
   preConfigure = ''
-    sed -i "Makefile" \
-        -e "s|^PREFIX *=.*$|PREFIX = $out|g"
+    sed -i Makefile -e "s|^PREFIX=.*$|PREFIX=$out|g"
   '';
 
-  buildInputs = [ pkgconfig ];
-
+  buildInputs = [ pkgconfig libxml2 llvm ];
   doCheck = true;
 
   meta = {
     description = "Sparse, a semantic parser for C";
-
-    longDescription = ''
-      Sparse, the semantic parser, provides a compiler frontend
-      capable of parsing most of ANSI C as well as many GCC
-      extensions, and a collection of sample compiler backends,
-      including a static analyzer also called "sparse".  Sparse
-      provides a set of annotations designed to convey semantic
-      information about types, such as what address space pointers
-      point to, or what locks a function acquires or releases.
-    '';
-
-    homepage = http://www.kernel.org/pub/software/devel/sparse/;
-
-    # See http://www.opensource.org/licenses/osl.php .
-    license = "Open Software License v1.1";
+    homepage    = "https://git.kernel.org/cgit/devel/sparse/sparse.git/";
+    license     = stdenv.lib.licenses.mit;
+    platforms   = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/development/tools/analysis/spin/default.nix b/pkgs/development/tools/analysis/spin/default.nix
index b4fdd4c09d4..06c04ca41b5 100644
--- a/pkgs/development/tools/analysis/spin/default.nix
+++ b/pkgs/development/tools/analysis/spin/default.nix
@@ -1,30 +1,25 @@
-{stdenv, fetchurl, flex, yacc, tk }:
+{stdenv, fetchurl, yacc }:
 
-stdenv.mkDerivation {
-  name = "spin-5.1.7";
+stdenv.mkDerivation rec {
+  version = "6.3.2";
+  name = "spin-${version}";
 
   src = fetchurl {
-    url = http://spinroot.com/spin/Src/spin517.tar.gz;
-    sha256 = "03c6bmar4z13jx7dddb029f0qnmgl8x4hyfwn3qijjyd4dbliiw6";
+    url = http://spinroot.com/spin/Src/spin632.tar.gz;
+    curlOpts = "--user-agent 'Mozilla/5.0'";
+    sha256 = "1llsv1mnwr99hvsm052i3wwpa3dm5j12s5p10hizi6i9hlp00b5y";
   };
 
-  buildInputs = [ flex yacc tk ];
+  buildInputs = [ yacc ];
 
-  patchPhase = ''
-    cd Src*
-    sed -i -e 's/-DNXT/-DNXT -DCPP="\\"gcc -E -x c\\""/' makefile
-  '';
-  installPhase = ''
-    mkdir -p $out/bin
-    cp ../Xspin*/xsp* $out/bin/xspin
-    sed -i -e '1s@^#!/bin/sh@#!${tk}/bin/wish@' \
-      -e '/exec wish/d' $out/bin/xspin
-    cp spin $out/bin
-  '';
+  sourceRoot = "Spin/Src${version}";
+
+  installPhase = "install -D spin $out/bin/spin";
 
   meta = {
     description = "Formal verification tool for distributed software systems";
     homepage = http://spinroot.com/;
     license = "free";
+    maintainers = stdenv.lib.maintainers.mornfall;
   };
 }
diff --git a/pkgs/development/tools/analysis/valgrind/default.nix b/pkgs/development/tools/analysis/valgrind/default.nix
index 4592c1bb53f..5ffc287d114 100644
--- a/pkgs/development/tools/analysis/valgrind/default.nix
+++ b/pkgs/development/tools/analysis/valgrind/default.nix
@@ -1,24 +1,35 @@
 { stdenv, fetchurl, perl, gdb }:
 
-stdenv.mkDerivation (rec {
-  name = "valgrind-3.8.1";
+stdenv.mkDerivation rec {
+  name = "valgrind-3.9.0";
 
   src = fetchurl {
     url = "http://valgrind.org/downloads/${name}.tar.bz2";
-    sha256 = "1nsqk70ry3221sd62s4f0njcrncppszs4xxjcak13lxyfq2y0fs7";
+    sha256 = "1w6n5qvxy2ssbczcl1c2yd2ggjn3ipay2hvpn10laly2dfh73bz6";
   };
 
-  patches = [ ./glibc-2.17.patch ];
+  patches = [ ./glibc-2.19.patch ];
 
   # Perl is needed for `cg_annotate'.
   # GDB is needed to provide a sane default for `--db-command'.
   nativeBuildInputs = [ perl ];
   buildInputs = stdenv.lib.optional (!stdenv.isDarwin) gdb;
 
+  enableParallelBuilding = true;
+
+  postPatch =
+    # Apple's GCC doesn't recognize `-arch' (as of version 4.2.1, build 5666).
+    ''
+      echo "getting rid of the \`-arch' GCC option..."
+      find -name Makefile\* -exec \
+        sed -i {} -e's/DARWIN\(.*\)-arch [^ ]\+/DARWIN\1/g' \;
+
+      sed -i coregrind/link_tool_exe_darwin.in \
+          -e 's/^my \$archstr = .*/my $archstr = "x86_64";/g'
+    '';
+
   configureFlags =
-    if (stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin")
-    then [ "--enable-only64bit" ]
-    else [];
+    stdenv.lib.optional (stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin") "--enable-only64bit";
 
   postInstall = ''
     for i in $out/lib/valgrind/*.supp; do
@@ -41,25 +52,9 @@ stdenv.mkDerivation (rec {
       Valgrind to build new tools.
     '';
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
-    maintainers = with stdenv.lib.maintainers; [ eelco ];
-    platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+    platforms = stdenv.lib.platforms.linux;
   };
 }
-
-//
-
-(if stdenv.isDarwin
- then {
-   patchPhase =
-     # Apple's GCC doesn't recognize `-arch' (as of version 4.2.1, build 5666).
-     '' echo "getting rid of the \`-arch' GCC option..."
-        find -name Makefile\* -exec \
-          sed -i {} -e's/DARWIN\(.*\)-arch [^ ]\+/DARWIN\1/g' \;
-
-        sed -i coregrind/link_tool_exe_darwin.in \
-            -e 's/^my \$archstr = .*/my $archstr = "x86_64";/g'
-     '';
- }
- else {}))
diff --git a/pkgs/development/tools/analysis/valgrind/glibc-2.17.patch b/pkgs/development/tools/analysis/valgrind/glibc-2.17.patch
deleted file mode 100644
index bee1abe71f1..00000000000
--- a/pkgs/development/tools/analysis/valgrind/glibc-2.17.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-commit 3781ac11ff374b3517011c1710ec517d52f25cd2
-Author: tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9>
-Date:   Mon Jan 14 09:48:49 2013 +0000
-
-    Accept glibc 2.17 as valid.
-    
-    
-    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13228 a5019735-40e9-0310-863c-91ae7b9d1cf9
-
-diff --git a/configure.in b/configure.in
-index e0fb12d..0f3b3df 100644
---- a/configure.in
-+++ b/configure.in
-@@ -906,6 +906,13 @@ case "${GLIBC_VERSION}" in
- 	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
- 	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-+     2.17)
-+	AC_MSG_RESULT(2.17 family)
-+	AC_DEFINE([GLIBC_2_17], 1, [Define to 1 if you're using glibc 2.17.x])
-+	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	;;
-      darwin)
- 	AC_MSG_RESULT(Darwin)
- 	AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
-@@ -919,7 +926,7 @@ case "${GLIBC_VERSION}" in
- 
-      *)
- 	AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
--	AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.16])
-+	AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.17])
- 	AC_MSG_ERROR([or Darwin libc])
- 	;;
- esac
-diff -ur valgrind-3.8.1/config.h.in valgrind-3.8.1/config.h.in
---- valgrind-3.8.1/config.h.in	2013-01-16 17:15:33.531018561 +0100
-+++ valgrind-3.8.1/config.h.in	2013-01-16 17:19:21.000000000 +0100
-@@ -48,6 +48,9 @@
- /* Define to 1 if you're using glibc 2.16.x */
- #undef GLIBC_2_16
- 
-+/* Define to 1 if you're using glibc 2.17.x */
-+#undef GLIBC_2_17
-+
- /* Define to 1 if you're using glibc 2.2.x */
- #undef GLIBC_2_2
- 
-diff -ur valgrind-3.8.1/configure valgrind-3.8.1/configure
---- valgrind-3.8.1/configure	2013-01-16 17:15:33.563018480 +0100
-+++ valgrind-3.8.1/configure	2013-01-16 17:19:21.373643238 +0100
-@@ -6610,6 +6610,16 @@
- 	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
- 	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-+     2.17)
-+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.17 family" >&5
-+$as_echo "2.17 family" >&6; }
-+
-+$as_echo "#define GLIBC_2_17 1" >>confdefs.h
-+
-+	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	;;
-      darwin)
- 	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5
- $as_echo "Darwin" >&6; }
-@@ -6630,7 +6640,7 @@
-      *)
- 	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported version ${GLIBC_VERSION}" >&5
- $as_echo "unsupported version ${GLIBC_VERSION}" >&6; }
--	as_fn_error "Valgrind requires glibc version 2.2 - 2.16" "$LINENO" 5
-+	as_fn_error "Valgrind requires glibc version 2.2 - 2.17" "$LINENO" 5
- 	as_fn_error "or Darwin libc" "$LINENO" 5
- 	;;
- esac
diff --git a/pkgs/development/tools/analysis/valgrind/glibc-2.19.patch b/pkgs/development/tools/analysis/valgrind/glibc-2.19.patch
new file mode 100644
index 00000000000..137b0a325b0
--- /dev/null
+++ b/pkgs/development/tools/analysis/valgrind/glibc-2.19.patch
@@ -0,0 +1,39 @@
+https://projects.archlinux.org/svntogit/packages.git/plain/trunk/valgrind-3.9.0-glibc-2.19.patch?h=packages/valgrind
+
+diff -Naur valgrind-3.9.0-orig/configure valgrind-3.9.0/configure
+--- valgrind-3.9.0-orig/configure	2013-11-01 09:33:32.000000000 +1000
++++ valgrind-3.9.0/configure	2014-02-08 09:28:06.063248544 +1000
+@@ -6689,6 +6689,16 @@
+ 	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ 	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ 	;;
++     2.19)
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.19 family" >&5
++$as_echo "2.19 family" >&6; }
++
++$as_echo "#define GLIBC_2_19 1" >>confdefs.h
++
++	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++	;;
+      darwin)
+ 	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5
+ $as_echo "Darwin" >&6; }
+diff -Naur valgrind-3.9.0-orig/configure.ac valgrind-3.9.0/configure.ac
+--- valgrind-3.9.0-orig/configure.ac	2013-11-01 09:28:16.000000000 +1000
++++ valgrind-3.9.0/configure.ac	2014-02-08 09:27:38.870385366 +1000
+@@ -918,6 +918,13 @@
+ 	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ 	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ 	;;
++     2.19)
++	AC_MSG_RESULT(2.19 family)
++	AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x])
++	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++	;;
+      darwin)
+ 	AC_MSG_RESULT(Darwin)
+ 	AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
diff --git a/pkgs/development/tools/analysis/valkyrie/default.nix b/pkgs/development/tools/analysis/valkyrie/default.nix
index 3a0879d6edf..76becca74cf 100644
--- a/pkgs/development/tools/analysis/valkyrie/default.nix
+++ b/pkgs/development/tools/analysis/valkyrie/default.nix
@@ -15,9 +15,8 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = http://www.valgrind.org/;
     description = "Qt4-based GUI for the Valgrind 3.6.x series";
-
-    license = "GPLv2";
-
+    license = stdenv.lib.licenses.gpl2;
     platforms = stdenv.lib.platforms.linux;
+    broken = true;
   };
 }
diff --git a/pkgs/development/tools/apktool/default.nix b/pkgs/development/tools/apktool/default.nix
new file mode 100644
index 00000000000..23941653575
--- /dev/null
+++ b/pkgs/development/tools/apktool/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, makeWrapper, jre, buildTools }:
+
+stdenv.mkDerivation rec {
+  name = "apktool-${version}";
+  version = "1.5.2";
+
+  src = fetchurl {
+    url = "https://android-apktool.googlecode.com/files/apktool${version}.tar.bz2";
+    sha1 = "2dd828cf79467730c7406aa918f1da1bd21aaec8";
+  };
+
+  unpackCmd = ''
+    tar -xvf $src || true
+    cd apktool*
+  '';
+
+  phases = [ "unpackPhase" "installPhase" ];
+
+  buildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    install -D apktool.jar "$out/libexec/apktool/apktool.jar"
+    mkdir -p "$out/bin"
+    makeWrapper "${jre}/bin/java" "$out/bin/apktool" \
+        --add-flags "-jar $out/libexec/apktool/apktool.jar" \
+        --prefix PATH : "${buildTools}/build-tools/android-4.3/"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A tool for reverse engineering Android apk files";
+    homepage    = https://code.google.com/p/android-apktool/;
+    license     = licenses.asl20;
+    maintainers = with maintainers; [ offline ];
+  };
+
+}
diff --git a/pkgs/development/tools/build-managers/apache-ant/ant-contrib.nix b/pkgs/development/tools/build-managers/apache-ant/ant-contrib.nix
deleted file mode 100644
index ca61f43c738..00000000000
--- a/pkgs/development/tools/build-managers/apache-ant/ant-contrib.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-args: with args;
-
-stdenv.mkDerivation {
-  name = "ant-contrib-1.0b3";
-
-  installPhase = ''
-    mkdir -p $out
-    mv ant-contrib*.jar $out/
-  '';
-
-  phases = "unpackPhase installPhase";
-
-  src = fetchurl {
-    url = mirror://sourceforge/ant-contrib/ant-contrib-1.0b3-bin.tar.bz2;
-    sha256 = "96effcca2581c1ab42a4828c770b48d54852edf9e71cefc9ed2ffd6590571ad1";
-  };
-}
diff --git a/pkgs/development/tools/build-managers/apache-ant/builder.sh b/pkgs/development/tools/build-managers/apache-ant/builder.sh
deleted file mode 100644
index 68aa89d475e..00000000000
--- a/pkgs/development/tools/build-managers/apache-ant/builder.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-source $stdenv/setup
-
-tar jxf $src || exit 1
-mkdir -p $out
-
-mv apache-ant-*/* $out || exit 1
-
-# add ant-contrib
-cp $antContrib/*.jar $out/lib
-
-# remove crap in the root directory
-
-for file in $out/*
-do
-  if test -f $file ; then
-    rm $file
-  fi
-done
-rm -rf $out/docs
-
-# prevent the use of hacky scripts. This will be handled in Nix.
-rm $out/bin/* || exit 1
-
-# add ant script. This script is to be invoked with all
-# appropiate variables and will try to be clever or user-friendly.
-
-cat >> $out/bin/ant <<EOF
-#! /bin/sh
-
-export JAVA_HOME=$jdk
-export JAVACMD=$jdk/bin/java
-export LANG="en_US"
-
-export ANT_HOME=$out
- 
-if [ -z "\$LOCALCLASSPATH" ] ; then
-    LOCALCLASSPATH=\$ANT_HOME/lib/ant-launcher.jar
-else
-    LOCALCLASSPATH=\$ANT_HOME/lib/ant-launcher.jar:\$LOCALCLASSPATH
-fi
-
-if [ -n "\$JIKESPATH" ]; then
-  exec "\$JAVACMD" \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" -Dant.home="\${ANT_HOME}" -Djikes.class.path="\$JIKESPATH" org.apache.tools.ant.launch.Launcher \$NIX_ANT_ARGS \$ANT_ARGS -lib "$CLASSPATH" "\$@"
-else
-  exec "\$JAVACMD" \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" -Dant.home="\${ANT_HOME}" org.apache.tools.ant.launch.Launcher \$NIX_ANT_ARGS \$ANT_ARGS -lib "$CLASSPATH" "\$@"
-  fi
-fi
-EOF
-
-chmod a+x $out/bin/ant
-
-ln -s $out/bin/ant $out/bin/antRun
-
diff --git a/pkgs/development/tools/build-managers/apache-ant/default.nix b/pkgs/development/tools/build-managers/apache-ant/default.nix
index c14e09e25b7..0dfb634c594 100644
--- a/pkgs/development/tools/build-managers/apache-ant/default.nix
+++ b/pkgs/development/tools/build-managers/apache-ant/default.nix
@@ -1,30 +1,106 @@
-{ fetchurl, stdenv, jdk }:
+{ fetchurl, stdenv, makeWrapper }:
 
-let
+let version = "1.9.3"; in
 
-  antContrib = import ./ant-contrib.nix {
-    inherit fetchurl stdenv;
+stdenv.mkDerivation {
+  name = "ant-${version}";
+
+  buildInputs = [ makeWrapper ];
+
+  src = fetchurl {
+    url = "mirror://apache/ant/binaries/apache-ant-${version}-bin.tar.bz2";
+    sha1 = "efcf206e24b0dd1583c501182ad163af277951a4";
   };
 
-  version = "1.8.4";
+  contrib = fetchurl {
+    url = mirror://sourceforge/ant-contrib/ant-contrib-1.0b3-bin.tar.bz2;
+    sha256 = "96effcca2581c1ab42a4828c770b48d54852edf9e71cefc9ed2ffd6590571ad1";
+  };
 
-in
+  installPhase =
+    ''
+      mkdir -p $out/bin $out/lib/ant
+      mv * $out/lib/ant/
 
-stdenv.mkDerivation {
-  name = "ant-${(builtins.parseDrvName jdk.name).name}-${version}";
+      # Get rid of the manual (35 MiB).  Maybe we should put this in a
+      # separate output.  Also get rid of the Ant scripts since we
+      # provide our own.
+      rm -rf $out/lib/ant/{manual,bin,WHATSNEW}
 
-  builder = ./builder.sh;
-  
-  buildInputs = [ antContrib jdk ];
+      # Install ant-contrib.
+      unpackFile $contrib
+      cp -p ant-contrib/ant-contrib-*.jar $out/lib/ant/lib/
 
-  inherit antContrib jdk;
+      cat >> $out/bin/ant <<EOF
+      #! ${stdenv.shell} -e
 
-  src = fetchurl {
-    url = "mirror://apache/ant/binaries/apache-ant-${version}-bin.tar.bz2";
-    sha1 = "d9e3e83dd9664cfe1dcd4841c082db3f559af922";
-  };
+      ANT_HOME=$out/lib/ant
+
+      # Find the JDK by looking for javac.  As a fall-back, find the
+      # JRE by looking for java.  The latter allows just the JRE to be
+      # used with (say) ECJ as the compiler.  Finally, allow the GNU
+      # JVM.
+      if [ -z "\$JAVA_HOME" ]; then
+          for i in javac java gij; do
+              if p="\$(type -p \$i)"; then
+                  export JAVA_HOME="\$(dirname \$(dirname \$(readlink -f \$p)))"
+                  break
+              fi
+          done
+          if [ -z "\$JAVA_HOME" ]; then
+              echo "\$0: cannot find the JDK or JRE" >&2
+              exit 1
+          fi
+      fi
+
+      if [ -z \$NIX_JVM ]; then
+          if [ -e \$JAVA_HOME/bin/java ]; then
+              NIX_JVM=\$JAVA_HOME/bin/java
+          elif [ -e \$JAVA_HOME/bin/gij ]; then
+              NIX_JVM=\$JAVA_HOME/bin/gij
+          else
+              NIX_JVM=java
+          fi
+      fi
+
+      LOCALCLASSPATH="\$ANT_HOME/lib/ant-launcher.jar\''${LOCALCLASSPATH:+:}\$LOCALCLASSPATH"
+
+      exec \$NIX_JVM \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" \
+          -Dant.home=\$ANT_HOME -Dant.library.dir="\$ANT_LIB" \
+          org.apache.tools.ant.launch.Launcher \$NIX_ANT_ARGS \$ANT_ARGS \
+          -cp "\$CLASSPATH" "\$@"
+      EOF
+
+      chmod +x $out/bin/ant
+    ''; # */
 
   meta = {
-    description = "Java-based build tool";
+    homepage = http://ant.apache.org/;
+    description = "A Java-based build tool";
+
+    longDescription = ''
+      Apache Ant is a Java-based build tool.  In theory, it is kind of like
+      Make, but without Make's wrinkles.
+
+      Why another build tool when there is already make, gnumake, nmake, jam,
+      and others? Because all those tools have limitations that Ant's
+      original author couldn't live with when developing software across
+      multiple platforms.  Make-like tools are inherently shell-based -- they
+      evaluate a set of dependencies, then execute commands not unlike what
+      you would issue in a shell.  This means that you can easily extend
+      these tools by using or writing any program for the OS that you are
+      working on.  However, this also means that you limit yourself to the
+      OS, or at least the OS type such as Unix, that you are working on.
+
+      Ant is different.  Instead of a model where it is extended with
+      shell-based commands, Ant is extended using Java classes.  Instead of
+      writing shell commands, the configuration files are XML-based, calling
+      out a target tree where various tasks get executed.  Each task is run
+      by an object that implements a particular Task interface.
+    '';
+
+    license = stdenv.lib.licenses.asl20;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+    platforms = stdenv.lib.platforms.all;
   };
 }
diff --git a/pkgs/development/tools/build-managers/apache-ant/from-source.nix b/pkgs/development/tools/build-managers/apache-ant/from-source.nix
deleted file mode 100644
index 14213415ff8..00000000000
--- a/pkgs/development/tools/build-managers/apache-ant/from-source.nix
+++ /dev/null
@@ -1,90 +0,0 @@
-{ stdenv, fetchurl, gcj, junit }:
-
-let version = "1.7.1"; in
-
-/* TODO: Once we have Icedtea, use this Nix expression to build Ant with
-   Sun's javac.  */
-
-stdenv.mkDerivation {
-  name = "ant-gcj-${version}";
-
-  src = fetchurl {
-    url = "mirror://apache/ant/source/apache-ant-${version}-src.tar.bz2";
-    sha256 = "19pvqvgkxgpgsqm4lvbki5sm0z84kxmykdqicvfad47gc1r9mi2d";
-  };
-
-  patches = [ ./use-gcj.patch ];
-
-  buildInputs = [ gcj junit ];
-
-  configurePhase = ''
-    mkdir -p "tool-aliases/bin"
-    cd "tool-aliases/bin"
-    cat > javac <<EOF
-#!/bin/sh
-opts="-C"
-echo 'running \`gcj '"\$opts \$@'..."
-exec "$(type -P gcj)" \$opts \$@
-EOF
-    chmod +x javac
-    ln -sv $(type -P gij) java
-    export PATH="$PWD:$PATH"
-
-    cd ../..
-    export JAVA_HOME="$PWD/tool-aliases"
-
-    # Make JUnit visible.
-    export CLASSPATH="$(find ${junit} -name \*.jar -printf "%p:")"
-  '';
-
-  # Note: We don't build the javadoc.
-  buildPhase = ''
-    mkdir -p "$out"
-    ./build.sh -Dant.install="$out" install-lite
-  '';
-
-  installPhase = ''
-    # Actually, everything is already installed at this point, so we just
-    # rearrange a few things.
-    rm -v "$out/bin/"*.bat
-
-    mkdir -p "$out/lib/java"
-    mv -v "$out/lib/"*.jar "$out/lib/java"
-    sed -i "$out/bin/ant" \
-        -e "s|^ANT_LIB=.*$|ANT_LIB=$out/lib/java|g ;
-            s|JAVACMD=java.*$|JAVACMD=${gcj}/lib/jvm/bin/java|g ;
-            /^ant_exec_command/i export ANT_HOME=$out"
-  '';
-
-  meta = {
-    description = "Java-based build tool";
-
-    longDescription = ''
-      Apache Ant is a Java-based build tool.  In theory, it is kind of like
-      Make, but without Make's wrinkles.
-
-      Why another build tool when there is already make, gnumake, nmake, jam,
-      and others? Because all those tools have limitations that Ant's
-      original author couldn't live with when developing software across
-      multiple platforms.  Make-like tools are inherently shell-based -- they
-      evaluate a set of dependencies, then execute commands not unlike what
-      you would issue in a shell.  This means that you can easily extend
-      these tools by using or writing any program for the OS that you are
-      working on.  However, this also means that you limit yourself to the
-      OS, or at least the OS type such as Unix, that you are working on.
-
-      Ant is different.  Instead of a model where it is extended with
-      shell-based commands, Ant is extended using Java classes.  Instead of
-      writing shell commands, the configuration files are XML-based, calling
-      out a target tree where various tasks get executed.  Each task is run
-      by an object that implements a particular Task interface.
-    '';
-
-    homepage = http://ant.apache.org/;
-
-    license = "APLv2";
-
-    maintainers = [ ];
-    platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
-  };
-}
diff --git a/pkgs/development/tools/build-managers/apache-ant/use-gcj.patch b/pkgs/development/tools/build-managers/apache-ant/use-gcj.patch
deleted file mode 100644
index db82d3ba689..00000000000
--- a/pkgs/development/tools/build-managers/apache-ant/use-gcj.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Setting `java.compiler' or `build.compiler' in `build.properties' isn't enough.
-
---- apache-ant-1.7.1/build.xml	2008-06-27 07:05:23.000000000 +0200
-+++ apache-ant-1.7.1/build.xml	2009-09-24 15:10:53.000000000 +0200
-@@ -578,12 +578,7 @@
-       classname="com.jcraft.jsch.Session"
-       classpathref="classpath"/>
- 
--    <condition property="build.compiler" value="classic">
--      <not>
--        <isset property="jdk1.3+"/>
--      </not>
--    </condition>
--    <property name="build.compiler" value="modern"/>
-+    <property name="build.compiler" value="gcj"/>
- 
-     <!--check for XSD support in the parser-->
-     <condition property="xmlschema.present">
diff --git a/pkgs/development/tools/build-managers/buildbot-slave/default.nix b/pkgs/development/tools/build-managers/buildbot-slave/default.nix
index b28c4d9296f..870664c252a 100644
--- a/pkgs/development/tools/build-managers/buildbot-slave/default.nix
+++ b/pkgs/development/tools/build-managers/buildbot-slave/default.nix
@@ -1,12 +1,12 @@
 { stdenv, buildPythonPackage, fetchurl, coreutils, twisted }:
 
 buildPythonPackage (rec {
-  name = "buildbot-slave-0.8.7p1";
+  name = "buildbot-slave-0.8.8";
   namePrefix = "";
 
   src = fetchurl {
     url = "http://buildbot.googlecode.com/files/${name}.tar.gz";
-    sha256 = "1p7a0srab6ifljh9vi25awvxfrxljj9s0hi1jipiiykyhjihgnxv";
+    sha256 = "1k1pk3y0rk6j01wc491jblryr4ajqg1ing9m3sjaw9s5sga34xcb";
   };
 
   patchPhase = ''
@@ -34,7 +34,7 @@ buildPythonPackage (rec {
   meta = with stdenv.lib; {
     homepage = http://buildbot.net/;
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     description = "Continuous integration system that automates the build/test cycle";
 
diff --git a/pkgs/development/tools/build-managers/buildbot/default.nix b/pkgs/development/tools/build-managers/buildbot/default.nix
index c872d67146b..ccbf74e528e 100644
--- a/pkgs/development/tools/build-managers/buildbot/default.nix
+++ b/pkgs/development/tools/build-managers/buildbot/default.nix
@@ -9,12 +9,12 @@
 assert enableDebugClient -> pygobject != null && pyGtkGlade != null;
 
 buildPythonPackage (rec {
-  name = "buildbot-0.8.7p1";
+  name = "buildbot-0.8.8";
   namePrefix = "";
 
   src = fetchurl {
     url = "http://buildbot.googlecode.com/files/${name}.tar.gz";
-    sha256 = "0xjpk8510fhryl1g4mczz319h62il8hw9rh1rzvsfmffgf43zvld";
+    sha256 = "1l1rsy82zv8582wypw00ac0k0wsr82ky74f3np4clbrxv3ry64sh";
   };
 
   patchPhase =
@@ -52,7 +52,7 @@ buildPythonPackage (rec {
   meta = with stdenv.lib; {
     homepage = http://buildbot.net/;
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     # Of course, we don't really need that on NixOS.  :-)
     description = "Continuous integration system that automates the build/test cycle";
diff --git a/pkgs/development/tools/build-managers/cmake/762-13887.patch b/pkgs/development/tools/build-managers/cmake/762-13887.patch
new file mode 100644
index 00000000000..3ef27a09b5c
--- /dev/null
+++ b/pkgs/development/tools/build-managers/cmake/762-13887.patch
@@ -0,0 +1,17 @@
+diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
+index e7491bb..57b4348 100644
+--- a/Source/CTest/cmCTestTestHandler.cxx
++++ b/Source/CTest/cmCTestTestHandler.cxx
+@@ -1303,10 +1303,9 @@ int cmCTestTestHandler::ExecuteCommands(std::vector<cmStdString>& vec)
+   for ( it = vec.begin(); it != vec.end(); ++it )
+     {
+     int retVal = 0;
+-    std::string cmd = cmSystemTools::ConvertToOutputPath(it->c_str());
+-    cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " << cmd
++    cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " << *it
+       << std::endl);
+-    if ( !cmSystemTools::RunSingleCommand(cmd.c_str(), 0, &retVal, 0,
++    if ( !cmSystemTools::RunSingleCommand((*it).c_str(), 0, &retVal, 0,
+                                           cmSystemTools::OUTPUT_MERGE
+         /*this->Verbose*/) || retVal != 0 )
+       {
diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix
index 640aa6c2d67..951a19cde90 100644
--- a/pkgs/development/tools/build-managers/cmake/default.nix
+++ b/pkgs/development/tools/build-managers/cmake/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, replace, curl, expat, zlib, bzip2, libarchive
+{ stdenv, fetchurl, fetchpatch, replace, curl, expat, zlib, bzip2, libarchive
 , useNcurses ? false, ncurses, useQt4 ? false, qt4
 }:
 
@@ -7,7 +7,7 @@ with stdenv.lib;
 let
   os = stdenv.lib.optionalString;
   majorVersion = "2.8";
-  minorVersion = "9";
+  minorVersion = "12.2";
   version = "${majorVersion}.${minorVersion}";
 in
 
@@ -18,13 +18,26 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz";
-    sha256 = "1yg68ng732cfm5c0h91chqwhg06zdh45bybm353kd1myk5rwqgfw";
+    sha256 = "0phf295a9cby0v7zqdswr238v5aiy3rb2fs6dz39zjxbmzlp8rcc";
   };
 
+  enableParallelBuilding = true;
+
   patches =
+    [(fetchpatch { # see http://www.cmake.org/Bug/view.php?id=13959
+      name = "FindFreetype-2.5.patch";
+      url = "http://www.cmake.org/Bug/file_download.php?file_id=4660&type=bug";
+      sha256 = "136z63ff83hnwd247cq4m8m8164pklzyl5i2csf5h6wd8p01pdkj";
+    })] ++
     # Don't search in non-Nix locations such as /usr, but do search in
-    # Nixpkgs' Glibc.
-    optional (stdenv ? glibc) ./search-path.patch;
+    # Nixpkgs' Glibc. 
+    optional (stdenv ? glibc) ./search-path.patch ++
+    optional (stdenv ? cross) (fetchurl {
+      name = "fix-darwin-cross-compile.patch";
+      url = "http://public.kitware.com/Bug/file_download.php?"
+          + "file_id=4981&type=bug";
+      sha256 = "16acmdr27adma7gs9rs0dxdiqppm15vl3vv3agy7y8s94wyh4ybv";
+    });
 
   buildInputs = [ curl expat zlib bzip2 libarchive ]
     ++ optional useNcurses ncurses
@@ -51,6 +64,6 @@ stdenv.mkDerivation rec {
     homepage = http://www.cmake.org/;
     description = "Cross-Platform Makefile Generator";
     platforms = if useQt4 then qt4.meta.platforms else stdenv.lib.platforms.all;
-    maintainers = [ stdenv.lib.maintainers.urkud ];
+    maintainers = with stdenv.lib.maintainers; [ urkud mornfall ];
   };
 }
diff --git a/pkgs/development/tools/build-managers/cmake/search-path.patch b/pkgs/development/tools/build-managers/cmake/search-path.patch
index ef8a9eef7c1..31c85d6f522 100644
--- a/pkgs/development/tools/build-managers/cmake/search-path.patch
+++ b/pkgs/development/tools/build-managers/cmake/search-path.patch
@@ -1,41 +1,43 @@
-diff -ru -x '*~' cmake-2.8.5-orig/Modules/Platform/Linux.cmake cmake-2.8.5/Modules/Platform/Linux.cmake
---- cmake-2.8.5-orig/Modules/Platform/Linux.cmake	2011-07-08 14:21:44.000000000 +0200
-+++ cmake-2.8.5/Modules/Platform/Linux.cmake	2011-07-21 19:45:00.000000000 +0200
-@@ -36,13 +36,13 @@
+diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake
+index fe8e003..378512c 100644
+--- a/Modules/Platform/Linux.cmake
++++ b/Modules/Platform/Linux.cmake
+@@ -36,13 +36,13 @@ else()
    # checking the platform every time.  This option is advanced enough
    # that only package maintainers should need to adjust it.  They are
    # capable of providing a setting on the command line.
--  IF(EXISTS "/etc/debian_version")
--    SET(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL
+-  if(EXISTS "/etc/debian_version")
+-    set(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL
 -      "Install .so files without execute permission.")
--  ELSE(EXISTS "/etc/debian_version")
-+  #IF(EXISTS "/etc/debian_version")
-+  #  SET(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL
-+  #    "Install .so files without execute permission.")
-+  #ELSE(EXISTS "/etc/debian_version")
-     SET(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL
+-  else()
++  # if(EXISTS "/etc/debian_version")
++  #   set(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL
++  #     "Install .so files without execute permission.")
++  # else()
+     set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL
        "Install .so files without execute permission.")
--  ENDIF(EXISTS "/etc/debian_version")
-+  #ENDIF(EXISTS "/etc/debian_version")
- ENDIF(DEFINED CMAKE_INSTALL_SO_NO_EXE)
+-  endif()
++  # endif()
+ endif()
  
  # Match multiarch library directory names.
-@@ -52,6 +52,6 @@
+@@ -52,6 +52,6 @@ include(Platform/UnixPaths)
  
  # Debian has lib64 paths only for compatibility so they should not be
  # searched.
--IF(EXISTS "/etc/debian_version")
--  SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
--ENDIF(EXISTS "/etc/debian_version")
-+#IF(EXISTS "/etc/debian_version")
-+#  SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
-+#ENDIF(EXISTS "/etc/debian_version")
-diff -ru -x '*~' cmake-2.8.5-orig/Modules/Platform/UnixPaths.cmake cmake-2.8.5/Modules/Platform/UnixPaths.cmake
---- cmake-2.8.5-orig/Modules/Platform/UnixPaths.cmake	2011-07-08 14:21:44.000000000 +0200
-+++ cmake-2.8.5/Modules/Platform/UnixPaths.cmake	2011-07-21 19:50:52.000000000 +0200
-@@ -33,55 +33,18 @@
+-if(EXISTS "/etc/debian_version")
+-  set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
+-endif()
++# if(EXISTS "/etc/debian_version")
++#  set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
++#endif()
+diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
+index ccb2663..39834e6 100644
+--- a/Modules/Platform/UnixPaths.cmake
++++ b/Modules/Platform/UnixPaths.cmake
+@@ -33,55 +33,18 @@ get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
  # search types.
- LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
    # Standard
 -  /usr/local /usr /
 -
@@ -47,7 +49,7 @@ diff -ru -x '*~' cmake-2.8.5-orig/Modules/Platform/UnixPaths.cmake cmake-2.8.5/M
 -  )
 -
 -# List common include file locations not under the common prefixes.
--LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH
+-list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
 -  # Windows API on Cygwin
 -  /usr/include/w32api
 -
@@ -56,11 +58,11 @@ diff -ru -x '*~' cmake-2.8.5-orig/Modules/Platform/UnixPaths.cmake cmake-2.8.5/M
 -
 -  # Other
 -  /usr/pkg/include
--  /opt/csw/include /opt/include  
+-  /opt/csw/include /opt/include
 -  /usr/openwin/include
 -  )
 -
--LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
+-list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
 -  # Windows API on Cygwin
 -  /usr/lib/w32api
 -
@@ -69,25 +71,25 @@ diff -ru -x '*~' cmake-2.8.5-orig/Modules/Platform/UnixPaths.cmake cmake-2.8.5/M
 -
 -  # Other
 -  /usr/pkg/lib
--  /opt/csw/lib /opt/lib 
+-  /opt/csw/lib /opt/lib
 -  /usr/openwin/lib
 -  )
 -
--LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH
+-list(APPEND CMAKE_SYSTEM_PROGRAM_PATH
 -  /usr/pkg/bin
 +  "@glibc@"
    )
  
- LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
+ list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
 -  /lib /usr/lib /usr/lib32 /usr/lib64
 +  "@glibc@/lib"
    )
  
- LIST(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
+ list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
 -  /usr/include
 +  "@glibc@/include"
    )
- LIST(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
+ list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
 -  /usr/include
 +  "@glibc@/include"
    )
diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh
index 175e538e519..39052fea6cb 100755
--- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh
@@ -47,7 +47,7 @@ cmakeConfigurePhase() {
     eval "$postConfigure"
 }
 
-if [ -z "$dontUseCmakeConfigure" -a ! -v configurePhase ]; then
+if [ -z "$dontUseCmakeConfigure" -a -z "$configurePhase" ]; then
     configurePhase=cmakeConfigurePhase
 fi
 
@@ -56,3 +56,20 @@ if [ -n "$crossConfig" ]; then
 else
     envHooks+=(addCMakeParams)
 fi
+
+makeCmakeFindLibs(){
+  for flag in $NIX_CFLAGS_COMPILE $NIX_LDFLAGS; do
+    case $flag in
+      -I*)
+        export CMAKE_INCLUDE_PATH="$CMAKE_INCLUDE_PATH${CMAKE_INCLUDE_PATH:+:}${flag:2}"
+        ;;
+      -L*)
+        export CMAKE_LIBRARY_PATH="$CMAKE_LIBRARY_PATH${CMAKE_LIBRARY_PATH:+:}${flag:2}"
+        ;;
+    esac
+  done
+}
+
+# not using setupHook, because it could be a setupHook adding additional
+# include flags to NIX_CFLAGS_COMPILE
+postHooks+=(makeCmakeFindLibs)
diff --git a/pkgs/development/tools/build-managers/colormake/default.nix b/pkgs/development/tools/build-managers/colormake/default.nix
index 25ef7ef0b24..edc901858b8 100644
--- a/pkgs/development/tools/build-managers/colormake/default.nix
+++ b/pkgs/development/tools/build-managers/colormake/default.nix
@@ -19,6 +19,6 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Simple wrapper around make to colorize the output";
-    license = "GPLv2";
+    license = stdenv.lib.licenses.gpl2;
   };
 }
diff --git a/pkgs/development/tools/build-managers/gnumake-3.80/default.nix b/pkgs/development/tools/build-managers/gnumake/3.80/default.nix
index b0926a7f531..b0926a7f531 100644
--- a/pkgs/development/tools/build-managers/gnumake-3.80/default.nix
+++ b/pkgs/development/tools/build-managers/gnumake/3.80/default.nix
diff --git a/pkgs/development/tools/build-managers/gnumake-3.80/log.patch b/pkgs/development/tools/build-managers/gnumake/3.80/log.patch
index fa90acfe8de..fa90acfe8de 100644
--- a/pkgs/development/tools/build-managers/gnumake-3.80/log.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.80/log.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/3.81.nix b/pkgs/development/tools/build-managers/gnumake/3.81/default.nix
index 56d2326c916..2a8c80e7db2 100644
--- a/pkgs/development/tools/build-managers/gnumake/3.81.nix
+++ b/pkgs/development/tools/build-managers/gnumake/3.81/default.nix
@@ -41,7 +41,7 @@ stdenv.mkDerivation {
 
     homepage = http://www.gnu.org/software/make/;
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
     maintainers = [ stdenv.lib.maintainers.ludo ];
   };
 }
diff --git a/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch b/pkgs/development/tools/build-managers/gnumake/3.81/impure-dirs.patch
index f6646f1d012..f6646f1d012 100644
--- a/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.81/impure-dirs.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/log-3.81.patch b/pkgs/development/tools/build-managers/gnumake/3.81/log-3.81.patch
index b98d85a0826..b98d85a0826 100644
--- a/pkgs/development/tools/build-managers/gnumake/log-3.81.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.81/log-3.81.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/MAKEFLAGS-reexec.patch b/pkgs/development/tools/build-managers/gnumake/3.82/MAKEFLAGS-reexec.patch
index a2f59657d4c..a2f59657d4c 100644
--- a/pkgs/development/tools/build-managers/gnumake/MAKEFLAGS-reexec.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/MAKEFLAGS-reexec.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/archives-many-objs.patch b/pkgs/development/tools/build-managers/gnumake/3.82/archives-many-objs.patch
index 73c0381ced4..73c0381ced4 100644
--- a/pkgs/development/tools/build-managers/gnumake/archives-many-objs.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/archives-many-objs.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/construct-command-line.patch b/pkgs/development/tools/build-managers/gnumake/3.82/construct-command-line.patch
index aa4a1afe3fd..aa4a1afe3fd 100644
--- a/pkgs/development/tools/build-managers/gnumake/construct-command-line.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/construct-command-line.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/copy-on-expand.patch b/pkgs/development/tools/build-managers/gnumake/3.82/copy-on-expand.patch
index 3f202b4db96..3f202b4db96 100644
--- a/pkgs/development/tools/build-managers/gnumake/copy-on-expand.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/copy-on-expand.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/darwin-library_search-dylib.patch b/pkgs/development/tools/build-managers/gnumake/3.82/darwin-library_search-dylib.patch
index de7e4f61521..de7e4f61521 100644
--- a/pkgs/development/tools/build-managers/gnumake/darwin-library_search-dylib.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/darwin-library_search-dylib.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/default.nix b/pkgs/development/tools/build-managers/gnumake/3.82/default.nix
index 4f3c7defa48..6b24df39be9 100644
--- a/pkgs/development/tools/build-managers/gnumake/default.nix
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/default.nix
@@ -56,7 +56,7 @@ stdenv.mkDerivation {
 
     homepage = http://www.gnu.org/software/make/;
 
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
     maintainers = [ stdenv.lib.maintainers.ludo ];
     platforms = stdenv.lib.platforms.all;
   };
diff --git a/pkgs/development/tools/build-managers/gnumake/glob-speedup.patch b/pkgs/development/tools/build-managers/gnumake/3.82/glob-speedup.patch
index 45971f33590..45971f33590 100644
--- a/pkgs/development/tools/build-managers/gnumake/glob-speedup.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/glob-speedup.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/3.82/impure-dirs.patch b/pkgs/development/tools/build-managers/gnumake/3.82/impure-dirs.patch
new file mode 100644
index 00000000000..f6646f1d012
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/impure-dirs.patch
@@ -0,0 +1,34 @@
+diff -rc read.c read.c
+*** read.c	2006-03-17 15:24:20.000000000 +0100
+--- read.c	2007-05-24 17:16:31.000000000 +0200
+***************
+*** 99,107 ****
+--- 99,109 ----
+  #endif
+      INCLUDEDIR,
+  #ifndef _AMIGA
++ #if 0    
+      "/usr/gnu/include",
+      "/usr/local/include",
+      "/usr/include",
++ #endif    
+  #endif
+      0
+    };
+diff -rc reremake.c
+*** remake.c	2006-03-20 03:36:37.000000000 +0100
+--- remake.c	2007-05-24 17:06:54.000000000 +0200
+***************
+*** 1452,1460 ****
+--- 1452,1462 ----
+    static char *dirs[] =
+      {
+  #ifndef _AMIGA
++ #if 0
+        "/lib",
+        "/usr/lib",
+  #endif
++ #endif
+  #if defined(WINDOWS32) && !defined(LIBDIR)
+  /*
+   * This is completely up to the user at product install time. Just define
diff --git a/pkgs/development/tools/build-managers/gnumake/intermediate-parallel.patch b/pkgs/development/tools/build-managers/gnumake/3.82/intermediate-parallel.patch
index 9bb7add0bde..9bb7add0bde 100644
--- a/pkgs/development/tools/build-managers/gnumake/intermediate-parallel.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/intermediate-parallel.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/log.patch b/pkgs/development/tools/build-managers/gnumake/3.82/log.patch
index e6197fd8e78..e6197fd8e78 100644
--- a/pkgs/development/tools/build-managers/gnumake/log.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/log.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/long-command-line.patch b/pkgs/development/tools/build-managers/gnumake/3.82/long-command-line.patch
index 39ea05843bf..39ea05843bf 100644
--- a/pkgs/development/tools/build-managers/gnumake/long-command-line.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/long-command-line.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/memory-corruption.patch b/pkgs/development/tools/build-managers/gnumake/3.82/memory-corruption.patch
index b28c07353ec..b28c07353ec 100644
--- a/pkgs/development/tools/build-managers/gnumake/memory-corruption.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/memory-corruption.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/oneshell.patch b/pkgs/development/tools/build-managers/gnumake/3.82/oneshell.patch
index fbade127ce6..fbade127ce6 100644
--- a/pkgs/development/tools/build-managers/gnumake/oneshell.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/oneshell.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/parallel-remake.patch b/pkgs/development/tools/build-managers/gnumake/3.82/parallel-remake.patch
index a19fe7b7d62..a19fe7b7d62 100644
--- a/pkgs/development/tools/build-managers/gnumake/parallel-remake.patch
+++ b/pkgs/development/tools/build-managers/gnumake/3.82/parallel-remake.patch
diff --git a/pkgs/development/tools/build-managers/gnumake/4.0/darwin-library_search-dylib.patch b/pkgs/development/tools/build-managers/gnumake/4.0/darwin-library_search-dylib.patch
new file mode 100644
index 00000000000..de7e4f61521
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gnumake/4.0/darwin-library_search-dylib.patch
@@ -0,0 +1,17 @@
+Fixed default libpatttern on Darwin, imported from prefix overlay.
+Got merged upstream:
+https://savannah.gnu.org/bugs/?37197
+--- default.c.orig	2009-05-02 12:25:24 +0200
++++ default.c	2009-05-02 12:25:58 +0200
+@@ -509,7 +509,11 @@
+ #ifdef __MSDOS__
+     ".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
+ #else
++#ifdef __APPLE__
++    ".LIBPATTERNS", "lib%.dylib lib%.a",
++#else
+     ".LIBPATTERNS", "lib%.so lib%.a",
++#endif
+ #endif
+ #endif
+ 
diff --git a/pkgs/development/tools/build-managers/gnumake/4.0/default.nix b/pkgs/development/tools/build-managers/gnumake/4.0/default.nix
new file mode 100644
index 00000000000..2da17490abf
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gnumake/4.0/default.nix
@@ -0,0 +1,49 @@
+{stdenv, fetchurl}:
+
+let version = "4.0"; in
+stdenv.mkDerivation {
+  name = "gnumake-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnu/make/make-${version}.tar.bz2";
+    sha256 = "1nyvn8mknw0mf7727lprva3lisl1y0n03lvar342rrpdmz3qc1p6";
+  };
+
+  /* On Darwin, there are 3 test failures that haven't been investigated
+     yet.  */
+  doCheck = !stdenv.isDarwin && !stdenv.isFreeBSD;
+
+  patches =
+    [
+      # Purity: don't look for library dependencies (of the form
+      # `-lfoo') in /lib and /usr/lib.  It's a stupid feature anyway.
+      # Likewise, when searching for included Makefiles, don't look in
+      # /usr/include and friends.
+      ./impure-dirs.patch
+
+      # a bunch of patches from Gentoo, mostly should be from upstream (unreleased)
+      ./darwin-library_search-dylib.patch
+    ];
+  patchFlags = "-p0";
+
+  meta = {
+    description = "GNU Make, a program controlling the generation of non-source files from sources";
+
+    longDescription =
+      '' Make is a tool which controls the generation of executables and
+         other non-source files of a program from the program's source files.
+
+         Make gets its knowledge of how to build your program from a file
+         called the makefile, which lists each of the non-source files and
+         how to compute it from other files. When you write a program, you
+         should write a makefile for it, so that it is possible to use Make
+         to build and install the program.
+      '';
+
+    homepage = http://www.gnu.org/software/make/;
+
+    license = stdenv.lib.licenses.gpl3Plus;
+    maintainers = [ stdenv.lib.maintainers.ludo ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/tools/build-managers/gnumake/4.0/impure-dirs.patch b/pkgs/development/tools/build-managers/gnumake/4.0/impure-dirs.patch
new file mode 100644
index 00000000000..f6646f1d012
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gnumake/4.0/impure-dirs.patch
@@ -0,0 +1,34 @@
+diff -rc read.c read.c
+*** read.c	2006-03-17 15:24:20.000000000 +0100
+--- read.c	2007-05-24 17:16:31.000000000 +0200
+***************
+*** 99,107 ****
+--- 99,109 ----
+  #endif
+      INCLUDEDIR,
+  #ifndef _AMIGA
++ #if 0    
+      "/usr/gnu/include",
+      "/usr/local/include",
+      "/usr/include",
++ #endif    
+  #endif
+      0
+    };
+diff -rc reremake.c
+*** remake.c	2006-03-20 03:36:37.000000000 +0100
+--- remake.c	2007-05-24 17:06:54.000000000 +0200
+***************
+*** 1452,1460 ****
+--- 1452,1462 ----
+    static char *dirs[] =
+      {
+  #ifndef _AMIGA
++ #if 0
+        "/lib",
+        "/usr/lib",
+  #endif
++ #endif
+  #if defined(WINDOWS32) && !defined(LIBDIR)
+  /*
+   * This is completely up to the user at product install time. Just define
diff --git a/pkgs/development/tools/build-managers/gradle/default.nix b/pkgs/development/tools/build-managers/gradle/default.nix
index 97b50d0019f..b7316fc17c4 100644
--- a/pkgs/development/tools/build-managers/gradle/default.nix
+++ b/pkgs/development/tools/build-managers/gradle/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, unzip, jdk, makeWrapper }:
 
 stdenv.mkDerivation rec {
-  name = "gradle-1.8";
+  name = "gradle-1.11";
 
   src = fetchurl {
     url = "http://services.gradle.org/distributions/${name}-bin.zip";
-    sha256 = "00spxad9b5vddshp02cic0ds8icgb1clknl7494f467x2pxbnhm3";
+    sha256 = "14a0qdzjiar97l9a0i3ds2y48p1lrqkj7skkkvhz0r29hbgkbqh7";
   };
 
   installPhase = ''
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
     makeWrapper ${jdk}/bin/java $out/bin/gradle \
       --set JAVA_HOME ${jdk} \
-      --add-flags "-classpath $out/lib/gradle-launcher-1.8.jar org.gradle.launcher.GradleMain"
+      --add-flags "-classpath $out/lib/gradle-launcher-1.11.jar org.gradle.launcher.GradleMain"
   '';
 
   phases = "unpackPhase installPhase";
@@ -32,6 +32,6 @@ stdenv.mkDerivation rec {
       build-by-convention behavior.
     '';
     homepage = http://www.gradle.org/;
-    license = "ASL2.0";
+    license = stdenv.lib.licenses.asl20;
   };
 }
diff --git a/pkgs/development/tools/build-managers/leiningen/builder.sh b/pkgs/development/tools/build-managers/leiningen/builder.sh
index 8d0924028cc..c28854ca089 100644
--- a/pkgs/development/tools/build-managers/leiningen/builder.sh
+++ b/pkgs/development/tools/build-managers/leiningen/builder.sh
@@ -1,16 +1,14 @@
 #!/bin/bash
 
-set -e
-
 source $stdenv/setup
 
-mkdir -pv $out/bin $out/lib
+mkdir -pv $out/bin $out/share/java
 
 out_bin=$out/bin/lein
 
 cp -v $src $out_bin
-cp -v $jarsrc $out/lib
-cp -v $clojure/lib/java/* $out/lib
+cp -v $jarsrc $out/share/java
+cp -v $clojure/share/java/* $out/share/java/
 
 for p in $patches;
 do
@@ -21,5 +19,6 @@ chmod -v 755 $out_bin
 patchShebangs $out
 
 wrapProgram $out_bin \
-    --prefix PATH ":" ${rlwrap}/bin \
-    --set LEIN_GPG ${gnupg}/bin/gpg
+    --prefix PATH ":" "${rlwrap}/bin:${coreutils}/bin:${findutils}/bin" \
+    --set LEIN_GPG ${gnupg}/bin/gpg \
+    --set JAVA_CMD ${jdk}/bin/java
diff --git a/pkgs/development/tools/build-managers/leiningen/default.nix b/pkgs/development/tools/build-managers/leiningen/default.nix
index b1664010550..99353a1a192 100644
--- a/pkgs/development/tools/build-managers/leiningen/default.nix
+++ b/pkgs/development/tools/build-managers/leiningen/default.nix
@@ -1,23 +1,24 @@
-{ stdenv, fetchurl, makeWrapper, jdk, rlwrap, clojure, gnupg }:
+{ stdenv, fetchurl, makeWrapper
+, coreutils, findutils, jdk, rlwrap, clojure, gnupg }:
 
 stdenv.mkDerivation rec {
   pname = "leiningen";
-  version = "2.3.2";
+  version = "2.4.2";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "https://raw.github.com/technomancy/leiningen/${version}/bin/lein-pkg";
-    sha256 = "1dpvs6b2n309ixglmdpw64k8fbz8n4rd61xp4jrih0z7dgvcql6h";
+    sha256 = "1qdq3v7wv9jacw4bipgx24knlipw6zdcx43yd1qyw6zwaad51ckw";
   };
 
   jarsrc = fetchurl {
-    url = "https://leiningen.s3.amazonaws.com/downloads/${pname}-${version}-standalone.jar";
-    sha256 = "0g6sgmgl0azawwchi86qxqsknk753ffwiszsxg4idqb713ac6cda";
+    url = "https://github.com/technomancy/leiningen/releases/download/${version}/${name}-standalone.jar";
+    sha256 = "0n4kpmzw9nvppq758lhnrr7xps5j6gwmdm98m772cj7j4vixsrzb";
   };
 
-  patches = ./lein_2.3.0.patch;
+  patches = [ ./lein-fix-jar-path.patch ];
 
-  inherit rlwrap clojure gnupg;
+  inherit rlwrap clojure gnupg findutils coreutils jdk;
 
   builder = ./builder.sh;
 
@@ -30,6 +31,6 @@ stdenv.mkDerivation rec {
     description = "Project automation for Clojure";
     license = "EPL";
     platforms = stdenv.lib.platforms.linux;
-    maintainer = with stdenv.lib.maintainers; [ the-kenny ];
+    maintainers = with stdenv.lib.maintainers; [ the-kenny ];
   };
 }
diff --git a/pkgs/development/tools/build-managers/leiningen/lein-fix-jar-path.patch b/pkgs/development/tools/build-managers/leiningen/lein-fix-jar-path.patch
new file mode 100644
index 00000000000..f7d5bc4d9a7
--- /dev/null
+++ b/pkgs/development/tools/build-managers/leiningen/lein-fix-jar-path.patch
@@ -0,0 +1,4 @@
+46c47
+< LEIN_JAR=/usr/share/java/leiningen-$LEIN_VERSION-standalone.jar
+---
+> LEIN_JAR=$(find $(dirname $0)/../share/java -name *-standalone.jar | head -n 1)
diff --git a/pkgs/development/tools/build-managers/leiningen/lein_2.3.0.patch b/pkgs/development/tools/build-managers/leiningen/lein_2.3.0.patch
deleted file mode 100644
index 23f6b624776..00000000000
--- a/pkgs/development/tools/build-managers/leiningen/lein_2.3.0.patch
+++ /dev/null
@@ -1,4 +0,0 @@
-46c47
-< LEIN_JAR=/usr/share/java/leiningen-$LEIN_VERSION-standalone.jar
----
-> LEIN_JAR=$(find $(dirname $0)/../lib -name *-standalone.jar | head -n 1)
diff --git a/pkgs/development/tools/build-managers/ninja/default.nix b/pkgs/development/tools/build-managers/ninja/default.nix
index ed9890150a3..d62e000fc2a 100644
--- a/pkgs/development/tools/build-managers/ninja/default.nix
+++ b/pkgs/development/tools/build-managers/ninja/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   name = "ninja-${version}";
-  version = "1.4.0";
+  version = "1.5.1";
 
   src = fetchurl {
     name = "${name}.tar.gz";
     url = "https://github.com/martine/ninja/archive/v${version}.tar.gz";
-    sha256 = "05y3whnp0fvfv1wsp862x0w1vrn3yjzzg8ypvbpcv6y6qlrsn73h";
+    sha256 = "0z9rzay6ipy6q025n1f2im8d8jy6in9pcdsiqj30xpdlsjg7p9zv";
   };
 
   buildInputs = [ python asciidoc re2c ];
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
     '';
     homepage = http://martine.github.io/ninja/;
     license = licenses.asl20;
-    platforms = platforms.linux;
-    maintainers = [maintainers.bjornfor];
+    platforms = platforms.unix;
+    maintainers = [ maintainers.thoughtpolice maintainers.bjornfor ];
   };
 }
diff --git a/pkgs/development/tools/build-managers/rebar/default.nix b/pkgs/development/tools/build-managers/rebar/default.nix
index ac695178541..d10d9d6d1a3 100644
--- a/pkgs/development/tools/build-managers/rebar/default.nix
+++ b/pkgs/development/tools/build-managers/rebar/default.nix
@@ -1,11 +1,15 @@
 { stdenv, fetchurl, erlang }:
 
+
+let
+  version = "2.5.1";
+in
 stdenv.mkDerivation {
-  name = "rebar-2.1.0-pre";
+  name = "rebar-${version}";
 
   src = fetchurl {
-    url = "https://github.com/basho/rebar/archive/2.1.0-pre.tar.gz";
-    sha256 = "0dsbk9ssvk1hx9275900dg4bz79kpwcid4gsz09ziiwzv0jjbrjn";
+    url = "https://github.com/rebar/rebar/archive/${version}.tar.gz";
+    sha256 = "1y9b0smw0g5q197xf4iklzmcf8ad6w52p6mwzpf7b0ib1nd89jw6";
   };
 
   buildInputs = [ erlang ];
diff --git a/pkgs/development/tools/build-managers/scons/default.nix b/pkgs/development/tools/build-managers/scons/default.nix
index ddd8927a9a4..93f7699481c 100644
--- a/pkgs/development/tools/build-managers/scons/default.nix
+++ b/pkgs/development/tools/build-managers/scons/default.nix
@@ -2,7 +2,7 @@
 
 let
   name = "scons";
-  version = "2.1.0";
+  version = "2.3.2";
 in
 
 stdenv.mkDerivation {
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "mirror://sourceforge/scons/${name}-${version}.tar.gz";
-    sha256 = "4139ed14f60dd2ebcd47c59984d14705636180eb27b3d1b2949489e514b1921d";
+    sha256 = "1m29lhwz7p6k4f8wc8qjpwa89058lzq3vrycgxbfc5cmbq6354zr";
   };
 
   buildInputs = [python makeWrapper];
@@ -23,10 +23,12 @@ stdenv.mkDerivation {
   buildPhase = "python setup.py install --prefix=$out --install-data=$out/share --install-lib=$(toPythonPath $out) --symlink-scons -O1";
   installPhase = "for n in $out/bin/*-${version}; do wrapProgram $n --suffix PYTHONPATH ':' \"$(toPythonPath $out)\"; done";
 
+  pythonPath = [];
+
   meta = {
     homepage = "http://scons.org/";
     description = "An improved, cross-platform substitute for Make";
-    license = "MIT";
+    license = stdenv.lib.licenses.mit;
     longDescription = ''
       SCons is an Open Source software construction tool. Think of
       SCons as an improved, cross-platform substitute for the classic
diff --git a/pkgs/development/tools/build-managers/scons/default.upstream b/pkgs/development/tools/build-managers/scons/default.upstream
new file mode 100644
index 00000000000..f9dae2818c8
--- /dev/null
+++ b/pkgs/development/tools/build-managers/scons/default.upstream
@@ -0,0 +1,10 @@
+url http://sourceforge.net/projects/scons/files/scons/
+SF_version_dir
+version_link '[.]tar[.]gz/download$'
+SF_redirect
+ensure_hash
+
+do_overwrite() {
+  set_var_value version "$CURRENT_VERSION"
+  set_var_value sha256 "$CURRENT_HASH"
+}
diff --git a/pkgs/development/tools/build-managers/simple-build-tool/default.nix b/pkgs/development/tools/build-managers/simple-build-tool/default.nix
index e446bf1c1eb..b54f894d8eb 100644
--- a/pkgs/development/tools/build-managers/simple-build-tool/default.nix
+++ b/pkgs/development/tools/build-managers/simple-build-tool/default.nix
@@ -1,93 +1,30 @@
-{ stdenv, versionedDerivation, fetchurl, version ? "xsbt-0.12.3" }:
+{ stdenv, fetchurl, jre }:
 
-let
+stdenv.mkDerivation rec {
+  name = "sbt-${version}";
+  version = "0.13.5";
 
-      description = "A build tool for Scala";
-      longDescription = name: ''
-        ${name} is a simple build tool for Scala projects that aims to do the
-        basics well.
-
-        This package is the sbt launcher which automatically manages
-        and downloads dependencies, including the SBT package and the
-        Scala compiler.
-      '';
-
-      metaSBT = {
-        inherit description;
-        longDescription = longDescription "sbt";
-        homepage = http://code.google.com/p/simple-build-tool/;
-        license = "bsd";
-      };
-
-      metaXSBT = {
-        inherit description;
-        longDescription = longDescription "xsbt";
-        homepage = https://github.com/harrah/xsbt;
-        license = "bsd";
-      };
-
-in
-
-# Depends on a JRE at runtime.
-
-versionedDerivation "simple-build-tool" version {
-  "0.7.3" = let version = "0.7.3"; in {
-    name = "simple-build-tool-${version}";
-    src = fetchurl {
-      url = "http://simple-build-tool.googlecode.com/files/sbt-launch-${version}.jar";
-      sha256 = "1nciifzf00cs54a4h57a7v1hyklm5vgln0sscmz5kzv96ggphs6k";
-    };
-    meta = metaSBT;
-  };
-
-  "0.7.7" = let version = "0.7.7"; in {
-    name = "simple-build-tool-${version}";
-    src = fetchurl {
-      url = "http://simple-build-tool.googlecode.com/files/sbt-launch-${version}.jar";
-      # sha256 = "1nciifzf00cs54a4h57a7v1hyklm5vgln0sscmz5kzv96ggphs6j";
-      sha256 = "2720b033012a7509f7fbdfddfa69c07b105452a6f95bc410cb7dc34c1594ab3d";
-    };
-    meta = metaSBT;
+  src = fetchurl {
+    url = "http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/${version}/sbt-launch.jar";
+    sha256 = "05zvb3j7xxswpz7fz2nwbl4dwfdf0cyx5xzjis5fyi2dbzmfdrmp";
   };
 
-  "xsbt-0.11.2" = let version = "0.11.2"; in { # scala 2.9
-    name = "xsbt-${version}";
-
-    # scala needs much more PermGen space
-    javaArgs = "-Xmx1024M";
-    # from https://github.com/harrah/xsbt/wiki/Getting-Started-Setup
-    src = fetchurl {
-      url = http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/0.11.2/sbt-launch.jar;
-      sha256 = "14fbzvb1s66wpbqznw65a7nn27qrq1i9pd7wlbydv8ffl49d262n";
-    };
-    meta = metaXSBT;
-  };
-
-  "xsbt-0.12.3" = let version = "0.12.3"; in {
-    name = "xsbt-${version}";
-
-    # Recommended java options from sbt Getting started guide
-    javaArgs = "-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M";
-    # from https://github.com/harrah/xsbt/wiki/Getting-Started-Setup
-    src = fetchurl {
-      url = http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.12.3/sbt-launch.jar;
-      sha256 = "11r26abjzmnmpn65ndbq60qg31s3ichkvzpmxyrq941s1n1dbxgh";
-    };
-    meta = metaXSBT;
-  };
-}
-{
+  phases = [ "installPhase" ];
 
   installPhase = ''
-    mkdir -pv "$out/lib/java"
-    cp $src "$out/lib/java/sbt-launch-${version}.jar"
-    mkdir -p "$out/bin"
-    cat > "$out/bin/sbt" <<EOF
-    #! /bin/sh
-    exec java $javaArgs -jar $out/lib/java/sbt-launch-${version}.jar "\$@"
+    mkdir -p $out/bin
+    cat > $out/bin/sbt << EOF
+    #!/bin/sh
+    SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M"
+    ${jre}/bin/java \$SBT_OPTS -jar ${src} "\$@"
     EOF
-    chmod u+x "$out/bin/sbt"
+    chmod +x $out/bin/sbt
   '';
 
-  phases = "installPhase";
+  meta = {
+    homepage = http://www.scala-sbt.org/;
+    license = stdenv.lib.licenses.bsd3;
+    description = "A build tool for Scala, Java and more";
+    maintainers = [ stdenv.lib.maintainers.rickynils ];
+  };
 }
diff --git a/pkgs/development/tools/cdecl/cdecl-2.5-gentoo.patch b/pkgs/development/tools/cdecl/cdecl-2.5-gentoo.patch
deleted file mode 100644
index b3a67515620..00000000000
--- a/pkgs/development/tools/cdecl/cdecl-2.5-gentoo.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/cdecl.c	2009-07-07 13:20:37.000000000 +0200
-+++ a/cdecl.c.new	2009-07-07 13:25:00.000000000 +0200
-@@ -91,7 +91,7 @@
- #ifdef USE_READLINE
- # include <readline/readline.h>
-   /* prototypes for functions related to readline() */
--  char * getline();
-+  char * mygetline();
-   char ** attempt_completion(char *, int, int);
-   char * keyword_completion(char *, int);
-   char * command_completion(char *, int);
-@@ -375,7 +375,7 @@
- static char *line_read = NULL;
- 
- /* Read a string, and return a pointer to it.  Returns NULL on EOF. */
--char * getline ()
-+char * mygetline ()
- {
-   /* If the buffer has already been allocated, return the memory
-      to the free pool. */
-@@ -887,7 +887,7 @@
- 
- 	if (!quiet) (void) printf("Type `help' or `?' for help\n");
- 	ret = 0;
--	while ((line = getline())) {
-+	while ((line = mygetline())) {
- 	    if (!strcmp(line, "quit") || !strcmp(line, "exit")) {
- 		free(line);
- 		return ret;
diff --git a/pkgs/development/tools/cdecl/cdecl-2.5-implicit-pointer.patch b/pkgs/development/tools/cdecl/cdecl-2.5-implicit-pointer.patch
deleted file mode 100644
index ee4949beb6e..00000000000
--- a/pkgs/development/tools/cdecl/cdecl-2.5-implicit-pointer.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: cdecl-2.5/cdecl.c
-===================================================================
---- cdecl-2.5.orig/cdecl.c
-+++ cdecl-2.5/cdecl.c
-@@ -204,6 +204,7 @@ int DebugFlag = 0;		/* -d, output debugg
- #define ANSI	4	/* combo not allowed anymore in ANSI compiler */
- #define A	ANSI
- 
-+extern char **completion_matches PARAMS((char *, rl_compentry_func_t *));
- /* This is an lower left triangular array. If we needed */
- /* to save 9 bytes, the "long" row can be removed. */
- char crosscheck[9][9] = {
\ No newline at end of file
diff --git a/pkgs/development/tools/cdecl/cdecl-2.5-lex.patch b/pkgs/development/tools/cdecl/cdecl-2.5-lex.patch
new file mode 100644
index 00000000000..ecdee5d544f
--- /dev/null
+++ b/pkgs/development/tools/cdecl/cdecl-2.5-lex.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 1643b74..8f1ae11 100644
+--- a/Makefile
++++ b/Makefile
+@@ -33,7 +33,7 @@ c++decl: cdgram.c cdlex.c cdecl.c
+ 	rm -f cdecl
+ 
+ cdlex.c: cdlex.l
+-	lex cdlex.l && mv lex.yy.c cdlex.c
++	flex cdlex.l && mv lex.yy.c cdlex.c
+ 
+ cdgram.c: cdgram.y
+ 	yacc cdgram.y && mv y.tab.c cdgram.c
diff --git a/pkgs/development/tools/cdecl/cdecl-2.5.patch b/pkgs/development/tools/cdecl/cdecl-2.5.patch
deleted file mode 100644
index 4b00849f372..00000000000
--- a/pkgs/development/tools/cdecl/cdecl-2.5.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 9e85686..b8e6e02 100644
---- a/Makefile
-+++ b/Makefile
-@@ -15,13 +15,14 @@
- #
- # add -DUSE_READLINE	To compile in support for the GNU readline library.
- 
--CFLAGS= -s -O2 -DUSE_READLINE
-+CFLAGS=-DUSE_READLINE
- CC= gcc
--LIBS= -lreadline -ltermcap
-+LIBS= -lreadline -lncursesw
- ALLFILES= makefile cdgram.y cdlex.l cdecl.c cdecl.1 testset testset++
--BINDIR= /usr/bin
--MANDIR= /usr/man/man1
--CATDIR= /usr/man/cat1
-+PREFIX?= /usr
-+BINDIR= $(PREFIX)/bin
-+MANDIR= $(PREFIX)/man/man1
-+CATDIR= $(PREFIX)/man/cat1
- INSTALL= install -c
- INSTALL_DATA= install -c -m 644
- 
-@@ -33,7 +34,7 @@ c++decl: cdgram.c cdlex.c cdecl.c
- 	rm -f cdecl
- 
- cdlex.c: cdlex.l
--	lex cdlex.l && mv lex.yy.c cdlex.c
-+	flex cdlex.l && mv lex.yy.c cdlex.c
- 
- cdgram.c: cdgram.y
- 	yacc cdgram.y && mv y.tab.c cdgram.c
-@@ -43,8 +44,10 @@ test:
- 	./c++decl < testset++
- 
- install: cdecl
-+	$(INSTALL) -d $(BINDIR)
- 	$(INSTALL) cdecl $(BINDIR)
- 	ln $(BINDIR)/cdecl $(BINDIR)/c++decl
-+	$(INSTALL) -d $(MANDIR)
- 	$(INSTALL_DATA) cdecl.1 $(MANDIR)
- 	$(INSTALL_DATA) c++decl.1 $(MANDIR)
- 
-diff --git a/cdecl.c b/cdecl.c
-index f03f01e..1fdde9f 100644
---- a/cdecl.c
-+++ b/cdecl.c
-@@ -67,6 +67,7 @@ char cdeclsccsid[] = "@(#)cdecl.c	2.5 1/15/96";
- # include <stddef.h>
- # include <string.h>
- # include <stdarg.h>
-+# include <errno.h>
- #else
- # ifndef NOVARARGS
- #  include <varargs.h>
-@@ -124,7 +125,6 @@ char real_prompt[MAX_NAME+3];
- 
- #if __STDC__
-   char *ds(char *), *cat(char *, ...), *visible(int);
--  int getopt(int,char **,char *);
-   int main(int, char **);
-   int yywrap(void);
-   int dostdin(void);
diff --git a/pkgs/development/tools/cdecl/default.nix b/pkgs/development/tools/cdecl/default.nix
index a9eb323f9a8..d923fea8b59 100644
--- a/pkgs/development/tools/cdecl/default.nix
+++ b/pkgs/development/tools/cdecl/default.nix
@@ -1,22 +1,25 @@
-{stdenv, fetchurl, yacc, flex, readline, ncurses}:
+{stdenv, fetchurl, yacc, flex, readline, ncurses, gnused}:
 
 stdenv.mkDerivation {
   name = "cdecl-2.5";
   src = fetchurl {
-    url = ftp://metalab.unc.edu/pub/linux/devel/lang/c/cdecl-2.5.tar.gz;
-    md5 = "29895dab52e85b2474a59449e07b7996";
+    url = "http://cdecl.org/files/cdecl-blocks-2.5.tar.gz";
+    md5 = "c1927e146975b1c7524cbaf07a7c10f8";
   };
 
-  patches = [ ./cdecl-2.5-implicit-pointer.patch ./cdecl-2.5.patch ./cdecl-2.5-gentoo.patch ];
-  preBuild = "
-    makeFlags=\"PREFIX=$out\"
-  ";
+  patches = [ ./cdecl-2.5-lex.patch ];
+  preBuild = ''
+    ${gnused}/bin/sed 's/getline/cdecl_getline/g' -i cdecl.c;
+    makeFlagsArray=(CFLAGS="-DBSD -DUSE_READLINE -std=gnu89" LIBS=-lreadline);
+    makeFlags="$makeFlags PREFIX=$out BINDIR=$out/bin MANDIR=$out/man1 CATDIR=$out/cat1";
+    mkdir -p $out/bin;
+  '';
   buildInputs = [yacc flex readline ncurses];
 
   meta = {
     description = "Translator English -- C/C++ declarations";
     license = "Public Domain";
-    maintainers = with stdenv.lib.maintainers; [viric];
-    platforms = with stdenv.lib.platforms; linux;
+    maintainers = with stdenv.lib.maintainers; [viric joelteon];
+    platforms = stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/tools/continuous-integration/jenkins/default.nix b/pkgs/development/tools/continuous-integration/jenkins/default.nix
new file mode 100644
index 00000000000..5194684261c
--- /dev/null
+++ b/pkgs/development/tools/continuous-integration/jenkins/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "jenkins";
+  version = "1.550";
+
+  src = fetchurl {
+    url = "http://mirrors.jenkins-ci.org/war/${version}/jenkins.war";
+    sha256 = "1ziimbfs9kylga0xmxlfsfcc7qsirs5bnx00pa99m2l5sz2ki793";
+  };
+  meta = {
+    description = "An extendable open source continuous integration server.";
+    homepage = http://jenkins-ci.org;
+    license = stdenv.lib.licenses.mit;
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.coconnor ];
+  };
+
+  buildCommand = "ln -s $src $out";
+}
diff --git a/pkgs/development/tools/documentation/docutils/default.nix b/pkgs/development/tools/documentation/docutils/default.nix
index f6edcf54463..cd01cf059d6 100644
--- a/pkgs/development/tools/documentation/docutils/default.nix
+++ b/pkgs/development/tools/documentation/docutils/default.nix
@@ -2,15 +2,15 @@ a :
 let 
   fetchurl = a.fetchurl;
 
-  version = a.lib.attrByPath ["version"] "0.10" a; 
+  version = a.lib.attrByPath ["version"] "0.11" a;
   buildInputs = with a; [
-    python pil makeWrapper 
+    python pil makeWrapper
   ];
 in
 rec {
   src = fetchurl {
     url = "http://prdownloads.sourceforge.net/docutils/docutils-${version}.tar.gz";
-    sha256 = "0gk0733w34zibzvi6paqqfbbajzaxajc4z5i5wpxlwv73gk281ip";
+    sha256 = "1jbybs5a396nrjy9m13pgvsxdwaj7jw7nsawkhl4fi1nvxm1dx4s";
   };
 
   inherit buildInputs;
diff --git a/pkgs/development/tools/documentation/doxygen/1.7.nix b/pkgs/development/tools/documentation/doxygen/1.7.nix
deleted file mode 100644
index f530ed70e37..00000000000
--- a/pkgs/development/tools/documentation/doxygen/1.7.nix
+++ /dev/null
@@ -1,52 +0,0 @@
-{ stdenv, fetchurl, perl, flex, bison, qt4 }:
-
-let
-  name = "doxygen-1.7.4";
-in
-stdenv.mkDerivation {
-  inherit name;
-
-  src = fetchurl {
-    url = "ftp://ftp.stack.nl/pub/users/dimitri/${name}.src.tar.gz";
-    sha256 = "0rnzyp5f8c454fdkgpg5hpxwmx642spgxcpw3blbvnyw8129jp44";
-  };
-
-  patches = [ ./tmake.patch ];
-
-  buildInputs =
-    [ perl flex bison ]
-    ++ stdenv.lib.optional (qt4 != null) qt4;
-
-  prefixKey = "--prefix ";
-
-  configureFlags =
-    [ "--dot dot" ]
-    ++ stdenv.lib.optional (qt4 != null) "--with-doxywizard";
-
-  preConfigure = stdenv.lib.optionalString (qt4 != null)
-    ''
-      echo "using QTDIR=${qt4}..."
-      export QTDIR=${qt4}
-    '';
-
-  makeFlags = "MAN1DIR=share/man/man1";
-
-  enableParallelBuilding = true;
-
-  meta = {
-    license = "GPLv2+";
-    homepage = "http://doxygen.org/";
-    description = "Doxygen, a source code documentation generator tool";
-
-    longDescription = ''
-      Doxygen is a documentation system for C++, C, Java, Objective-C,
-      Python, IDL (CORBA and Microsoft flavors), Fortran, VHDL, PHP,
-      C\#, and to some extent D.  It can generate an on-line
-      documentation browser (in HTML) and/or an off-line reference
-      manual (in LaTeX) from a set of documented source files.
-    '';
-
-    maintainers = [stdenv.lib.maintainers.simons];
-    platforms = if qt4 != null then stdenv.lib.platforms.linux else stdenv.lib.platforms.unix;
-  };
-}
diff --git a/pkgs/development/tools/documentation/doxygen/default.nix b/pkgs/development/tools/documentation/doxygen/default.nix
index 4f2ef6df849..54509178b1a 100644
--- a/pkgs/development/tools/documentation/doxygen/default.nix
+++ b/pkgs/development/tools/documentation/doxygen/default.nix
@@ -1,20 +1,20 @@
-{ stdenv, fetchurl, perl, flex, bison, qt4 }:
+{ stdenv, fetchurl, perl, python, flex, bison, qt4 }:
 
 let
-  name = "doxygen-1.8.3.1";
+  name = "doxygen-1.8.6";
 in
 stdenv.mkDerivation {
   inherit name;
 
   src = fetchurl {
     url = "ftp://ftp.stack.nl/pub/users/dimitri/${name}.src.tar.gz";
-    sha256 = "0m9bwxg9g2h5fp9as0l0rmibm9ing39nssfrn3608v0v21l9yx0c";
+    sha256 = "0pskjlkbj76m9ka7zi66yj8ffjcv821izv3qxqyyphf0y0jqcwba";
   };
 
   patches = [ ./tmake.patch ];
 
   buildInputs =
-    [ perl flex bison ]
+    [ perl python flex bison ]
     ++ stdenv.lib.optional (qt4 != null) qt4;
 
   prefixKey = "--prefix ";
@@ -23,7 +23,10 @@ stdenv.mkDerivation {
     [ "--dot dot" ]
     ++ stdenv.lib.optional (qt4 != null) "--with-doxywizard";
 
-  preConfigure = stdenv.lib.optionalString (qt4 != null)
+  preConfigure =
+    ''
+      patchShebangs .
+    '' + stdenv.lib.optionalString (qt4 != null)
     ''
       echo "using QTDIR=${qt4}..."
       export QTDIR=${qt4}
@@ -34,7 +37,7 @@ stdenv.mkDerivation {
   enableParallelBuilding = true;
 
   meta = {
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
     homepage = "http://doxygen.org/";
     description = "Doxygen, a source code documentation generator tool";
 
diff --git a/pkgs/development/tools/documentation/gnome-doc-utils/default.nix b/pkgs/development/tools/documentation/gnome-doc-utils/default.nix
index 374002e8d6c..b653c705478 100644
--- a/pkgs/development/tools/documentation/gnome-doc-utils/default.nix
+++ b/pkgs/development/tools/documentation/gnome-doc-utils/default.nix
@@ -2,11 +2,11 @@
 , makeWrapper, pythonPackages }:
 
 stdenv.mkDerivation {
-  name = "gnome-doc-utils-0.20.7";
+  name = "gnome-doc-utils-0.20.10";
 
   src = fetchurl {
-    url = mirror://gnome/sources/gnome-doc-utils/0.20/gnome-doc-utils-0.20.7.tar.xz;
-    sha256 = "01lcq6gm4q9awvg7lccq43qh8g4ibz49s2mgykin78mgph9h396q";
+    url = mirror://gnome/sources/gnome-doc-utils/0.20/gnome-doc-utils-0.20.10.tar.xz;
+    sha256 = "19n4x25ndzngaciiyd8dd6s2mf9gv6nv3wv27ggns2smm7zkj1nb";
   };
 
   configureFlags = "--disable-scrollkeeper";
diff --git a/pkgs/development/tools/documentation/haddock/2.10.0.nix b/pkgs/development/tools/documentation/haddock/2.10.0.nix
index cfda3b66704..af9a72058b2 100644
--- a/pkgs/development/tools/documentation/haddock/2.10.0.nix
+++ b/pkgs/development/tools/documentation/haddock/2.10.0.nix
@@ -1,4 +1,4 @@
-{ cabal, alex, Cabal, filepath, ghcPaths, happy, xhtml }:
+{ cabal, alex, Cabal, filepath, ghcPaths, happy, xhtml, makeWrapper }:
 
 cabal.mkDerivation (self: {
   pname = "haddock";
@@ -6,15 +6,21 @@ cabal.mkDerivation (self: {
   sha256 = "045lmmna5nwj07si81vxms5xkkmqvjsiif20nny5mvlabshxn1yi";
   isLibrary = true;
   isExecutable = true;
-  buildDepends = [ Cabal filepath ghcPaths xhtml ];
+  buildDepends = [ Cabal filepath ghcPaths xhtml makeWrapper ];
   testDepends = [ Cabal filepath ];
   buildTools = [ alex happy ];
   doCheck = false;
+
+  postInstall = ''
+   wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")"
+  '';
+
   meta = {
     homepage = "http://www.haskell.org/haddock/";
     description = "A documentation-generation tool for Haskell libraries";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
     maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/documentation/haddock/2.11.0.nix b/pkgs/development/tools/documentation/haddock/2.11.0.nix
index 968efe2260b..d43e529585b 100644
--- a/pkgs/development/tools/documentation/haddock/2.11.0.nix
+++ b/pkgs/development/tools/documentation/haddock/2.11.0.nix
@@ -1,4 +1,4 @@
-{ cabal, alex, Cabal, filepath, ghcPaths, happy, xhtml }:
+{ cabal, alex, Cabal, filepath, ghcPaths, happy, xhtml, makeWrapper }:
 
 cabal.mkDerivation (self: {
   pname = "haddock";
@@ -6,15 +6,21 @@ cabal.mkDerivation (self: {
   sha256 = "0a29n6y9lmk5w78f6j8s7pg0m0k3wm7bx5r2lhk7bnzkr5f7rkcd";
   isLibrary = true;
   isExecutable = true;
-  buildDepends = [ Cabal filepath ghcPaths xhtml ];
+  buildDepends = [ Cabal filepath ghcPaths xhtml makeWrapper ];
   testDepends = [ Cabal filepath ];
   buildTools = [ alex happy ];
   doCheck = false;
+
+  postInstall = ''
+   wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")"
+  '';
+
   meta = {
     homepage = "http://www.haskell.org/haddock/";
     description = "A documentation-generation tool for Haskell libraries";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
     maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/documentation/haddock/2.12.0.nix b/pkgs/development/tools/documentation/haddock/2.12.0.nix
index 12907a64d21..b1249eee327 100644
--- a/pkgs/development/tools/documentation/haddock/2.12.0.nix
+++ b/pkgs/development/tools/documentation/haddock/2.12.0.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, alex, Cabal, deepseq, filepath, ghcPaths, happy, xhtml }:
 
 cabal.mkDerivation (self: {
@@ -15,6 +17,6 @@ cabal.mkDerivation (self: {
     description = "A documentation-generation tool for Haskell libraries";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
+    hydraPlatforms = self.stdenv.lib.platforms.none;
   };
 })
diff --git a/pkgs/development/tools/documentation/haddock/2.13.2.1.nix b/pkgs/development/tools/documentation/haddock/2.13.2.1.nix
index 3cac6e13323..749fee28571 100644
--- a/pkgs/development/tools/documentation/haddock/2.13.2.1.nix
+++ b/pkgs/development/tools/documentation/haddock/2.13.2.1.nix
@@ -1,4 +1,4 @@
-{ cabal, alex, Cabal, deepseq, filepath, ghcPaths, happy, xhtml }:
+{ cabal, alex, Cabal, deepseq, filepath, ghcPaths, happy, xhtml, makeWrapper }:
 
 cabal.mkDerivation (self: {
   pname = "haddock";
@@ -6,15 +6,21 @@ cabal.mkDerivation (self: {
   sha256 = "0kpk3bmlyd7cb6s39ix8s0ak65xhrln9mg481y3h24lf5syy5ky9";
   isLibrary = true;
   isExecutable = true;
-  buildDepends = [ Cabal deepseq filepath ghcPaths xhtml ];
+  buildDepends = [ Cabal deepseq filepath ghcPaths xhtml makeWrapper ];
   testDepends = [ Cabal deepseq filepath ];
   buildTools = [ alex happy ];
   doCheck = false;
+
+  postInstall = ''
+   wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")"
+  '';
+
   meta = {
     homepage = "http://www.haskell.org/haddock/";
     description = "A documentation-generation tool for Haskell libraries";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
     maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/documentation/haddock/2.13.2.nix b/pkgs/development/tools/documentation/haddock/2.13.2.nix
index 95890f5bd43..aa5be90fbae 100644
--- a/pkgs/development/tools/documentation/haddock/2.13.2.nix
+++ b/pkgs/development/tools/documentation/haddock/2.13.2.nix
@@ -1,4 +1,4 @@
-{ cabal, alex, Cabal, deepseq, filepath, ghcPaths, happy, xhtml }:
+{ cabal, alex, Cabal, deepseq, filepath, ghcPaths, happy, xhtml, makeWrapper }:
 
 cabal.mkDerivation (self: {
   pname = "haddock";
@@ -6,15 +6,21 @@ cabal.mkDerivation (self: {
   sha256 = "1qwj13ks3fzar14s587svv1pdiwk80m7x5pzn74v3jrqkn0xbrr5";
   isLibrary = true;
   isExecutable = true;
-  buildDepends = [ Cabal deepseq filepath ghcPaths xhtml ];
+  buildDepends = [ Cabal deepseq filepath ghcPaths xhtml makeWrapper ];
   testDepends = [ Cabal deepseq filepath ];
   buildTools = [ alex happy ];
   doCheck = false;
+
+  postInstall = ''
+   wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")"
+  '';
+
   meta = {
     homepage = "http://www.haskell.org/haddock/";
     description = "A documentation-generation tool for Haskell libraries";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
     maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/documentation/haddock/2.14.2.nix b/pkgs/development/tools/documentation/haddock/2.14.2.nix
new file mode 100644
index 00000000000..c8ef4299f56
--- /dev/null
+++ b/pkgs/development/tools/documentation/haddock/2.14.2.nix
@@ -0,0 +1,27 @@
+{ cabal, Cabal, deepseq, filepath, ghcPaths, hspec, QuickCheck
+, xhtml, makeWrapper
+}:
+
+cabal.mkDerivation (self: {
+  pname = "haddock";
+  version = "2.14.2";
+  sha256 = "0h96jj6y093h4gcqpiq0nyv7h5wjg8ji7z1im9ydivmsv0627prk";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [ Cabal deepseq filepath ghcPaths xhtml makeWrapper ];
+  testDepends = [ Cabal deepseq filepath hspec QuickCheck ];
+  doCheck = false;
+
+  postInstall = ''
+   wrapProgram $out/bin/haddock --add-flags "\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \"\$(dirname \$0)\" \"--optghc=-package-conf --optghc=\")"
+  '';
+
+  meta = {
+    homepage = "http://www.haskell.org/haddock/";
+    description = "A documentation-generation tool for Haskell libraries";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
+    maintainers = [ self.stdenv.lib.maintainers.andres ];
+  };
+})
diff --git a/pkgs/development/tools/documentation/haddock/2.14.3.nix b/pkgs/development/tools/documentation/haddock/2.14.3.nix
new file mode 100644
index 00000000000..a16994b1f2e
--- /dev/null
+++ b/pkgs/development/tools/documentation/haddock/2.14.3.nix
@@ -0,0 +1,23 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, Cabal, deepseq, filepath, ghcPaths, hspec, QuickCheck
+, xhtml
+}:
+
+cabal.mkDerivation (self: {
+  pname = "haddock";
+  version = "2.14.3";
+  sha256 = "031ikrsbkpmmwgdkgdr8s19dfx5y6n39rmyljjdfqygas17gcm6l";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [ Cabal deepseq filepath ghcPaths xhtml ];
+  testDepends = [ Cabal deepseq filepath hspec QuickCheck ];
+  doCheck = false;
+  meta = {
+    homepage = "http://www.haskell.org/haddock/";
+    description = "A documentation-generation tool for Haskell libraries";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
+  };
+})
diff --git a/pkgs/development/tools/documentation/haddock/2.4.2.nix b/pkgs/development/tools/documentation/haddock/2.4.2.nix
index 811ffd2855d..6493302218f 100644
--- a/pkgs/development/tools/documentation/haddock/2.4.2.nix
+++ b/pkgs/development/tools/documentation/haddock/2.4.2.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, alex, Cabal, filepath, ghcPaths, happy }:
 
 cabal.mkDerivation (self: {
@@ -14,6 +16,6 @@ cabal.mkDerivation (self: {
     description = "A documentation-generation tool for Haskell libraries";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
+    hydraPlatforms = self.stdenv.lib.platforms.none;
   };
 })
diff --git a/pkgs/development/tools/documentation/haddock/2.7.2.nix b/pkgs/development/tools/documentation/haddock/2.7.2.nix
index fd31a96b291..53178aca0a1 100644
--- a/pkgs/development/tools/documentation/haddock/2.7.2.nix
+++ b/pkgs/development/tools/documentation/haddock/2.7.2.nix
@@ -5,7 +5,7 @@ cabal.mkDerivation (self : {
   version = "2.7.2"; # Haskell Platform 2010.1.0.0 and 2010.2.0.0
   name = self.fname;
   sha256 = "4eaaaf62785f0ba3d37ba356cfac4679faef91c0902d8cdbf42837cbe5daab82";
-  extraBuildInputs = [alex happy makeWrapper];
+  buildTools = [alex happy makeWrapper];
   propagatedBuildInputs = [ghcPaths];
   doCheck = false;
 
@@ -18,6 +18,7 @@ cabal.mkDerivation (self : {
     description = "A documentation-generation tool for Haskell libraries";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
     maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/documentation/haddock/2.9.2.nix b/pkgs/development/tools/documentation/haddock/2.9.2.nix
index fcae14d789e..2ed94ff072a 100644
--- a/pkgs/development/tools/documentation/haddock/2.9.2.nix
+++ b/pkgs/development/tools/documentation/haddock/2.9.2.nix
@@ -5,7 +5,7 @@ cabal.mkDerivation (self : {
   version = "2.9.2"; # Haskell Platform 2011.2.0.0
   name = self.fname;
   sha256 = "189vvp173pqc69zgzqqx6vyhvsc13p1s86ql60rs1j5qlhh8ajg8";
-  extraBuildInputs = [alex happy makeWrapper];
+  buildTools = [alex happy makeWrapper];
   propagatedBuildInputs = [ghcPaths xhtml];
   doCheck = false;
 
@@ -18,6 +18,7 @@ cabal.mkDerivation (self : {
     description = "A documentation-generation tool for Haskell libraries";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
     maintainers = [
       self.stdenv.lib.maintainers.andres
     ];
diff --git a/pkgs/development/tools/documentation/haddock/2.9.4.nix b/pkgs/development/tools/documentation/haddock/2.9.4.nix
index 8a57dd851c2..80d7c623c1e 100644
--- a/pkgs/development/tools/documentation/haddock/2.9.4.nix
+++ b/pkgs/development/tools/documentation/haddock/2.9.4.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, alex, Cabal, filepath, ghcPaths, happy, regexCompat, xhtml
 }:
 
@@ -16,6 +18,6 @@ cabal.mkDerivation (self: {
     description = "A documentation-generation tool for Haskell libraries";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
+    hydraPlatforms = self.stdenv.lib.platforms.none;
   };
 })
diff --git a/pkgs/development/tools/etcdctl/default.nix b/pkgs/development/tools/etcdctl/default.nix
new file mode 100644
index 00000000000..5e6438d0f5f
--- /dev/null
+++ b/pkgs/development/tools/etcdctl/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  version = "0.4.3";
+  name = "etcdctl-${version}";
+
+  src = import ./deps.nix {
+    inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
+  };
+
+  buildInputs = [ go ];
+
+  buildPhase = ''
+    export GOPATH=$src
+    go build -v -o etcdctl github.com/coreos/etcdctl
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv etcdctl $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A simple command line client for etcd";
+    homepage = http://coreos.com/using-coreos/etcd/;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ cstrahan ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/tools/etcdctl/deps.nix b/pkgs/development/tools/etcdctl/deps.nix
new file mode 100644
index 00000000000..98bdda95a43
--- /dev/null
+++ b/pkgs/development/tools/etcdctl/deps.nix
@@ -0,0 +1,27 @@
+{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
+
+let
+  goDeps = [
+    {
+      root = "github.com/coreos/etcdctl";
+      src = fetchFromGitHub {
+        owner = "coreos";
+        repo = "etcdctl";
+        rev = "061135b2a02797a6b3c2b6c01183517c1bc76a2c";
+        sha256 = "1hl9cz9ygr2k4d67qj9q1xj0n64b28qjy5sv7zylgg9h9ag2j2p4";
+      };
+    }
+  ];
+
+in
+
+stdenv.mkDerivation rec {
+  name = "go-deps";
+
+  buildCommand =
+    lib.concatStrings
+      (map (dep: ''
+              mkdir -p $out/src/`dirname ${dep.root}`
+              ln -s ${dep.src} $out/src/${dep.root}
+            '') goDeps);
+}
diff --git a/pkgs/development/tools/exercism/default.nix b/pkgs/development/tools/exercism/default.nix
new file mode 100644
index 00000000000..6c909382522
--- /dev/null
+++ b/pkgs/development/tools/exercism/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "exercism-${version}";
+
+  version = "1.6.2";
+
+  src =
+    if stdenv.system == "x86_64-darwin" then
+      fetchurl {
+        url = "https://github.com/exercism/cli/releases/download/v${version}/exercism-darwin-amd64.tgz";
+        sha256 = "1w9jw52nhb5mlcj6ampzwjscdr9rja5mdn5ga2r4z2qzsqzwkpm2";
+      }
+    else if stdenv.system == "i686-darwin" then
+      fetchurl {
+        url = "https://github.com/exercism/cli/releases/download/v${version}/exercism-darwin-386.tgz";
+        sha256 = "1g5cy53mrdzq047b8hlkjrkc4bp7yhipvhf4lnw0x2jr50z73bzd";
+      }
+    else if stdenv.system == "i686-linux" then
+      fetchurl {
+        url = "https://github.com/exercism/cli/releases/download/v1.6.2/exercism-linux-386.tgz";
+        sha256 = "1akdggla9kn7v4dwkyz63bp84dihcgyph546zskiyh9bz67l5liz";
+      }
+    else if stdenv.system == "x86_64-linux" then
+      fetchurl {
+        url = "https://github.com/exercism/cli/releases/download/v1.6.2/exercism-linux-amd64.tgz";
+        sha256 = "00kp0r9xy9bw9b2854csy35pk9sxvbivxmwiy97wl9gh0acva5ng";
+      }
+    else throw "Platform: ${stdenv.system} not supported!";
+
+  buildPhase = "";
+
+  setSourceRoot = "sourceRoot=./";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -a exercism $out/bin
+  '';
+
+  meta = {
+    description = "A Go based command line tool for exercism.io";
+    homepage    = http://exercism.io;
+    license     = stdenv.lib.licenses.mit;
+    platforms   = stdenv.lib.platforms.unix;
+    maintainers = [ stdenv.lib.maintainers.wjlroe ];
+  };
+}
diff --git a/pkgs/development/tools/gnulib/default.nix b/pkgs/development/tools/gnulib/default.nix
index 0d298558e5e..2e5701375a4 100644
--- a/pkgs/development/tools/gnulib/default.nix
+++ b/pkgs/development/tools/gnulib/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchgit }:
 
 stdenv.mkDerivation {
-  name = "gnulib-0.0-8015-gf0aab22";
+  name = "gnulib-0.1-83-g8008cac";
 
   src = fetchgit {
     url = "http://git.savannah.gnu.org/r/gnulib.git";
-    rev = "f0aab227265173908ecaa2353de6cf791cec3304";
-    sha256 = "162i39wvrmjhkg8w07i92vg9l0f0lk57zl1ynf0lvs70rkdd8a82";
+    rev = "8008cac0568ee76a4a9b7002f839e1abbad78af6";
+    sha256 = "1w8wh5ljh1qpssnj2lxizf45ggd7fgk5ggwhrnzjxxhn9m7rdvwm";
   };
 
   buildPhase = ":";
diff --git a/pkgs/development/tools/gocode/default.nix b/pkgs/development/tools/gocode/default.nix
new file mode 100644
index 00000000000..30e4b79ee38
--- /dev/null
+++ b/pkgs/development/tools/gocode/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "gocode";
+
+  src = import ./deps.nix {
+    inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
+  };
+
+  buildInputs = [ go ];
+
+  buildPhase = ''
+    export GOPATH=$src
+    go build -v -o gocode github.com/nsf/gocode
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv gocode $out/bin
+  '';
+
+  meta = with lib; {
+    description = "An autocompletion daemon for the Go programming language";
+    homepage = https://github.com/nsf/gocode;
+    license = licenses.mit;
+    maintainers = with maintainers; [ cstrahan ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/tools/gocode/deps.nix b/pkgs/development/tools/gocode/deps.nix
new file mode 100644
index 00000000000..4fd0578496d
--- /dev/null
+++ b/pkgs/development/tools/gocode/deps.nix
@@ -0,0 +1,27 @@
+{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
+
+let
+  goDeps = [
+    {
+      root = "github.com/nsf/gocode";
+      src = fetchFromGitHub {
+        owner = "nsf";
+        repo = "gocode";
+        rev = "9b760fdb16f18eafbe0cd274527efd2bd89dfa78";
+        sha256 = "0d1wl0x8jkaav6lcfzs70cr6gy0p88cbk5n3p19l6d0h9xz464ax";
+      };
+    }
+  ];
+
+in
+
+stdenv.mkDerivation rec {
+  name = "go-deps";
+
+  buildCommand =
+    lib.concatStrings
+      (map (dep: ''
+              mkdir -p $out/src/`dirname ${dep.root}`
+              ln -s ${dep.src} $out/src/${dep.root}
+            '') goDeps);
+}
diff --git a/pkgs/development/tools/guile/g-wrap/default.nix b/pkgs/development/tools/guile/g-wrap/default.nix
index 8698dc27b40..74e967686f3 100644
--- a/pkgs/development/tools/guile/g-wrap/default.nix
+++ b/pkgs/development/tools/guile/g-wrap/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
       generating Guile wrappers for C functions.
     '';
     homepage = http://www.nongnu.org/g-wrap/;
-    license = "LGPLv2+";
+    license = stdenv.lib.licenses.lgpl2Plus;
     maintainers = [ stdenv.lib.maintainers.ludo ];
   };
 }
diff --git a/pkgs/development/tools/haskell/BNFC-meta/default.nix b/pkgs/development/tools/haskell/BNFC-meta/default.nix
deleted file mode 100644
index d39544342b3..00000000000
--- a/pkgs/development/tools/haskell/BNFC-meta/default.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ cabal, alexMeta, happyMeta, haskellSrcMeta, syb }:
-
-cabal.mkDerivation (self: {
-  pname = "BNFC-meta";
-  version = "0.4.0.1";
-  sha256 = "0x31a25njbgd3r8shh7rrqa9qq66iqjhh82k538p9bd2hblg30ka";
-  buildDepends = [ alexMeta happyMeta haskellSrcMeta syb ];
-  meta = {
-    description = "Deriving Parsers and Quasi-Quoters from BNF Grammars";
-    license = self.stdenv.lib.licenses.gpl2;
-    platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
-  };
-})
diff --git a/pkgs/development/tools/haskell/BNFC/default.nix b/pkgs/development/tools/haskell/BNFC/default.nix
index 3cb85b86acb..f335aebc570 100644
--- a/pkgs/development/tools/haskell/BNFC/default.nix
+++ b/pkgs/development/tools/haskell/BNFC/default.nix
@@ -1,4 +1,4 @@
-{ cabal, mtl, fetchurl }:
+{ cabal, mtl, fetchpatch, alex, happy }:
 
 cabal.mkDerivation (self: {
   pname = "BNFC";
@@ -7,8 +7,10 @@ cabal.mkDerivation (self: {
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ mtl ];
-  patches = [ (fetchurl { url = "https://github.com/BNFC/bnfc/pull/3.patch"; sha256 = "103l04ylzswgxrmpv5zy6dd0jyr96z21mdkpgk1z4prvn8wjl624"; }) ];
+  buildTools = [ alex happy ];
+  patches = [ (fetchpatch { url = "https://github.com/BNFC/bnfc/pull/3.patch"; sha256 = "1i87crwva5m3v095lv3zxs38pr6nmly58krlr6sxpwnakpr0pxsp"; }) ];
   patchFlags = "-p2";
+  preConfigure = "runhaskell Setup.lhs clean";
   meta = {
     homepage = "http://bnfc.digitalgrammars.com/";
     description = "A compiler front-end generator";
diff --git a/pkgs/development/tools/haskell/DrIFT/default.nix b/pkgs/development/tools/haskell/DrIFT/default.nix
new file mode 100644
index 00000000000..6f0f8fb0c60
--- /dev/null
+++ b/pkgs/development/tools/haskell/DrIFT/default.nix
@@ -0,0 +1,18 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, filepath, random }:
+
+cabal.mkDerivation (self: {
+  pname = "DrIFT";
+  version = "2.4.2";
+  sha256 = "1w0wfmrjifidl2qz998ig07afd4p6yp890lwl8as57bay490nakl";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [ filepath random ];
+  meta = {
+    homepage = "http://repetae.net/computer/haskell/DrIFT/";
+    description = "Program to derive type class instances";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/HaRe/default.nix b/pkgs/development/tools/haskell/HaRe/default.nix
deleted file mode 100644
index f7d67f4be66..00000000000
--- a/pkgs/development/tools/haskell/HaRe/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ cabal, cmdtheline, deepseq, Diff, filepath, ghcMod, ghcPaths
-, ghcSybUtils, hslogger, hspec, HUnit, mtl, parsec, QuickCheck
-, rosezipper, silently, StrafunskiStrategyLib, stringbuilder, syb
-, syz, time, transformers
-}:
-
-cabal.mkDerivation (self: {
-  pname = "HaRe";
-  version = "0.7.0.7";
-  sha256 = "0pgl5mav4sqc453by7nddf5fz7nj231072bklzj6crcph7qw4zy4";
-  isLibrary = true;
-  isExecutable = true;
-  buildDepends = [
-    cmdtheline filepath ghcMod ghcPaths ghcSybUtils hslogger mtl parsec
-    rosezipper StrafunskiStrategyLib syb syz time transformers
-  ];
-  testDepends = [
-    deepseq Diff filepath ghcMod ghcPaths ghcSybUtils hslogger hspec
-    HUnit mtl QuickCheck rosezipper silently StrafunskiStrategyLib
-    stringbuilder syb syz time transformers
-  ];
-  jailbreak = true;
-  meta = {
-    homepage = "http://www.cs.kent.ac.uk/projects/refactor-fp";
-    description = "the Haskell Refactorer";
-    license = self.stdenv.lib.licenses.bsd3;
-    platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
-  };
-})
diff --git a/pkgs/development/tools/haskell/PastePipe/default.nix b/pkgs/development/tools/haskell/PastePipe/default.nix
new file mode 100644
index 00000000000..ce1c8a27c54
--- /dev/null
+++ b/pkgs/development/tools/haskell/PastePipe/default.nix
@@ -0,0 +1,19 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, cmdargs, HTTP, network }:
+
+cabal.mkDerivation (self: {
+  pname = "PastePipe";
+  version = "1.5";
+  sha256 = "1jqfk6d22vi0vrwx0whjkh4pxwagr4hmi79bid6bffn72c7ygm8f";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [ cmdargs HTTP network ];
+  meta = {
+    homepage = "http://github.com/creswick/pastepipe";
+    description = "CLI for pasting to lpaste.net";
+    license = "GPL";
+    platforms = self.ghc.meta.platforms;
+    maintainers = with self.stdenv.lib.maintainers; [ fuuzetsu ];
+  };
+})
diff --git a/pkgs/development/tools/haskell/SourceGraph/default.nix b/pkgs/development/tools/haskell/SourceGraph/default.nix
new file mode 100644
index 00000000000..abfd386c82a
--- /dev/null
+++ b/pkgs/development/tools/haskell/SourceGraph/default.nix
@@ -0,0 +1,22 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, Cabal, fgl, filepath, Graphalyze, graphviz, haskellSrcExts
+, mtl, multiset, random
+}:
+
+cabal.mkDerivation (self: {
+  pname = "SourceGraph";
+  version = "0.7.0.6";
+  sha256 = "03psglm6xyqvcgnbimidafy51kwpipk5q6s8ip5vhjm2d5makkhm";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [
+    Cabal fgl filepath Graphalyze graphviz haskellSrcExts mtl multiset
+    random
+  ];
+  meta = {
+    description = "Static code analysis using graph-theoretic techniques";
+    license = "GPL";
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/alex-meta/default.nix b/pkgs/development/tools/haskell/alex-meta/default.nix
deleted file mode 100644
index 5bb298e739a..00000000000
--- a/pkgs/development/tools/haskell/alex-meta/default.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ cabal, haskellSrcMeta, QuickCheck }:
-
-cabal.mkDerivation (self: {
-  pname = "alex-meta";
-  version = "0.3.0.5";
-  sha256 = "0f41q5l6z1dcpfx8rxacv4f544zcw7pgvq935mnzzha9fvsxqzk4";
-  buildDepends = [ haskellSrcMeta QuickCheck ];
-  meta = {
-    description = "Quasi-quoter for Alex lexers";
-    license = self.stdenv.lib.licenses.bsd3;
-    platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
-  };
-})
diff --git a/pkgs/development/tools/haskell/cabal-bounds/default.nix b/pkgs/development/tools/haskell/cabal-bounds/default.nix
new file mode 100644
index 00000000000..213ba6f9d13
--- /dev/null
+++ b/pkgs/development/tools/haskell/cabal-bounds/default.nix
@@ -0,0 +1,27 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, Cabal, cabalInstall, cabalLenses, cmdargs, either
+, filepath, Glob, lens, strict, tasty, tastyGolden, transformers
+, unorderedContainers
+}:
+
+cabal.mkDerivation (self: {
+  pname = "cabal-bounds";
+  version = "0.8.4";
+  sha256 = "00vj6ca9liqlqg69d4ziacsxz6x9365sbyc1ag6g18bhibyinsh2";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [
+    Cabal cabalLenses cmdargs either lens strict transformers
+    unorderedContainers
+  ];
+  testDepends = [ filepath Glob tasty tastyGolden ];
+  buildTools = [ cabalInstall ];
+  jailbreak = true;
+  doCheck = false;
+  meta = {
+    description = "A command line program for managing the bounds/versions of the dependencies in a cabal file";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/cabal-db/default.nix b/pkgs/development/tools/haskell/cabal-db/default.nix
new file mode 100644
index 00000000000..234c158cf90
--- /dev/null
+++ b/pkgs/development/tools/haskell/cabal-db/default.nix
@@ -0,0 +1,22 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, ansiWlPprint, Cabal, filepath, mtl, optparseApplicative
+, tar, utf8String
+}:
+
+cabal.mkDerivation (self: {
+  pname = "cabal-db";
+  version = "0.1.9";
+  sha256 = "19mw5ycc2y5wkn1h7wkdm2gb29pq2sh0n8z52dbxlkf0rwcgjbfq";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [
+    ansiWlPprint Cabal filepath mtl optparseApplicative tar utf8String
+  ];
+  meta = {
+    homepage = "http://github.com/vincenthz/cabal-db";
+    description = "query tools for the local cabal database (revdeps, graph, info, search-by, license, bounds)";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/cabal-delete/default.nix b/pkgs/development/tools/haskell/cabal-delete/default.nix
new file mode 100644
index 00000000000..7de6c0e6f1c
--- /dev/null
+++ b/pkgs/development/tools/haskell/cabal-delete/default.nix
@@ -0,0 +1,36 @@
+{ cabal, fetchgit, bytestring ? null, containers ? null, directory ? null,
+  filepath, process ? null, attoparsec, ghcPaths, transformers }:
+
+let
+  tag = "0.5.2.0";
+in
+
+cabal.mkDerivation (self: {
+  pname = "cabal-delete";
+  version = "${tag}";
+  src = fetchgit {
+    url = git://github.com/iquiw/cabal-delete.git;
+    rev = "refs/tags/v${tag}";
+    sha256 = "1ap319isjg8bafm4jz2krfwvvg11hj5yk0g99a3l1a3a36hpdgzw";
+  };
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [
+      bytestring
+      containers
+      directory
+      filepath
+      process
+      attoparsec
+      ghcPaths
+      transformers
+  ];
+  meta = {
+    homepage = "https://github.com/iquiw/cabal-delete";
+    description = "Uninstall packages installed by cabal";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
+    broken = true;
+  };
+})
diff --git a/pkgs/development/tools/haskell/cabal-dev/default.nix b/pkgs/development/tools/haskell/cabal-dev/default.nix
deleted file mode 100644
index fef9892bce8..00000000000
--- a/pkgs/development/tools/haskell/cabal-dev/default.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ cabal, Cabal, cabalInstall, filepath, HTTP, mtl, network, setenv
-, tar, transformers, zlib
-}:
-
-cabal.mkDerivation (self: {
-  pname = "cabal-dev";
-  version = "0.9.2";
-  sha256 = "1372bpn8s7d7nm01ggp3m98ldrynidbchk3p14yrjysvxwr3l6q8";
-  isLibrary = false;
-  isExecutable = true;
-  buildDepends = [
-    Cabal filepath HTTP mtl network setenv tar transformers zlib
-  ];
-  buildTools = [ cabalInstall ];
-  meta = {
-    homepage = "http://github.com/creswick/cabal-dev";
-    description = "Manage sandboxed Haskell build environments";
-    license = self.stdenv.lib.licenses.bsd3;
-    platforms = self.ghc.meta.platforms;
-  };
-})
diff --git a/pkgs/development/tools/haskell/cabal-ghci/default.nix b/pkgs/development/tools/haskell/cabal-ghci/default.nix
index dee25727384..389318978da 100644
--- a/pkgs/development/tools/haskell/cabal-ghci/default.nix
+++ b/pkgs/development/tools/haskell/cabal-ghci/default.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, Cabal, filepath }:
 
 cabal.mkDerivation (self: {
@@ -12,6 +14,5 @@ cabal.mkDerivation (self: {
     description = "Set up ghci with options taken from a .cabal file";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/haskell/cabal-meta/default.nix b/pkgs/development/tools/haskell/cabal-meta/default.nix
new file mode 100644
index 00000000000..9dc0a4fb9af
--- /dev/null
+++ b/pkgs/development/tools/haskell/cabal-meta/default.nix
@@ -0,0 +1,20 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, hspec, shelly, systemFileio, systemFilepath, text }:
+
+cabal.mkDerivation (self: {
+  pname = "cabal-meta";
+  version = "0.4.1.2";
+  sha256 = "17ln9j0n9rb0kbnp37fi9yaf932dacrdmf3jrp301r886kh2a7kk";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [ shelly systemFileio systemFilepath text ];
+  testDepends = [ hspec shelly systemFilepath text ];
+  doCheck = false;
+  meta = {
+    homepage = "http://www.yesodweb.com/";
+    description = "build multiple packages at once";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/cabal2ghci/default.nix b/pkgs/development/tools/haskell/cabal2ghci/default.nix
index f8adaee4671..deb9e8d18d9 100644
--- a/pkgs/development/tools/haskell/cabal2ghci/default.nix
+++ b/pkgs/development/tools/haskell/cabal2ghci/default.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, Cabal, cmdargs, stylishHaskell, systemFileio
 , systemFilepath, text, unorderedContainers, yaml
 }:
diff --git a/pkgs/development/tools/haskell/cabal2nix/default.nix b/pkgs/development/tools/haskell/cabal2nix/default.nix
index cc44268f3a3..978ebde7e29 100644
--- a/pkgs/development/tools/haskell/cabal2nix/default.nix
+++ b/pkgs/development/tools/haskell/cabal2nix/default.nix
@@ -1,22 +1,22 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, Cabal, doctest, filepath, hackageDb, HTTP, mtl, regexPosix
 }:
 
 cabal.mkDerivation (self: {
   pname = "cabal2nix";
-  version = "1.55";
-  sha256 = "0rda8g595pr7vlhzyflw9kz6fw1iz76yimbl1zizgrnpnq3h11w3";
+  version = "1.68";
+  sha256 = "0w9ayvr3ljfxgi17yaayqvyxflbgf7b5245pc3m011lp3cfnj849";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [ Cabal filepath hackageDb HTTP mtl regexPosix ];
   testDepends = [ doctest ];
+  doCheck = self.stdenv.lib.versionOlder "7.6" self.ghc.version;
   meta = {
     homepage = "http://github.com/NixOS/cabal2nix";
     description = "Convert Cabal files into Nix build instructions";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [
-      self.stdenv.lib.maintainers.andres
-      self.stdenv.lib.maintainers.simons
-    ];
+    maintainers = with self.stdenv.lib.maintainers; [ simons ];
   };
 })
diff --git a/pkgs/development/tools/haskell/cake3/default.nix b/pkgs/development/tools/haskell/cake3/default.nix
new file mode 100644
index 00000000000..5b948f510bf
--- /dev/null
+++ b/pkgs/development/tools/haskell/cake3/default.nix
@@ -0,0 +1,25 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, attoparsec, deepseq, filepath, haskellSrcMeta
+, languageJavascript, mimeTypes, monadloc, mtl, optparseApplicative
+, parsec, syb, systemFilepath, text, textFormat
+}:
+
+cabal.mkDerivation (self: {
+  pname = "cake3";
+  version = "0.5.1.0";
+  sha256 = "0kqx8xr0ynbn7fhfz11is7lbi32dfladsx32bcpspykqj1bjv954";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [
+    attoparsec deepseq filepath haskellSrcMeta languageJavascript
+    mimeTypes monadloc mtl optparseApplicative parsec syb
+    systemFilepath text textFormat
+  ];
+  meta = {
+    homepage = "https://github.com/grwlf/cake3";
+    description = "Third cake the Makefile EDSL";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/codex/default.nix b/pkgs/development/tools/haskell/codex/default.nix
new file mode 100644
index 00000000000..fac145b14c2
--- /dev/null
+++ b/pkgs/development/tools/haskell/codex/default.nix
@@ -0,0 +1,24 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, Cabal, downloadCurl, either, filepath, hackageDb, MissingH
+, monadLoops, tar, text, transformers, yaml, zlib
+}:
+
+cabal.mkDerivation (self: {
+  pname = "codex";
+  version = "0.1.0.3";
+  sha256 = "0sbkri6y9f4wws120kbb93sv1z0z75hjw9pw5r3wadmmd0lygsn9";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [
+    Cabal downloadCurl either filepath hackageDb MissingH monadLoops
+    tar text transformers yaml zlib
+  ];
+  jailbreak = true;
+  meta = {
+    homepage = "http://github.com/aloiscochard/codex";
+    description = "A ctags file generator for cabal project dependencies";
+    license = self.stdenv.lib.licenses.asl20;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/ghc-events-analyze/default.nix b/pkgs/development/tools/haskell/ghc-events-analyze/default.nix
new file mode 100644
index 00000000000..b58d8d1429b
--- /dev/null
+++ b/pkgs/development/tools/haskell/ghc-events-analyze/default.nix
@@ -0,0 +1,24 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, diagramsLib, diagramsSvg, filepath, ghcEvents, lens, mtl
+, optparseApplicative, parsec, SVGFonts, thLift, transformers
+}:
+
+cabal.mkDerivation (self: {
+  pname = "ghc-events-analyze";
+  version = "0.2.0";
+  sha256 = "04px1p0pnx54414m7sdpmdhj2dpsi1z8bjm8jq2yzh66854xiyh4";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [
+    diagramsLib diagramsSvg filepath ghcEvents lens mtl
+    optparseApplicative parsec SVGFonts thLift transformers
+  ];
+  meta = {
+    description = "Analyze and visualize event logs";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
+    broken = true;
+  };
+})
diff --git a/pkgs/development/tools/haskell/ghc-gc-tune/default.nix b/pkgs/development/tools/haskell/ghc-gc-tune/default.nix
new file mode 100644
index 00000000000..e5517854c34
--- /dev/null
+++ b/pkgs/development/tools/haskell/ghc-gc-tune/default.nix
@@ -0,0 +1,18 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, filepath }:
+
+cabal.mkDerivation (self: {
+  pname = "ghc-gc-tune";
+  version = "0.3";
+  sha256 = "0ghp3f86m91zi6kl8zq157717s2p73nwdgln4aiclq830m72ys9w";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [ filepath ];
+  meta = {
+    homepage = "http://code.haskell.org/~dons/code/ghc-gc-tune";
+    description = "Graph performance of Haskell programs with different GC flags";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/happy-meta/default.nix b/pkgs/development/tools/haskell/happy-meta/default.nix
index a3d885c6008..8241bf12103 100644
--- a/pkgs/development/tools/haskell/happy-meta/default.nix
+++ b/pkgs/development/tools/haskell/happy-meta/default.nix
@@ -1,14 +1,16 @@
-{ cabal, haskellSrcMeta, mtl }:
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, happy, haskellSrcMeta, mtl }:
 
 cabal.mkDerivation (self: {
   pname = "happy-meta";
-  version = "0.2.0.5";
-  sha256 = "103hi87azqv11l8lq1rv0v9v88sl227g31snvkn8db6b4cfrwrxk";
+  version = "0.2.0.7";
+  sha256 = "12599233lh0ffmvlim0gs5jzg8lly1g11i1cg44lb37bz3l7psh9";
   buildDepends = [ haskellSrcMeta mtl ];
+  buildTools = [ happy ];
   meta = {
     description = "Quasi-quoter for Happy parsers";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/haskell/haskdogs/default.nix b/pkgs/development/tools/haskell/haskdogs/default.nix
index c05368c3980..27e4876ea09 100644
--- a/pkgs/development/tools/haskell/haskdogs/default.nix
+++ b/pkgs/development/tools/haskell/haskdogs/default.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, Cabal, filepath, HSH }:
 
 cabal.mkDerivation (self: {
@@ -12,6 +14,5 @@ cabal.mkDerivation (self: {
     description = "Generate ctags file for haskell project directory and it's deps";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/haskell/haskell-docs/default.nix b/pkgs/development/tools/haskell/haskell-docs/default.nix
new file mode 100644
index 00000000000..b9cd34c716e
--- /dev/null
+++ b/pkgs/development/tools/haskell/haskell-docs/default.nix
@@ -0,0 +1,24 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, aeson, Cabal, filepath, ghcPaths, haddock, monadLoops
+, text, unorderedContainers
+}:
+
+cabal.mkDerivation (self: {
+  pname = "haskell-docs";
+  version = "4.2.2";
+  sha256 = "0w52kzwjzd5jl8v55rjy5550cy2fcyj9j5b7b33vbwjyh06gfrk1";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [
+    aeson Cabal filepath ghcPaths haddock monadLoops text
+    unorderedContainers
+  ];
+  doCheck = false;
+  meta = {
+    homepage = "http://github.com/chrisdone/haskell-docs";
+    description = "A program to find and display the docs and type of a name";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/hasktags/default.nix b/pkgs/development/tools/haskell/hasktags/default.nix
index f1e1f639e80..36b3739a140 100644
--- a/pkgs/development/tools/haskell/hasktags/default.nix
+++ b/pkgs/development/tools/haskell/hasktags/default.nix
@@ -1,16 +1,18 @@
-{ cabal, filepath }:
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, filepath, json, utf8String }:
 
 cabal.mkDerivation (self: {
   pname = "hasktags";
-  version = "0.68.2";
-  sha256 = "0lb28vj8mhaskw3n7wpjgbj0311ywh76yc0ajczzsiqa3p6mypss";
-  isLibrary = false;
+  version = "0.69.0";
+  sha256 = "1bba6w5h5a5frc899cdlxcyshiqdni6lcqby618akr1917ih1qh8";
+  isLibrary = true;
   isExecutable = true;
-  buildDepends = [ filepath ];
+  buildDepends = [ filepath json utf8String ];
   meta = {
+    homepage = "http://github.com/MarcWeber/hasktags";
     description = "Produces ctags \"tags\" and etags \"TAGS\" files for Haskell programs";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/haskell/hdevtools/default.nix b/pkgs/development/tools/haskell/hdevtools/default.nix
new file mode 100644
index 00000000000..350ad216bca
--- /dev/null
+++ b/pkgs/development/tools/haskell/hdevtools/default.nix
@@ -0,0 +1,17 @@
+{ cabal, cmdargs, ghcPaths, network, syb, time, fetchurl }:
+
+cabal.mkDerivation (self: {
+  pname = "hdevtools";
+  version = "0.1.0.6-pre-github-schell-9e34f7dd";
+  sha256 = "1a218m817q35f52fv6mn28sfv136i6fm2mzgdidpm24pc0585gl7";
+  isLibrary = false;
+  isExecutable = true;
+  patches = [ (fetchurl { url = "https://github.com/ts468/hdevtools/pull/2.patch"; md5 = "256609d2d3f5b719caa0002ee579d169"; }) ];
+  buildDepends = [ cmdargs ghcPaths network syb time ];
+  meta = {
+    homepage = "https://github.com/bitc/hdevtools/";
+    description = "Persistent GHC powered background server for FAST haskell development tools";
+    license = self.stdenv.lib.licenses.mit;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/hlint/default.nix b/pkgs/development/tools/haskell/hlint/default.nix
index 73ab425ea8d..4fe5f01c3d1 100644
--- a/pkgs/development/tools/haskell/hlint/default.nix
+++ b/pkgs/development/tools/haskell/hlint/default.nix
@@ -1,22 +1,23 @@
-{ cabal, cpphs, filepath, haskellSrcExts, hscolour, transformers
-, uniplate
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, cmdargs, cpphs, filepath, haskellSrcExts, hscolour
+, transformers, uniplate
 }:
 
 cabal.mkDerivation (self: {
   pname = "hlint";
-  version = "1.8.53";
-  sha256 = "1gnv9h909qgf80bpb769mr1paf8lzp3xlwmyw4nxdj84fn0y57q0";
+  version = "1.9.3";
+  sha256 = "1sdz981yq0amsw9q6hx0aqkd0ayrax5p77s3n3gz4bphpk37n09b";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
-    cpphs filepath haskellSrcExts hscolour transformers uniplate
+    cmdargs cpphs filepath haskellSrcExts hscolour transformers
+    uniplate
   ];
-  jailbreak = true;
   meta = {
     homepage = "http://community.haskell.org/~ndm/hlint/";
     description = "Source code suggestions";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/haskell/hobbes/default.nix b/pkgs/development/tools/haskell/hobbes/default.nix
new file mode 100644
index 00000000000..a9b48f922c8
--- /dev/null
+++ b/pkgs/development/tools/haskell/hobbes/default.nix
@@ -0,0 +1,18 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, filemanip, filepath, fsnotify, systemFilepath, text }:
+
+cabal.mkDerivation (self: {
+  pname = "hobbes";
+  version = "0.2.2";
+  sha256 = "1pri63d59q918jv1hdp2ib06m6lzw9a2b6bjyn86b2qrrx2512xd";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [ filemanip filepath fsnotify systemFilepath text ];
+  meta = {
+    homepage = "http://github.com/jhickner/hobbes";
+    description = "A small file watcher for OSX";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/hp2any-manager/default.nix b/pkgs/development/tools/haskell/hp2any-manager/default.nix
new file mode 100644
index 00000000000..537550e989f
--- /dev/null
+++ b/pkgs/development/tools/haskell/hp2any-manager/default.nix
@@ -0,0 +1,24 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, cairo, filepath, glade, glib, gtk, gtkglext, hp2anyCore
+, hp2anyGraph, OpenGL, time
+}:
+
+cabal.mkDerivation (self: {
+  pname = "hp2any-manager";
+  version = "0.4.6";
+  sha256 = "143j3ylvzyq1s2l357vzqrwdcgg6rqhnmv0awb3nvm66c9smaarv";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [
+    cairo filepath glade glib gtk gtkglext hp2anyCore hp2anyGraph
+    OpenGL time
+  ];
+  meta = {
+    homepage = "http://www.haskell.org/haskellwiki/Hp2any";
+    description = "A utility to visualise and compare heap profiles";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
+  };
+})
diff --git a/pkgs/development/tools/haskell/hscolour/default.nix b/pkgs/development/tools/haskell/hscolour/default.nix
new file mode 100644
index 00000000000..bb00ade3d4c
--- /dev/null
+++ b/pkgs/development/tools/haskell/hscolour/default.nix
@@ -0,0 +1,17 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal }:
+
+cabal.mkDerivation (self: {
+  pname = "hscolour";
+  version = "1.20.3";
+  sha256 = "15ix93sw4p7g5ln2halcgqppdc0i0vmkzcjzxvqzkk9yp9pq3nrs";
+  isLibrary = true;
+  isExecutable = true;
+  meta = {
+    homepage = "http://code.haskell.org/~malcolm/hscolour/";
+    description = "Colourise Haskell code";
+    license = "GPL";
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/hscope/default.nix b/pkgs/development/tools/haskell/hscope/default.nix
new file mode 100644
index 00000000000..981e6120444
--- /dev/null
+++ b/pkgs/development/tools/haskell/hscope/default.nix
@@ -0,0 +1,24 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, cereal, cpphs, deepseq, haskellSrcExts, mtl, pureCdb
+, testSimple, uniplate, Unixutils, vector
+}:
+
+cabal.mkDerivation (self: {
+  pname = "hscope";
+  version = "0.4";
+  sha256 = "1jb2d61c1as6li54zw33jsyvfap214pqxpkr2m6lkzaizh8396hg";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [
+    cereal cpphs deepseq haskellSrcExts mtl pureCdb uniplate vector
+  ];
+  testDepends = [ mtl testSimple Unixutils ];
+  doCheck = false;
+  meta = {
+    homepage = "https://github.com/bosu/hscope";
+    description = "cscope like browser for Haskell code";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/hslogger/default.nix b/pkgs/development/tools/haskell/hslogger/default.nix
index a851b8912c7..43da5b21ca4 100644
--- a/pkgs/development/tools/haskell/hslogger/default.nix
+++ b/pkgs/development/tools/haskell/hslogger/default.nix
@@ -1,9 +1,11 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, mtl, network, time }:
 
 cabal.mkDerivation (self: {
   pname = "hslogger";
-  version = "1.2.3";
-  sha256 = "0rmijkrf24srcg8zgizf5vidpsgr4171wbzbwgrg66l704mkkb7m";
+  version = "1.2.4";
+  sha256 = "0r0c7wqz49lzxg7sakkw6nwmxnyzhqscxvnxiqwkwsgv3q2sh3wc";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ mtl network time ];
@@ -12,6 +14,5 @@ cabal.mkDerivation (self: {
     description = "Versatile logging framework";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/haskell/jailbreak-cabal/default.nix b/pkgs/development/tools/haskell/jailbreak-cabal/default.nix
index ea61fd9b6ed..a6986c1cdc5 100644
--- a/pkgs/development/tools/haskell/jailbreak-cabal/default.nix
+++ b/pkgs/development/tools/haskell/jailbreak-cabal/default.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, Cabal }:
 
 cabal.mkDerivation (self: {
diff --git a/pkgs/development/tools/haskell/keter/default.nix b/pkgs/development/tools/haskell/keter/default.nix
index e6377a201fe..34bc45e7471 100644
--- a/pkgs/development/tools/haskell/keter/default.nix
+++ b/pkgs/development/tools/haskell/keter/default.nix
@@ -1,26 +1,29 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, aeson, async, attoparsec, blazeBuilder, caseInsensitive
-, conduit, dataDefault, filepath, fsnotify, httpConduit
-, httpReverseProxy, httpTypes, mtl, network, networkConduit
-, networkConduitTls, random, regexTdfa, stm, systemFileio
-, systemFilepath, tar, text, time, transformers, unixCompat
-, unixProcessConduit, unorderedContainers, vector, wai
-, waiAppStatic, waiExtra, warp, warpTls, yaml, zlib
+, conduit, conduitExtra, dataDefault, filepath, fsnotify, hspec
+, httpClient, httpConduit, httpReverseProxy, httpTypes, liftedBase
+, mtl, network, networkConduitTls, random, regexTdfa, stm
+, systemFileio, systemFilepath, tar, text, time, transformers
+, unixCompat, unorderedContainers, vector, wai, waiAppStatic
+, waiExtra, warp, warpTls, yaml, zlib
 }:
 
 cabal.mkDerivation (self: {
   pname = "keter";
-  version = "1.0.1.1";
-  sha256 = "1bcp9yxmh5z7cvap4nrj8gxnndwws21w6y352yasf35bf432nxa9";
+  version = "1.3.3";
+  sha256 = "1i4yjzqp8if0h88k8ga0dvqbrh57nvcr9dbfbj1sdw40pd74yb3i";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
     aeson async attoparsec blazeBuilder caseInsensitive conduit
-    dataDefault filepath fsnotify httpConduit httpReverseProxy
-    httpTypes mtl network networkConduit networkConduitTls random
-    regexTdfa stm systemFileio systemFilepath tar text time
-    transformers unixCompat unixProcessConduit unorderedContainers
-    vector wai waiAppStatic waiExtra warp warpTls yaml zlib
+    conduitExtra dataDefault filepath fsnotify httpClient httpConduit
+    httpReverseProxy httpTypes liftedBase mtl network networkConduitTls
+    random regexTdfa stm systemFileio systemFilepath tar text time
+    transformers unixCompat unorderedContainers vector wai waiAppStatic
+    waiExtra warp warpTls yaml zlib
   ];
+  testDepends = [ conduit hspec transformers ];
   meta = {
     homepage = "http://www.yesodweb.com/";
     description = "Web application deployment manager, focusing on Haskell web frameworks";
diff --git a/pkgs/development/tools/haskell/packunused/default.nix b/pkgs/development/tools/haskell/packunused/default.nix
index 35d318d36ba..c68d5dec8b3 100644
--- a/pkgs/development/tools/haskell/packunused/default.nix
+++ b/pkgs/development/tools/haskell/packunused/default.nix
@@ -1,12 +1,18 @@
-{ cabal, Cabal, cmdargs, filepath, haskellSrcExts }:
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, Cabal, filepath, haskellSrcExts, optparseApplicative
+, split
+}:
 
 cabal.mkDerivation (self: {
   pname = "packunused";
-  version = "0.1.0.1";
-  sha256 = "130717k4rknj5jl904cmb4h09msp4xjj84w6iwzc10lz736dk3jd";
+  version = "0.1.1.2";
+  sha256 = "1kp004lh6sa4gjqm37ldgk70jbncrnr76rk9c77464cnj6ajxmlm";
   isLibrary = false;
   isExecutable = true;
-  buildDepends = [ Cabal cmdargs filepath haskellSrcExts ];
+  buildDepends = [
+    Cabal filepath haskellSrcExts optparseApplicative split
+  ];
   jailbreak = true;
   meta = {
     homepage = "https://github.com/hvr/packunused";
diff --git a/pkgs/development/tools/haskell/pointfree/default.nix b/pkgs/development/tools/haskell/pointfree/default.nix
new file mode 100644
index 00000000000..166105f22b6
--- /dev/null
+++ b/pkgs/development/tools/haskell/pointfree/default.nix
@@ -0,0 +1,19 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, haskellSrcExts, HUnit, QuickCheck, transformers }:
+
+cabal.mkDerivation (self: {
+  pname = "pointfree";
+  version = "1.0.4.7";
+  sha256 = "0jwql0ka01cr53ayjc4dpaci11i7r1y3b9gcbh3rlamb1mnfcqvl";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [ haskellSrcExts transformers ];
+  testDepends = [ haskellSrcExts HUnit QuickCheck transformers ];
+  jailbreak = true;
+  meta = {
+    description = "Tool for refactoring expressions into pointfree form";
+    license = "unknown";
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/pointful/default.nix b/pkgs/development/tools/haskell/pointful/default.nix
new file mode 100644
index 00000000000..7f077d160a3
--- /dev/null
+++ b/pkgs/development/tools/haskell/pointful/default.nix
@@ -0,0 +1,18 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, haskellSrc, mtl, syb }:
+
+cabal.mkDerivation (self: {
+  pname = "pointful";
+  version = "1.0.2";
+  sha256 = "00xlxgdajkbi5d6gv88wdpwm16xdryshszz5qklryi0p65mmp99p";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [ haskellSrc mtl syb ];
+  meta = {
+    homepage = "http://github.com/23Skidoo/pointful";
+    description = "Pointful refactoring tool";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/profiteur/default.nix b/pkgs/development/tools/haskell/profiteur/default.nix
new file mode 100644
index 00000000000..b637e563ffb
--- /dev/null
+++ b/pkgs/development/tools/haskell/profiteur/default.nix
@@ -0,0 +1,24 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, aeson, attoparsec, filepath, text, unorderedContainers
+, vector
+}:
+
+cabal.mkDerivation (self: {
+  pname = "profiteur";
+  version = "0.1.2.1";
+  sha256 = "1108hhh2ivhs85jkga4wps2yscgjnp211sw5w45j4wp9dgpz2hak";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [
+    aeson attoparsec filepath text unorderedContainers vector
+  ];
+  meta = {
+    homepage = "http://github.com/jaspervdj/profiteur";
+    description = "Treemap visualiser for GHC prof files";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
+    broken = true;
+  };
+})
diff --git a/pkgs/development/tools/haskell/rehoo/default.nix b/pkgs/development/tools/haskell/rehoo/default.nix
new file mode 100644
index 00000000000..f7993feddf8
--- /dev/null
+++ b/pkgs/development/tools/haskell/rehoo/default.nix
@@ -0,0 +1,21 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, cmdargs, parallelIo, shelly, split, systemFilepath, text
+}:
+
+cabal.mkDerivation (self: {
+  pname = "rehoo";
+  version = "0.3.1";
+  sha256 = "0pwmz1q2866yj8hxbvha4v1smhppkd3jsrrhbhmbxw137l54ijgf";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [
+    cmdargs parallelIo shelly split systemFilepath text
+  ];
+  meta = {
+    homepage = "https://github.com/jwiegley/rehoo";
+    description = "Rebuild default.hoo from many .hoo files in the current directory";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/splot/default.nix b/pkgs/development/tools/haskell/splot/default.nix
index 4e99a1e68cd..0e984778579 100644
--- a/pkgs/development/tools/haskell/splot/default.nix
+++ b/pkgs/development/tools/haskell/splot/default.nix
@@ -1,11 +1,13 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, bytestringLexing, cairo, colour, HUnit, mtl, strptime
 , time, vcsRevision
 }:
 
 cabal.mkDerivation (self: {
   pname = "splot";
-  version = "0.3.11";
-  sha256 = "0mpyfmafjjcf85v740h69p5mggyqsq3li8m1fa5c0z4rdd0395an";
+  version = "0.3.12";
+  sha256 = "0xk5p2ikrzrmhvl69cl36sskcqgfnhxbbdlyp7bzl5pny0l0h9in";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/tools/haskell/threadscope/default.nix b/pkgs/development/tools/haskell/threadscope/default.nix
index 4928c40e129..892faca8e8c 100644
--- a/pkgs/development/tools/haskell/threadscope/default.nix
+++ b/pkgs/development/tools/haskell/threadscope/default.nix
@@ -1,11 +1,13 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, binary, cairo, deepseq, filepath, ghcEvents, glib, gtk
 , mtl, pango, time
 }:
 
 cabal.mkDerivation (self: {
   pname = "threadscope";
-  version = "0.2.2";
-  sha256 = "07cmza391hjq77lx8m9g2287bzsh5ffka3s07fr49v6x6hivsic3";
+  version = "0.2.4";
+  sha256 = "1208gp80vj3dngc4nrj1jk5y4h1181bgwq2qj764kcjvkaxch599";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
@@ -17,6 +19,7 @@ cabal.mkDerivation (self: {
     description = "A graphical tool for profiling parallel Haskell programs";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
+    hydraPlatforms = self.stdenv.lib.platforms.none;
+    broken = true;
   };
 })
diff --git a/pkgs/development/tools/haskell/timeplot/default.nix b/pkgs/development/tools/haskell/timeplot/default.nix
index 71a0835713c..4342b877a2e 100644
--- a/pkgs/development/tools/haskell/timeplot/default.nix
+++ b/pkgs/development/tools/haskell/timeplot/default.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, bytestringLexing, cairo, Chart, ChartCairo, colour
 , dataDefault, lens, regexTdfa, strptime, time, transformers
 , vcsRevision
@@ -5,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "timeplot";
-  version = "1.0.22";
-  sha256 = "1dp1prcx3d6a0fr3xrdj6flp27sy7qbng5bbdjgjbb7rq8497if9";
+  version = "1.0.25";
+  sha256 = "14zyzr53gpp0i7wx49zzdrndqdhsw3q4z3w5hdl8c4m541pr25fw";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/tools/haskell/una/default.nix b/pkgs/development/tools/haskell/una/default.nix
new file mode 100644
index 00000000000..9b80f6d478a
--- /dev/null
+++ b/pkgs/development/tools/haskell/una/default.nix
@@ -0,0 +1,18 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, cmdargs, filepath, ioStorage }:
+
+cabal.mkDerivation (self: {
+  pname = "una";
+  version = "2.1.0";
+  sha256 = "0gpycwd0dgnw7cdicpn19wv1xb4jq3j9dfzry2ilv85h02zkwfvh";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [ cmdargs filepath ioStorage ];
+  meta = {
+    homepage = "https://github.com/jwiegley/una";
+    description = "Universal un-archiver utility";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/haskell/uuagc/bootstrap.nix b/pkgs/development/tools/haskell/uuagc/bootstrap.nix
index d24d22f350a..5e954c526c4 100644
--- a/pkgs/development/tools/haskell/uuagc/bootstrap.nix
+++ b/pkgs/development/tools/haskell/uuagc/bootstrap.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, filepath, haskellSrcExts, mtl, uulib }:
 
 cabal.mkDerivation (self: {
@@ -12,6 +14,5 @@ cabal.mkDerivation (self: {
     description = "Attribute Grammar System of Universiteit Utrecht";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/haskell/uuagc/cabal.nix b/pkgs/development/tools/haskell/uuagc/cabal.nix
index 38be593a1f0..1a735a2471e 100644
--- a/pkgs/development/tools/haskell/uuagc/cabal.nix
+++ b/pkgs/development/tools/haskell/uuagc/cabal.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, Cabal, filepath, mtl, uulib }:
 
 cabal.mkDerivation (self: {
@@ -10,6 +12,5 @@ cabal.mkDerivation (self: {
     description = "Cabal plugin for the Universiteit Utrecht Attribute Grammar System";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/haskell/uuagc/default.nix b/pkgs/development/tools/haskell/uuagc/default.nix
index 165ea131dd9..230174dccbc 100644
--- a/pkgs/development/tools/haskell/uuagc/default.nix
+++ b/pkgs/development/tools/haskell/uuagc/default.nix
@@ -1,9 +1,11 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, filepath, haskellSrcExts, mtl, uuagcCabal, uulib }:
 
 cabal.mkDerivation (self: {
   pname = "uuagc";
-  version = "0.9.50";
-  sha256 = "0vyydqgmyl590ry63ibwshfpj2w9dd2v0nmr4jqlfw0m0d9ff50j";
+  version = "0.9.51";
+  sha256 = "07nymg525x41y8pl94d0n990h1yz5km8v0fasiggqv94sd04j22w";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ filepath haskellSrcExts mtl uuagcCabal uulib ];
@@ -12,6 +14,5 @@ cabal.mkDerivation (self: {
     description = "Attribute Grammar System of Universiteit Utrecht";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/java/fastjar/default.nix b/pkgs/development/tools/java/fastjar/default.nix
index cfcd8564b4c..c8bb94412ca 100644
--- a/pkgs/development/tools/java/fastjar/default.nix
+++ b/pkgs/development/tools/java/fastjar/default.nix
@@ -24,7 +24,7 @@ let version = "0.94"; in
 
       homepage = http://fastjar.sourceforge.net/;
 
-      license = "GPLv2+";
+      license = stdenv.lib.licenses.gpl2Plus;
 
       maintainers = [ ];
     };
diff --git a/pkgs/development/tools/jq/default.nix b/pkgs/development/tools/jq/default.nix
index f0c32fc0e9e..8194ffc22a8 100644
--- a/pkgs/development/tools/jq/default.nix
+++ b/pkgs/development/tools/jq/default.nix
@@ -3,11 +3,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="jq";
-    version="1.3";
+    version="1.4";
     name="${baseName}-${version}";
-    hash="1mzy9cj3d19y1m56mwk6slls543gnlhz8302hmnxkhdzdb1j6gv2";
-    url="http://stedolan.github.io/jq/download/source/jq-1.3.tar.gz";
-    sha256="1mzy9cj3d19y1m56mwk6slls543gnlhz8302hmnxkhdzdb1j6gv2";
+    hash="17dk17h7qj6xpnsbc09qwsqkm6r7jhqbfkjvwq246yxmpsx4334r";
+    url="http://stedolan.github.io/jq/download/source/jq-1.4.tar.gz";
+    sha256="17dk17h7qj6xpnsbc09qwsqkm6r7jhqbfkjvwq246yxmpsx4334r";
   };
   buildInputs = [
   ];
@@ -18,6 +18,11 @@ stdenv.mkDerivation {
   src = fetchurl {
     inherit (s) url sha256;
   };
+
+  # jq is linked to libjq:
+  configureFlags = [
+    "LDFLAGS=-Wl,-rpath,\\\${libdir}"
+  ];
   meta = {
     inherit (s) version;
     description = ''A lightweight and flexible command-line JSON processor'';
diff --git a/pkgs/development/tools/libsigrok/default.nix b/pkgs/development/tools/libsigrok/default.nix
new file mode 100644
index 00000000000..c8905dcbafd
--- /dev/null
+++ b/pkgs/development/tools/libsigrok/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, pkgconfig, libzip, glib, libusb1, libftdi, check
+, libserialport, librevisa
+}:
+
+stdenv.mkDerivation rec {
+  name = "libsigrok-0.3.0";
+
+  src = fetchurl {
+    url = "http://sigrok.org/download/source/libsigrok/${name}.tar.gz";
+    sha256 = "0l3h7zvn3w4c1b9dgvl3hirc4aj1csfkgbk87jkpl7bgl03nk4j3";
+  };
+
+  buildInputs = [ pkgconfig libzip glib libusb1 libftdi check libserialport
+    librevisa
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Core library of the sigrok signal analysis software suite";
+    homepage = http://sigrok.org/;
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/pkgs/development/tools/libsigrokdecode/default.nix b/pkgs/development/tools/libsigrokdecode/default.nix
new file mode 100644
index 00000000000..87ecd637b4e
--- /dev/null
+++ b/pkgs/development/tools/libsigrokdecode/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, pkgconfig, glib, python3, libsigrok, check }:
+
+stdenv.mkDerivation rec {
+  name = "libsigrokdecode-0.3.0";
+
+  src = fetchurl {
+    url = "http://sigrok.org/download/source/libsigrokdecode/${name}.tar.gz";
+    sha256 = "13s7ss52dqj7fccjgrkx10zkj41ygxn8ml1l0bs1vgczz4fvnkpf";
+  };
+
+  buildInputs = [ pkgconfig glib python3 libsigrok check ];
+
+  meta = with stdenv.lib; {
+    description = "Protocol decoding library for the sigrok signal analysis software suite";
+    homepage = http://sigrok.org/;
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/pkgs/development/tools/literate-programming/noweb/default.nix b/pkgs/development/tools/literate-programming/noweb/default.nix
index c173010928d..4f8691c40ad 100644
--- a/pkgs/development/tools/literate-programming/noweb/default.nix
+++ b/pkgs/development/tools/literate-programming/noweb/default.nix
@@ -9,13 +9,15 @@ stdenv.mkDerivation {
     sha256 = "10hdd6mrk26kyh4bnng4ah5h1pnanhsrhqa7qwqy6dyv3rng44y9";
   };
   preBuild = ''
+    mkdir -p $out/lib/noweb
     cd src
-    makeFlags="BIN=$out/bin LIB=$out/lib MAN=$out/share/man TEXINPUTS=$out/share/texmf/tex/latex"
+    makeFlags="BIN=$out/bin LIB=$out/lib/noweb MAN=$out/share/man TEXINPUTS=$out/share/texmf/tex/latex"
   '';
   preInstall=''mkdir -p $out/share/texmf/tex/latex'';
   postInstall= ''
     substituteInPlace $out/bin/cpif --replace "PATH=/bin:/usr/bin" ""
-    for f in $out/bin/{noweb,nountangle,noroots,noroff,noindex} $out/lib/*; do
+    for f in $out/bin/{noweb,nountangle,noroots,noroff,noindex} \
+             $out/lib/noweb/{toroff,btdefn,totex,pipedoc,noidx,unmarkup,toascii,tohtml,emptydefn}; do
       substituteInPlace $f --replace "nawk" "${gawk}/bin/awk"
     done
   '';
diff --git a/pkgs/development/tools/misc/ShellCheck/default.nix b/pkgs/development/tools/misc/ShellCheck/default.nix
new file mode 100644
index 00000000000..8beca12325b
--- /dev/null
+++ b/pkgs/development/tools/misc/ShellCheck/default.nix
@@ -0,0 +1,19 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, json, mtl, parsec, QuickCheck, regexCompat }:
+
+cabal.mkDerivation (self: {
+  pname = "ShellCheck";
+  version = "0.3.4";
+  sha256 = "07fw8c33p7h1kvg899dwnvqpxpywcidhbw9jhjd8xsma7kz471iw";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [ json mtl parsec QuickCheck regexCompat ];
+  testDepends = [ json mtl parsec QuickCheck regexCompat ];
+  meta = {
+    homepage = "http://www.shellcheck.net/";
+    description = "Shell script analysis tool";
+    license = "unknown";
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/misc/arcanist/default.nix b/pkgs/development/tools/misc/arcanist/default.nix
new file mode 100644
index 00000000000..c4f4caa3b65
--- /dev/null
+++ b/pkgs/development/tools/misc/arcanist/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchgit, php, flex, makeWrapper }:
+
+let
+  libphutil = fetchgit {
+    url    = "git://github.com/facebook/libphutil.git";
+    rev    = "49f08a756a54f12405d3704c0f978b71c7b13811";
+    sha256 = "b32267fe19c6e9532887388815b8553519e2844bc5b839b5ad35efeab6b07fb8";
+  };
+  arcanist = fetchgit {
+    url    = "git://github.com/facebook/arcanist.git";
+    rev    = "4c0edd296e3301fffdda33c447f6fcafe7d1de01";
+    sha256 = "a9f162fb6b47bcf628130e0e8988ab650278b3a6606fa425e4707241ed22dd3e";
+  };
+in
+stdenv.mkDerivation rec {
+  name    = "arcanist-${version}";
+  version = "20140812";
+
+  src = [ arcanist libphutil ];
+  buildInputs = [ php makeWrapper flex ];
+
+  unpackPhase = "true";
+  buildPhase = ''
+    ORIG=`pwd`
+    cp -R ${libphutil} libphutil
+    cp -R ${arcanist} arcanist
+    chmod +w -R libphutil arcanist
+    cd libphutil/support/xhpast
+    make clean all install
+    cd $ORIG
+  '';
+  installPhase = ''
+    mkdir -p $out/bin $out/libexec
+    cp -R libphutil $out/libexec/libphutil
+    cp -R arcanist  $out/libexec/arcanist
+
+    ln -s $out/libexec/arcanist/bin/arc $out/bin
+    wrapProgram $out/bin/arc \
+      --prefix PATH : "${php}/bin"
+  '';
+
+  meta = {
+    description = "Command line interface to Phabricator";
+    homepage    = "http://phabricator.org";
+    license     = stdenv.lib.licenses.asl20;
+    platforms   = stdenv.lib.platforms.unix;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+  };
+}
diff --git a/pkgs/development/tools/misc/astyle/default.nix b/pkgs/development/tools/misc/astyle/default.nix
index 6128406bbe5..c7cda38ef43 100644
--- a/pkgs/development/tools/misc/astyle/default.nix
+++ b/pkgs/development/tools/misc/astyle/default.nix
@@ -2,14 +2,14 @@
 
 let
   name = "astyle";
-  version = "2.02.1";
+  version = "2.04";
 in
 stdenv.mkDerivation {
   name = "${name}-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/${name}/${name}_${version}_linux.tar.gz";
-    sha256 = "0bece9a32887e51f42c57617cf7c4f9b63d0a386749fe3a094f5525b639ef953";
+    sha256 = "0q3b2579ng01glfwan75zcyvkggixdz9c4i6cgid2664ad47zcvh";
   };
 
   sourceRoot = "astyle/build/gcc";
diff --git a/pkgs/development/tools/misc/autobuild/default.nix b/pkgs/development/tools/misc/autobuild/default.nix
index 88246e4bb6e..b35ec4357c4 100644
--- a/pkgs/development/tools/misc/autobuild/default.nix
+++ b/pkgs/development/tools/misc/autobuild/default.nix
@@ -34,6 +34,6 @@ stdenv.mkDerivation rec {
     '';
 
     homepage = http://josefsson.org/autobuild/;
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
   };
 }
diff --git a/pkgs/development/tools/misc/autoconf/2.13.nix b/pkgs/development/tools/misc/autoconf/2.13.nix
index 2d8169d408f..c3b44ca5686 100644
--- a/pkgs/development/tools/misc/autoconf/2.13.nix
+++ b/pkgs/development/tools/misc/autoconf/2.13.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = http://www.gnu.org/software/autoconf/;
     description = "Part of the GNU Build System";
+    branch = "2.13";
 
     longDescription = ''
       GNU Autoconf is an extensible package of M4 macros that produce
@@ -30,6 +31,6 @@ stdenv.mkDerivation rec {
       can use, in the form of M4 macro calls.
     '';
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
   };
 }
diff --git a/pkgs/development/tools/misc/autoconf/default.nix b/pkgs/development/tools/misc/autoconf/default.nix
index 08fcd95afb5..4dca332722b 100644
--- a/pkgs/development/tools/misc/autoconf/default.nix
+++ b/pkgs/development/tools/misc/autoconf/default.nix
@@ -14,7 +14,8 @@ stdenv.mkDerivation rec {
   # http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for
   # details.
   # There are many test failures on `i386-pc-solaris2.11'.
-  doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS));
+  #doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS));
+  doCheck = false;
 
   # Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the
   # "fixed" path in generated files!
@@ -41,7 +42,7 @@ stdenv.mkDerivation rec {
       can use, in the form of M4 macro calls.
     '';
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     maintainers = [ stdenv.lib.maintainers.ludo ];
   };
diff --git a/pkgs/development/tools/misc/autogen/default.nix b/pkgs/development/tools/misc/autogen/default.nix
index cd4f19694b2..a26c1fdd199 100644
--- a/pkgs/development/tools/misc/autogen/default.nix
+++ b/pkgs/development/tools/misc/autogen/default.nix
@@ -1,13 +1,13 @@
 { fetchurl, stdenv, guile, which, libffi }:
 
-let version = "5.17"; in
+let version = "5.18"; in
 
   stdenv.mkDerivation {
     name = "autogen-${version}";
 
     src = fetchurl {
       url = "mirror://gnu/autogen/rel${version}/autogen-${version}.tar.gz";
-      sha256 = "065mg9gfb605wxbsk3inf93528ygcjgg6j8ml51691f6ghj363ff";
+      sha256 = "1h2d3wpzkla42igxyisaqh2nwpq01vwad1wp9671xmm5ahvkw5f7";
     };
 
     buildInputs = [ guile which libffi ];
@@ -46,7 +46,7 @@ let version = "5.17"; in
         documentation of program options.
       '';
 
-      licenses = ["GPLv3+" "LGPLv3+" ];
+      license = ["GPLv3+" "LGPLv3+" ];
 
       homepage = http://www.gnu.org/software/autogen/;
 
diff --git a/pkgs/development/tools/misc/automake/automake-1.11.x.nix b/pkgs/development/tools/misc/automake/automake-1.11.x.nix
index 0af9877c935..2cd80eb4bac 100644
--- a/pkgs/development/tools/misc/automake/automake-1.11.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.11.x.nix
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
       Standards.  Automake requires the use of Autoconf.
     '';
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     maintainers = [ stdenv.lib.maintainers.ludo ];
   };
diff --git a/pkgs/development/tools/misc/automake/automake-1.12.x.nix b/pkgs/development/tools/misc/automake/automake-1.12.x.nix
index 8bee4790bcb..6a93cdc78fd 100644
--- a/pkgs/development/tools/misc/automake/automake-1.12.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.12.x.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, perl, autoconf, makeWrapper, doCheck ? false }:
 
 stdenv.mkDerivation rec {
-  name = "automake-1.12.4";
+  name = "automake-1.12.6";
 
   # TODO: Remove the `aclocal' wrapper when $ACLOCAL_PATH support is
   # available upstream; see
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnu/automake/${name}.tar.xz";
-    sha256 = "0wppdm0wfizs6nmiwlkigcmh2pn33dywdkl7b407j3pvwn622vsi";
+    sha256 = "1ynvca8z4aqcwr94rf7j1bfiid2w9w250y9qhnyj9vmi8lhsnd7q";
   };
 
   buildInputs = [perl autoconf makeWrapper];
@@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
       Standards.  Automake requires the use of Autoconf.
     '';
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     maintainers = [ stdenv.lib.maintainers.ludo ];
   };
diff --git a/pkgs/development/tools/misc/automake/automake-1.13.x.nix b/pkgs/development/tools/misc/automake/automake-1.13.x.nix
index 96a93e8d60b..d4369787f1b 100644
--- a/pkgs/development/tools/misc/automake/automake-1.13.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.13.x.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://www.gnu.org/software/automake/";
     description = "GNU standard-compliant makefile generator";
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     longDescription = ''
       GNU Automake is a tool for automatically generating
diff --git a/pkgs/development/tools/misc/automake/automake-1.10.x.nix b/pkgs/development/tools/misc/automake/automake-1.14.x.nix
index 80b033425a1..0c6ed42825a 100644
--- a/pkgs/development/tools/misc/automake/automake-1.10.x.nix
+++ b/pkgs/development/tools/misc/automake/automake-1.14.x.nix
@@ -1,32 +1,33 @@
-{stdenv, fetchurl, perl, autoconf, makeWrapper, doCheck ? false}:
+{ stdenv, fetchurl, perl, autoconf, makeWrapper, doCheck ? false }:
 
 stdenv.mkDerivation rec {
-  name = "automake-1.10.3";
-
-  builder = ./builder.sh;
-
-  setupHook = ./setup-hook.sh;
+  name = "automake-1.14.1";
 
   src = fetchurl {
-    url = "mirror://gnu/automake/${name}.tar.bz2";
-    sha256 = "1p0sgv8zl6ah6vwpqf7jkrjr3cw8ydpmnbi0ljb1dhrrp0xv92p9";
+    url = "mirror://gnu/automake/${name}.tar.xz";
+    sha256 = "0s86rzdayj1licgj35q0mnynv5xa8f4p32m36blc5jk9id5z1d59";
   };
 
-  buildInputs = [perl autoconf makeWrapper];
+  buildInputs = [ perl autoconf ];
 
-  inherit doCheck;
+  setupHook = ./setup-hook.sh;
 
   # Disable indented log output from Make, otherwise "make.test" will
   # fail.
   preCheck = "unset NIX_INDENT_MAKE";
+  inherit doCheck;
+
+  # The test suite can run in parallel.
+  enableParallelBuilding = true;
 
   # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the
   # "fixed" path in generated files!
   dontPatchShebangs = true;
 
   meta = {
-    homepage = http://www.gnu.org/software/automake/;
+    homepage = "http://www.gnu.org/software/automake/";
     description = "GNU standard-compliant makefile generator";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     longDescription = ''
       GNU Automake is a tool for automatically generating
@@ -34,8 +35,6 @@ stdenv.mkDerivation rec {
       Standards.  Automake requires the use of Autoconf.
     '';
 
-    license = "GPLv2+";
-
-    maintainers = [ stdenv.lib.maintainers.ludo ];
+    maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.simons ];
   };
 }
diff --git a/pkgs/development/tools/misc/avrdude/default.nix b/pkgs/development/tools/misc/avrdude/default.nix
index 133e1c38194..2026e0ad2c8 100644
--- a/pkgs/development/tools/misc/avrdude/default.nix
+++ b/pkgs/development/tools/misc/avrdude/default.nix
@@ -1,31 +1,33 @@
-{ composableDerivation, fetchurl, yacc, flex, texLive, libusb }:
+{ stdenv, fetchurl, yacc, flex, libusb, libelf, libftdi1, readline
+# docSupport is a big dependency, disabled by default
+, docSupport ? false, texLive ? null, texinfo ? null, texi2html ? null
+}:
 
-let edf = composableDerivation.edf; in
+assert docSupport -> texLive != null && texinfo != null && texi2html != null;
 
-composableDerivation.composableDerivation {} rec {
-  name="avrdude-5.11";
+stdenv.mkDerivation rec {
+  name = "avrdude-6.1";
 
   src = fetchurl {
     url = "mirror://savannah/avrdude/${name}.tar.gz";
-    sha256 = "1mwmslqysak25a3x61pj97wygqgk79s5qpp50xzay6yb1zrz85v3";
+    sha256 = "0frxg0q09nrm95z7ymzddx7ysl77ilfbdix1m81d9jjpiv5bm64y";
   };
 
-  configureFlags = [ "--disable-dependency-tracking" ];
-
-  buildInputs = [ yacc flex libusb ];
-
-  flags =
-       edf { name = "doc"; enable = { buildInputs = texLive; configureFlags = ["--enable-doc"]; }; }
-    // edf { name = "parport"; };
-
-  cfg = {
-    docSupport = false; # untested
-    parportSupport = true;
-  };
-
-  meta = {
-    license = "GPL-2";
-    description = "AVR Downloader/UploaDEr";
-    homepage = http://savannah.nongnu.org/projects/avrdude;
+  configureFlags = stdenv.lib.optionalString docSupport "--enable-doc";
+
+  buildInputs = [ yacc flex libusb libelf libftdi1 readline ]
+    ++ stdenv.lib.optionals docSupport [ texLive texinfo texi2html ];
+
+  meta = with stdenv.lib; {
+    description = "Command-line tool for programming Atmel AVR microcontrollers";
+    longDescription = ''
+      AVRDUDE (AVR Downloader/UploaDEr) is an utility to
+      download/upload/manipulate the ROM and EEPROM contents of AVR
+      microcontrollers using the in-system programming technique (ISP).
+    '';
+    homepage = http://www.nongnu.org/avrdude/;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
   };
 }
diff --git a/pkgs/development/tools/misc/babeltrace/default.nix b/pkgs/development/tools/misc/babeltrace/default.nix
index d19bb24eb37..aa8e70b5edc 100644
--- a/pkgs/development/tools/misc/babeltrace/default.nix
+++ b/pkgs/development/tools/misc/babeltrace/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, glib, libuuid, popt }:
 
 stdenv.mkDerivation rec {
-  name = "babeltrace-1.1.1";
+  name = "babeltrace-1.2.1";
 
   src = fetchurl {
     url = "http://www.efficios.com/files/babeltrace/${name}.tar.bz2";
-    sha256 = "04jc1yd3aaq59fmpzswzc78cywpq7wzjfqdlsg7xc76ivb8cggfz";
+    sha256 = "1pwg0y57iy4c8wynb6bj7f6bxaiclmxcm4f3nllpw9brhbdzygc1";
   };
 
   buildInputs = [ pkgconfig glib libuuid popt ];
diff --git a/pkgs/development/tools/misc/binutils-cross/builder.sh b/pkgs/development/tools/misc/binutils-cross/builder.sh
deleted file mode 100644
index 29d3b3779b6..00000000000
--- a/pkgs/development/tools/misc/binutils-cross/builder.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-source $stdenv/setup
-
-if test $cross = "arm-linux" ; then
-  configureFlags="--target=arm-linux"
-elif test $cross = "mips-linux" ; then
-  configureFlags="--target=mips-linux"
-elif test $cross = "mipsel-linux" ; then
-  configureFlags="--target=mipsel-linux"
-elif test $cross = "sparc-linux" ; then
-  configureFlags="--target=sparc-linux"
-elif test $cross = "powerpc-linux" ; then
-  configureFlags="--target=powerpc-linux"
-elif test $cross = "ppc-linux" ; then
-  configureFlags="--target=powerpc-linux"
-fi
-
-patchConfigure() {
-    # Clear the default library search path.
-    if test "$noSysDirs" = "1"; then
-        echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt
-    fi
-}
-
-preConfigure=patchConfigure
-
-genericBuild
diff --git a/pkgs/development/tools/misc/binutils-cross/default.nix b/pkgs/development/tools/misc/binutils-cross/default.nix
deleted file mode 100644
index 7d77baced37..00000000000
--- a/pkgs/development/tools/misc/binutils-cross/default.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{stdenv, fetchurl, noSysDirs, cross}:
-
-stdenv.mkDerivation {
-  name = "binutils-2.16.1";
-  builder = ./builder.sh;
-  src = fetchurl {
-    url = http://ftp.nluug.nl/gnu/binutils/binutils-2.16.1.tar.bz2;
-    md5 = "6a9d529efb285071dad10e1f3d2b2967";
-  };
-  inherit noSysDirs;
-  #configureFlags = if cross=="arm-linux" then "--target=arm-linux" else if cross=="mips-linux" then "--target=mips-linux" else if cross=="sparc-linux" then "--target=sparc-linux"; 
-  inherit cross;
-}
diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix
index 6b93240ba05..8d8fc5d464e 100644
--- a/pkgs/development/tools/misc/binutils/default.nix
+++ b/pkgs/development/tools/misc/binutils/default.nix
@@ -1,10 +1,13 @@
 { stdenv, fetchurl, noSysDirs, zlib
-, cross ? null, gold ? false, bison ? null, flex2535 ? null, bc ? null, dejagnu ? null
-, deterministic ? false }:
+, cross ? null, gold ? true, bison ? null
+}:
 
 let basename = "binutils-2.23.1"; in
+
+with { inherit (stdenv.lib) optional optionals optionalString; };
+
 stdenv.mkDerivation rec {
-  name = basename + stdenv.lib.optionalString (cross != null) "-${cross.config}";
+  name = basename + optionalString (cross != null) "-${cross.config}";
 
   src = fetchurl {
     url = "mirror://gnu/binutils/${basename}.tar.bz2";
@@ -21,23 +24,31 @@ stdenv.mkDerivation rec {
     # That requires upstream changes for things to work. So we can patch it to
     # get the old behaviour by now.
     ./dtneeded.patch
-  ] ++ (stdenv.lib.optional deterministic ./deterministic.patch);
+
+    # Make binutils output deterministic by default.
+    ./deterministic.patch
+
+    # Always add PaX flags section to ELF files.
+    # This is needed, for instance, so that running "ldd" on a binary that is
+    # PaX-marked to disable mprotect doesn't fail with permission denied.
+    ./pt-pax-flags-20121023.patch
+  ];
 
   buildInputs =
     [ zlib ]
-    ++ stdenv.lib.optional gold bison;
+    ++ optional gold bison;
 
   inherit noSysDirs;
 
   preConfigure = ''
     # Clear the default library search path.
     if test "$noSysDirs" = "1"; then
-	echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt
+        echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt
     fi
 
     # Use symlinks instead of hard links to save space ("strip" in the
     # fixup phase strips each hard link separately).
-    for i in binutils/Makefile.in gas/Makefile.in ld/Makefile.in; do
+    for i in binutils/Makefile.in gas/Makefile.in ld/Makefile.in gold/Makefile.in; do
         sed -i "$i" -e 's|ln |ln -s |'
     done
   '';
@@ -46,15 +57,15 @@ stdenv.mkDerivation rec {
   # to the bootstrap-tools libgcc (as uses to happen on arm/mips)
   NIX_CFLAGS_COMPILE = "-static-libgcc";
 
-  configureFlags = "--disable-werror" # needed for dietlibc build
-      + stdenv.lib.optionalString (stdenv.system == "mips64el-linux")
-        " --enable-fix-loongson2f-nop"
-      + stdenv.lib.optionalString (cross != null) " --target=${cross.config}"
-      + stdenv.lib.optionalString gold " --enable-gold --enable-plugins"
-      + stdenv.lib.optionalString deterministic " --enable-deterministic-archives";
+  configureFlags =
+    [ "--enable-shared" "--enable-deterministic-archives" ]
+    ++ optional (stdenv.system == "mips64el-linux") "--enable-fix-loongson2f-nop"
+    ++ optional (cross != null) "--target=${cross.config}"
+    ++ optionals gold [ "--enable-gold" "--enable-plugins" ]
+    ++ optional (stdenv.system == "i686-linux") "--enable-targets=x86_64-linux-gnu";
 
   enableParallelBuilding = true;
-      
+
   meta = {
     description = "GNU Binutils, tools for manipulating binaries (linker, assembler, etc.)";
 
@@ -67,7 +78,7 @@ stdenv.mkDerivation rec {
 
     homepage = http://www.gnu.org/software/binutils/;
 
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
 
     /* Give binutils a lower priority than gcc-wrapper to prevent a
        collision due to the ld/as wrappers/symlinks in the latter. */
diff --git a/pkgs/development/tools/misc/binutils/pt-pax-flags-20121023.patch b/pkgs/development/tools/misc/binutils/pt-pax-flags-20121023.patch
new file mode 100644
index 00000000000..bb0785fe192
--- /dev/null
+++ b/pkgs/development/tools/misc/binutils/pt-pax-flags-20121023.patch
@@ -0,0 +1,1786 @@
+--- binutils-2.23/bfd/elf-bfd.h
++++ binutils-2.23/bfd/elf-bfd.h
+@@ -1577,6 +1577,9 @@ struct elf_obj_tdata
+   /* Segment flags for the PT_GNU_STACK segment.  */
+   unsigned int stack_flags;
+ 
++  /* Segment flags for the PT_PAX_FLAGS segment.  */
++  unsigned int pax_flags;
++
+   /* Symbol version definitions in external objects.  */
+   Elf_Internal_Verdef *verdef;
+ 
+--- binutils-2.23/bfd/elf.c
++++ binutils-2.23/bfd/elf.c
+@@ -1158,6 +1158,7 @@ get_segment_type (unsigned int p_type)
+     case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
+     case PT_GNU_STACK: pt = "STACK"; break;
+     case PT_GNU_RELRO: pt = "RELRO"; break;
++    case PT_PAX_FLAGS: pt = "PAX_FLAGS"; break;
+     default: pt = NULL; break;
+     }
+   return pt;
+@@ -2477,6 +2478,9 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int hdr_index)
+     case PT_GNU_RELRO:
+       return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "relro");
+ 
++    case PT_PAX_FLAGS:
++      return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "pax_flags");
++
+     default:
+       /* Check for any processor-specific program segment types.  */
+       bed = get_elf_backend_data (abfd);
+@@ -3551,6 +3555,11 @@ get_program_header_size (bfd *abfd, struct bfd_link_info *info)
+       ++segs;
+     }
+ 
++    {
++      /* We need a PT_PAX_FLAGS segment.  */
++      ++segs;
++    }
++
+   for (s = abfd->sections; s != NULL; s = s->next)
+     {
+       if ((s->flags & SEC_LOAD) != 0
+@@ -4153,6 +4162,20 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
+ 	    }
+ 	}
+ 
++    {
++      amt = sizeof (struct elf_segment_map);
++      m = bfd_zalloc (abfd, amt);
++      if (m == NULL)
++	goto error_return;
++      m->next = NULL;
++      m->p_type = PT_PAX_FLAGS;
++      m->p_flags = elf_tdata (abfd)->pax_flags;
++      m->p_flags_valid = 1;
++
++      *pm = m;
++      pm = &m->next;
++    }
++
+       free (sections);
+       elf_tdata (abfd)->segment_map = mfirst;
+     }
+@@ -5417,7 +5440,8 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
+        6. PT_TLS segment includes only SHF_TLS sections.
+        7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments.
+        8. PT_DYNAMIC should not contain empty sections at the beginning
+-	  (with the possible exception of .dynamic).  */
++	  (with the possible exception of .dynamic).
++       9. PT_PAX_FLAGS segments do not include any sections.  */
+ #define IS_SECTION_IN_INPUT_SEGMENT(section, segment, bed)		\
+   ((((segment->p_paddr							\
+       ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr)	\
+@@ -5425,6 +5449,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
+      && (section->flags & SEC_ALLOC) != 0)				\
+     || IS_NOTE (segment, section))					\
+    && segment->p_type != PT_GNU_STACK					\
++   && segment->p_type != PT_PAX_FLAGS					\
+    && (segment->p_type != PT_TLS					\
+        || (section->flags & SEC_THREAD_LOCAL))				\
+    && (segment->p_type == PT_LOAD					\
+--- binutils-2.23/bfd/elflink.c
++++ binutils-2.23/bfd/elflink.c
+@@ -5545,16 +5545,30 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
+     return TRUE;
+ 
+   bed = get_elf_backend_data (output_bfd);
++
++  elf_tdata (output_bfd)->pax_flags = PF_NORANDEXEC;
++  if (info->execheap)
++    elf_tdata (output_bfd)->pax_flags |= PF_NOMPROTECT;
++  else if (info->noexecheap)
++    elf_tdata (output_bfd)->pax_flags |= PF_MPROTECT;
++
+   if (info->execstack)
+-    elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
++    {
++      elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
++      elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
++    }
+   else if (info->noexecstack)
+-    elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
++    {
++      elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
++      elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
++    }
+   else
+     {
+       bfd *inputobj;
+       asection *notesec = NULL;
+       int exec = 0;
+ 
++      elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
+       for (inputobj = info->input_bfds;
+ 	   inputobj;
+ 	   inputobj = inputobj->link_next)
+@@ -5567,7 +5581,11 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
+ 	  if (s)
+ 	    {
+ 	      if (s->flags & SEC_CODE)
+-		exec = PF_X;
++		{
++		  elf_tdata (output_bfd)->pax_flags &= ~PF_NOEMUTRAMP;
++		  elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
++		  exec = PF_X;
++		}
+ 	      notesec = s;
+ 	    }
+ 	  else if (bed->default_execstack)
+--- binutils-2.23/binutils/readelf.c
++++ binutils-2.23/binutils/readelf.c
+@@ -2740,6 +2740,7 @@ get_segment_type (unsigned long p_type)
+ 			return "GNU_EH_FRAME";
+     case PT_GNU_STACK:	return "GNU_STACK";
+     case PT_GNU_RELRO:  return "GNU_RELRO";
++    case PT_PAX_FLAGS:  return "PAX_FLAGS";
+ 
+     default:
+       if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
+--- binutils-2.23/include/bfdlink.h
++++ binutils-2.23/include/bfdlink.h
+@@ -322,6 +322,14 @@ struct bfd_link_info
+   /* TRUE if PT_GNU_RELRO segment should be created.  */
+   unsigned int relro: 1;
+ 
++  /* TRUE if PT_PAX_FLAGS segment should be created with PF_NOMPROTECT
++     flags.  */
++  unsigned int execheap: 1;
++
++  /* TRUE if PT_PAX_FLAGS segment should be created with PF_MPROTECT
++     flags.  */
++  unsigned int noexecheap: 1;
++
+   /* TRUE if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment
+      should be created.  */
+   unsigned int eh_frame_hdr: 1;
+--- binutils-2.23/include/elf/common.h
++++ binutils-2.23/include/elf/common.h
+@@ -429,6 +429,7 @@
+ #define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME      /* Solaris uses the same value */
+ #define PT_GNU_STACK	(PT_LOOS + 0x474e551) /* Stack flags */
+ #define PT_GNU_RELRO	(PT_LOOS + 0x474e552) /* Read-only after relocation */
++#define PT_PAX_FLAGS	(PT_LOOS + 0x5041580) /* PaX flags */
+ 
+ /* Program segment permissions, in program header p_flags field.  */
+ 
+@@ -439,6 +440,21 @@
+ #define PF_MASKOS	0x0FF00000	/* New value, Oct 4, 1999 Draft */
+ #define PF_MASKPROC	0xF0000000	/* Processor-specific reserved bits */
+ 
++/* Flags to control PaX behavior.  */
++
++#define PF_PAGEEXEC	(1 << 4)	/* Enable  PAGEEXEC */
++#define PF_NOPAGEEXEC	(1 << 5)	/* Disable PAGEEXEC */
++#define PF_SEGMEXEC	(1 << 6)	/* Enable  SEGMEXEC */
++#define PF_NOSEGMEXEC	(1 << 7)	/* Disable SEGMEXEC */
++#define PF_MPROTECT	(1 << 8)	/* Enable  MPROTECT */
++#define PF_NOMPROTECT	(1 << 9)	/* Disable MPROTECT */
++#define PF_RANDEXEC	(1 << 10)	/* Enable  RANDEXEC */
++#define PF_NORANDEXEC	(1 << 11)	/* Disable RANDEXEC */
++#define PF_EMUTRAMP	(1 << 12)	/* Enable  EMUTRAMP */
++#define PF_NOEMUTRAMP	(1 << 13)	/* Disable EMUTRAMP */
++#define PF_RANDMMAP	(1 << 14)	/* Enable  RANDMMAP */
++#define PF_NORANDMMAP	(1 << 15)	/* Disable RANDMMAP */
++
+ /* Values for section header, sh_type field.  */
+ 
+ #define SHT_NULL	0		/* Section header table entry unused */
+--- binutils-2.23/ld/emultempl/elf32.em
++++ binutils-2.23/ld/emultempl/elf32.em
+@@ -2285,6 +2285,16 @@ fragment <<EOF
+ 	  link_info.noexecstack = TRUE;
+ 	  link_info.execstack = FALSE;
+ 	}
++      else if (strcmp (optarg, "execheap") == 0)
++	{
++	  link_info.execheap = TRUE;
++	  link_info.noexecheap = FALSE;
++	}
++      else if (strcmp (optarg, "noexecheap") == 0)
++	{
++	  link_info.noexecheap = TRUE;
++	  link_info.execheap = FALSE;
++	}
+ EOF
+ if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+ fragment <<EOF
+@@ -2368,6 +2378,8 @@ fragment <<EOF
+   -z defs                     Report unresolved symbols in object files.\n"));
+   fprintf (file, _("\
+   -z execstack                Mark executable as requiring executable stack\n"));
++  fprintf (file, _("\
++  -z execheap                 Mark executable as requiring executable heap\n"));
+ EOF
+ 
+ if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+@@ -2391,6 +2403,8 @@ fragment <<EOF
+ fragment <<EOF
+   fprintf (file, _("\
+   -z noexecstack              Mark executable as not requiring executable stack\n"));
++  fprintf (file, _("\
++  -z noexecheap               Mark executable as not requiring executable heap\n"));
+ EOF
+ if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
+ fragment <<EOF
+--- binutils-2.23/ld/ldgram.y
++++ binutils-2.23/ld/ldgram.y
+@@ -1119,6 +1119,8 @@ phdr_type:
+ 			    $$ = exp_intop (0x6474e550);
+ 			  else if (strcmp (s, "PT_GNU_STACK") == 0)
+ 			    $$ = exp_intop (0x6474e551);
++			  else if (strcmp (s, "PT_PAX_FLAGS") == 0)
++			    $$ = exp_intop (0x65041580);
+ 			  else
+ 			    {
+ 			      einfo (_("\
+--- binutils-2.23/ld/testsuite/ld-alpha/tlsbin.rd
++++ binutils-2.23/ld/testsuite/ld-alpha/tlsbin.rd
+@@ -35,13 +35,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+ 
+ Program Headers:
+   Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+-  PHDR +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+150 R E 0x8
++  PHDR +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+188 R E 0x8
+   INTERP +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
+ .*Requesting program interpreter.*
+   LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x10000
+   LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
+   DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
+   TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 3 entries:
+--- binutils-2.23/ld/testsuite/ld-alpha/tlsbinr.rd
++++ binutils-2.23/ld/testsuite/ld-alpha/tlsbinr.rd
+@@ -42,6 +42,7 @@ Program Headers:
+  +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
+  +DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
+  +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
+--- binutils-2.23/ld/testsuite/ld-alpha/tlspic.rd
++++ binutils-2.23/ld/testsuite/ld-alpha/tlspic.rd
+@@ -38,6 +38,7 @@ Program Headers:
+  +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
+  +DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
+  +TLS +0x0+10e0 0x0+110e0 0x0+110e0 0x0+60 0x0+80 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 7 entries:
+--- binutils-2.23/ld/testsuite/ld-elf/eh1.d
++++ binutils-2.23/ld/testsuite/ld-elf/eh1.d
+@@ -22,11 +22,11 @@ Contents of the .eh_frame section:
+   DW_CFA_nop
+   DW_CFA_nop
+ 
+-00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
+-  DW_CFA_advance_loc: 0 to 00400078
++00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
++  DW_CFA_advance_loc: 0 to [0-9a-f]+
+   DW_CFA_def_cfa_offset: 16
+   DW_CFA_offset: r6 \(rbp\) at cfa-16
+-  DW_CFA_advance_loc: 0 to 00400078
++  DW_CFA_advance_loc: 0 to [0-9a-f]+
+   DW_CFA_def_cfa_register: r6 \(rbp\)
+ 
+ 00000038 ZERO terminator
+--- binutils-2.23/ld/testsuite/ld-elf/eh2.d
++++ binutils-2.23/ld/testsuite/ld-elf/eh2.d
+@@ -22,11 +22,11 @@ Contents of the .eh_frame section:
+   DW_CFA_nop
+   DW_CFA_nop
+ 
+-00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
+-  DW_CFA_advance_loc: 0 to 00400078
++00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
++  DW_CFA_advance_loc: 0 to [0-9a-f]+
+   DW_CFA_def_cfa_offset: 16
+   DW_CFA_offset: r6 \(rbp\) at cfa-16
+-  DW_CFA_advance_loc: 0 to 00400078
++  DW_CFA_advance_loc: 0 to [0-9a-f]+
+   DW_CFA_def_cfa_register: r6 \(rbp\)
+ 
+ 00000038 ZERO terminator
+--- binutils-2.23/ld/testsuite/ld-elf/eh3.d
++++ binutils-2.23/ld/testsuite/ld-elf/eh3.d
+@@ -22,11 +22,11 @@ Contents of the .eh_frame section:
+   DW_CFA_nop
+   DW_CFA_nop
+ 
+-00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
+-  DW_CFA_advance_loc: 0 to 00400078
++00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
++  DW_CFA_advance_loc: 0 to [0-9a-f]+
+   DW_CFA_def_cfa_offset: 16
+   DW_CFA_offset: r6 \(rbp\) at cfa-16
+-  DW_CFA_advance_loc: 0 to 00400078
++  DW_CFA_advance_loc: 0 to [0-9a-f]+
+   DW_CFA_def_cfa_register: r6 \(rbp\)
+ 
+ 00000038 ZERO terminator
+--- binutils-2.23/ld/testsuite/ld-elf/orphan-region.d
++++ binutils-2.23/ld/testsuite/ld-elf/orphan-region.d
+@@ -15,7 +15,9 @@
+ Program Headers:
+   Type.*
+   LOAD[ \t]+0x[0-9a-f]+ 0x0*40000000 0x0*40000000 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x[0-9a-f]+
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+   Segment Sections...
+    00     .text .rodata .moredata *
++   01 +
+--- binutils-2.23/ld/testsuite/ld-i386/tlsbin.rd
++++ binutils-2.23/ld/testsuite/ld-i386/tlsbin.rd
+@@ -44,6 +44,7 @@ Program Headers:
+  +LOAD.*
+  +DYNAMIC.*
+  +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections...
+@@ -53,6 +54,7 @@ Program Headers:
+  +03 +.tdata .dynamic .got .got.plt *
+  +04 +.dynamic *
+  +05 +.tdata .tbss *
++ +06 +
+ 
+ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
+  Offset +Info +Type +Sym.Value +Sym. Name
+--- binutils-2.23/ld/testsuite/ld-i386/tlsbindesc.rd
++++ binutils-2.23/ld/testsuite/ld-i386/tlsbindesc.rd
+@@ -42,6 +42,7 @@ Program Headers:
+  +LOAD.*
+  +DYNAMIC.*
+  +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections...
+@@ -51,6 +52,7 @@ Program Headers:
+  +03 +.tdata .dynamic .got .got.plt *
+  +04 +.dynamic *
+  +05 +.tdata .tbss *
++ +06 +
+ 
+ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
+  Offset +Info +Type +Sym.Value +Sym. Name
+--- binutils-2.23/ld/testsuite/ld-i386/tlsdesc.rd
++++ binutils-2.23/ld/testsuite/ld-i386/tlsdesc.rd
+@@ -39,6 +39,7 @@ Program Headers:
+  +LOAD.*
+  +DYNAMIC.*
+  +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections...
+@@ -46,6 +47,7 @@ Program Headers:
+  +01 +.tdata .dynamic .got .got.plt *
+  +02 +.dynamic *
+  +03 +.tdata .tbss *
++ +04 +
+ 
+ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
+  Offset +Info +Type +Sym.Value +Sym. Name
+--- binutils-2.23/ld/testsuite/ld-i386/tlsgdesc.rd
++++ binutils-2.23/ld/testsuite/ld-i386/tlsgdesc.rd
+@@ -36,12 +36,14 @@ Program Headers:
+  +LOAD.*
+  +LOAD.*
+  +DYNAMIC.*
++ +PAX_FLAGS.*
+ 
+  Section to Segment mapping:
+  +Segment Sections...
+  +00 +.hash .dynsym .dynstr .rel.dyn .rel.plt .plt .text *
+  +01 +.dynamic .got .got.plt *
+  +02 +.dynamic *
++ +03 +
+ 
+ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
+  Offset +Info +Type +Sym.Value +Sym. Name
+--- binutils-2.23/ld/testsuite/ld-i386/tlsnopic.rd
++++ binutils-2.23/ld/testsuite/ld-i386/tlsnopic.rd
+@@ -37,6 +37,7 @@ Program Headers:
+  +LOAD.*
+  +DYNAMIC.*
+  +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+ 0x0+24 R +0x1
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections...
+@@ -44,6 +45,7 @@ Program Headers:
+  +01 +.dynamic .got .got.plt *
+  +02 +.dynamic *
+  +03 +.tbss *
++ +04 +
+ 
+ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
+  Offset +Info +Type +Sym.Value +Sym. Name
+--- binutils-2.23/ld/testsuite/ld-i386/tlspic.rd
++++ binutils-2.23/ld/testsuite/ld-i386/tlspic.rd
+@@ -40,6 +40,7 @@ Program Headers:
+  +LOAD.*
+  +DYNAMIC.*
+  +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections...
+@@ -47,6 +48,7 @@ Program Headers:
+  +01 +.tdata .dynamic .got .got.plt *
+  +02 +.dynamic *
+  +03 +.tdata .tbss *
++ +04 +
+ 
+ Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 26 entries:
+  Offset +Info +Type +Sym.Value +Sym. Name
+--- binutils-2.23/ld/testsuite/ld-ia64/merge1.d
++++ binutils-2.23/ld/testsuite/ld-ia64/merge1.d
+@@ -4,7 +4,7 @@
+ #objdump: -d
+ 
+ #...
+-0+1e0 <.text>:
++[a-f0-9]+ <.text>:
+ [ 	]*[a-f0-9]+:	0b 60 80 02 00 24 	\[MMI\]       addl r12=32,r1;;
+ [ 	]*[a-f0-9]+:	c0 c0 04 00 48 00 	            addl r12=24,r1
+ [ 	]*[a-f0-9]+:	00 00 04 00       	            nop.i 0x0;;
+--- binutils-2.23/ld/testsuite/ld-ia64/merge2.d
++++ binutils-2.23/ld/testsuite/ld-ia64/merge2.d
+@@ -4,7 +4,7 @@
+ #objdump: -d
+ 
+ #...
+-0+1e0 <.text>:
++[a-f0-9]+ <.text>:
+ [ 	]*[a-f0-9]+:	0b 60 80 02 00 24 	\[MMI\]       addl r12=32,r1;;
+ [ 	]*[a-f0-9]+:	c0 c0 04 00 48 00 	            addl r12=24,r1
+ [ 	]*[a-f0-9]+:	00 00 04 00       	            nop.i 0x0;;
+--- binutils-2.23/ld/testsuite/ld-ia64/merge3.d
++++ binutils-2.23/ld/testsuite/ld-ia64/merge3.d
+@@ -4,7 +4,7 @@
+ #objdump: -d
+ 
+ #...
+-0+210 <.text>:
++[a-f0-9]+ <.text>:
+ [ 	]*[a-f0-9]+:	0b 60 80 02 00 24 	\[MMI\]       addl r12=32,r1;;
+ [ 	]*[a-f0-9]+:	c0 40 05 00 48 00 	            addl r12=40,r1
+ [ 	]*[a-f0-9]+:	00 00 04 00       	            nop.i 0x0;;
+--- binutils-2.23/ld/testsuite/ld-ia64/merge4.d
++++ binutils-2.23/ld/testsuite/ld-ia64/merge4.d
+@@ -4,7 +4,7 @@
+ #objdump: -d
+ 
+ #...
+-0+240 <.text>:
++[a-f0-9]+ <.text>:
+ [ 	]*[a-f0-9]+:	0b 60 80 02 00 24 	\[MMI\]       addl r12=32,r1;;
+ [ 	]*[a-f0-9]+:	c0 40 05 00 48 00 	            addl r12=40,r1
+ [ 	]*[a-f0-9]+:	00 00 04 00       	            nop.i 0x0;;
+--- binutils-2.23/ld/testsuite/ld-ia64/merge5.d
++++ binutils-2.23/ld/testsuite/ld-ia64/merge5.d
+@@ -4,7 +4,7 @@
+ #objdump: -d
+ 
+ #...
+-0+270 <.text>:
++[a-f0-9]+ <.text>:
+ [ 	]*[a-f0-9]+:	0b 60 80 02 00 24 	\[MMI\]       addl r12=32,r1;;
+ [ 	]*[a-f0-9]+:	c0 40 05 00 48 00 	            addl r12=40,r1
+ [ 	]*[a-f0-9]+:	00 00 04 00       	            nop.i 0x0;;
+--- binutils-2.23/ld/testsuite/ld-ia64/tlsbin.rd
++++ binutils-2.23/ld/testsuite/ld-ia64/tlsbin.rd
+@@ -36,13 +36,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+ 
+ Program Headers:
+  +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+- +PHDR +0x0+40 0x40+40 0x40+40 0x0+188 0x0+188 R E 0x8
+- +INTERP +0x0+1c8 0x40+1c8 0x40+1c8 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
++ +PHDR +0x0+40 0x40+40 0x40+40 (0x[0-9a-f]+) \1 R E 0x8
++ +INTERP +0x0+([0-9a-f]+) (0x40+\1) \2 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
+ .*Requesting program interpreter.*
+  +LOAD +0x0+ 0x40+ 0x40+ 0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ R E 0x10000
+  +LOAD +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+0[0-9a-f]+ 0x0+0[0-9a-f]+ RW +0x10000
+  +DYNAMIC +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+150 0x0+150 RW +0x8
+  +TLS +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+60 0x0+a0 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+  +IA_64_UNWIND .* R +0x8
+ #...
+ 
+--- binutils-2.23/ld/testsuite/ld-ia64/tlspic.rd
++++ binutils-2.23/ld/testsuite/ld-ia64/tlspic.rd
+@@ -40,6 +40,7 @@ Program Headers:
+  +LOAD +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+0[0-9a-f]+ 0x0+0[0-9a-f]+ RW +0x10000
+  +DYNAMIC +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+140 0x0+140 RW +0x8
+  +TLS +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+60 0x0+80 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+  +IA_64_UNWIND +0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ 0x0+18 0x0+18 R +0x8
+ #...
+ 
+--- binutils-2.23/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
++++ binutils-2.23/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
+@@ -8,9 +8,9 @@
+ .*: +file format.*
+ 
+ Disassembly of section \.text:
+-004000b0 <[^>]*> 3c1c0043 	lui	gp,0x43
+-004000b4 <[^>]*> 279c9ff0 	addiu	gp,gp,-24592
+-004000b8 <[^>]*> afbc0008 	sw	gp,8\(sp\)
++004000d0 <[^>]*> 3c1c0043 	lui	gp,0x43
++004000d4 <[^>]*> 279c9ff0 	addiu	gp,gp,-24592
++004000d8 <[^>]*> afbc0008 	sw	gp,8\(sp\)
+ #...
+ 00408d60 <[^>]*> 3c1c0043 	lui	gp,0x43
+ 00408d64 <[^>]*> 279c2c98 	addiu	gp,gp,11416
+--- binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.sd
++++ binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.sd
+@@ -1,7 +1,7 @@
+ 
+ Elf file type is DYN \(Shared object file\)
+ Entry point .*
+-There are 5 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+ 
+ Program Headers:
+  * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -9,6 +9,7 @@ Program Headers:
+  * LOAD * [^ ]+ * 0x0+00000 * 0x0+00000 [^ ]+ * [^ ]+ * R E * 0x.*
+  * LOAD * [^ ]+ * 0x0+10000 * 0x0+10000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * DYNAMIC * [^ ]+ * 0x0+00400 * 0x0+00400 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+  * NULL * .*
+ 
+  *Section to Segment mapping:
+@@ -18,3 +19,4 @@ Program Headers:
+  *0*2 * \.data \.got *
+  *0*3 * \.dynamic *
+  *0*4 *
++ *0*5 *
+--- binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.sd
++++ binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.sd
+@@ -1,7 +1,7 @@
+ 
+ Elf file type is EXEC \(Executable file\)
+ Entry point 0x44000
+-There are 8 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+ 
+ Program Headers:
+  * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -13,6 +13,7 @@ Program Headers:
+  * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+  * NULL * .*
+ 
+  *Section to Segment mapping:
+@@ -25,3 +26,4 @@ Program Headers:
+  *0*5 *\.got \.data *
+  *0*6 *\.dynamic *
+  *0*7 *
++ *0*8 *
+--- binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.sd
++++ binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.sd
+@@ -1,7 +1,7 @@
+ 
+ Elf file type is EXEC \(Executable file\)
+ Entry point 0x44000
+-There are 8 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+ 
+ Program Headers:
+  * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -13,6 +13,7 @@ Program Headers:
+  * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+  * NULL * .*
+ 
+  *Section to Segment mapping:
+@@ -25,3 +26,4 @@ Program Headers:
+  *0*5 * \.got \.data \.bss *
+  *0*6 * \.dynamic *
+  *0*7 *
++ *0*8 *
+--- binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.sd
++++ binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.sd
+@@ -1,7 +1,7 @@
+ 
+ Elf file type is EXEC \(Executable file\)
+ Entry point 0x44000
+-There are 8 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+ 
+ Program Headers:
+  * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -13,6 +13,7 @@ Program Headers:
+  * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+  * NULL * .*
+ 
+  *Section to Segment mapping:
+@@ -25,3 +26,4 @@ Program Headers:
+  *0*5 * \.got \.data \.bss *
+  *0*6 * \.dynamic *
+  *0*7 *
++ *0*8 *
+--- binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.sd
++++ binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.sd
+@@ -1,7 +1,7 @@
+ 
+ Elf file type is EXEC \(Executable file\)
+ Entry point 0x44000
+-There are 8 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+ 
+ Program Headers:
+  * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -13,6 +13,7 @@ Program Headers:
+  * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+  * NULL * .*
+ 
+  *Section to Segment mapping:
+@@ -25,3 +26,4 @@ Program Headers:
+  *0*5 * \.got \.data \.bss *
+  *0*6 * \.dynamic *
+  *0*7 *
++ *0*8 *
+--- binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.sd
++++ binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.sd
+@@ -1,7 +1,7 @@
+ 
+ Elf file type is EXEC \(Executable file\)
+ Entry point 0x44000
+-There are 7 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+ 
+ Program Headers:
+  * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -12,6 +12,7 @@ Program Headers:
+  * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+  * NULL * .*
+ 
+  *Section to Segment mapping:
+@@ -23,3 +24,4 @@ Program Headers:
+  *0*4 * \.got \.data \.bss *
+  *0*5 * \.dynamic *
+  *0*6 *
++ *0*7 *
+--- binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.sd
++++ binutils-2.23/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.sd
+@@ -1,7 +1,7 @@
+ 
+ Elf file type is EXEC \(Executable file\)
+ Entry point 0x44000
+-There are 8 program headers, starting at offset .*
++There are [0-9] program headers, starting at offset .*
+ 
+ Program Headers:
+  * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
+@@ -13,6 +13,7 @@ Program Headers:
+  * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW  * 0x.*
+  * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
++ * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+  * NULL * .*
+ 
+  *Section to Segment mapping:
+@@ -25,3 +26,4 @@ Program Headers:
+  *0*5 * \.got \.data \.bss *
+  *0*6 * \.dynamic *
+  *0*7 *
++ *0*8 *
+--- binutils-2.23/ld/testsuite/ld-mips-elf/tlsbin-o32.d
++++ binutils-2.23/ld/testsuite/ld-mips-elf/tlsbin-o32.d
+@@ -2,42 +2,42 @@
+ 
+ Disassembly of section .text:
+ 
+-004000d0 <__start>:
+-  4000d0:	3c1c0fc0 	lui	gp,0xfc0
+-  4000d4:	279c7f30 	addiu	gp,gp,32560
+-  4000d8:	0399e021 	addu	gp,gp,t9
+-  4000dc:	27bdfff0 	addiu	sp,sp,-16
+-  4000e0:	afbe0008 	sw	s8,8\(sp\)
+-  4000e4:	03a0f021 	move	s8,sp
+-  4000e8:	afbc0000 	sw	gp,0\(sp\)
+-  4000ec:	8f998018 	lw	t9,-32744\(gp\)
+-  4000f0:	27848028 	addiu	a0,gp,-32728
+-  4000f4:	0320f809 	jalr	t9
+-  4000f8:	00000000 	nop
+-  4000fc:	8fdc0000 	lw	gp,0\(s8\)
+-  400100:	00000000 	nop
+-  400104:	8f998018 	lw	t9,-32744\(gp\)
+-  400108:	27848020 	addiu	a0,gp,-32736
+-  40010c:	0320f809 	jalr	t9
+-  400110:	00000000 	nop
+-  400114:	8fdc0000 	lw	gp,0\(s8\)
+-  400118:	00401021 	move	v0,v0
+-  40011c:	3c030000 	lui	v1,0x0
+-  400120:	24638000 	addiu	v1,v1,-32768
+-  400124:	00621821 	addu	v1,v1,v0
+-  400128:	7c02283b 	rdhwr	v0,\$5
+-  40012c:	8f83801c 	lw	v1,-32740\(gp\)
+-  400130:	00000000 	nop
+-  400134:	00621821 	addu	v1,v1,v0
+-  400138:	7c02283b 	rdhwr	v0,\$5
+-  40013c:	3c030000 	lui	v1,0x0
+-  400140:	24639004 	addiu	v1,v1,-28668
+-  400144:	00621821 	addu	v1,v1,v0
+-  400148:	03c0e821 	move	sp,s8
+-  40014c:	8fbe0008 	lw	s8,8\(sp\)
+-  400150:	03e00008 	jr	ra
+-  400154:	27bd0010 	addiu	sp,sp,16
++00400[0-9a-f]{3} <__start>:
++  400[0-9a-f]{3}:	3c1c0fc0 	lui	gp,0xfc0
++  400[0-9a-f]{3}:	279c7f30 	addiu	gp,gp,32560
++  400[0-9a-f]{3}:	0399e021 	addu	gp,gp,t9
++  400[0-9a-f]{3}:	27bdfff0 	addiu	sp,sp,-16
++  400[0-9a-f]{3}:	afbe0008 	sw	s8,8\(sp\)
++  400[0-9a-f]{3}:	03a0f021 	move	s8,sp
++  400[0-9a-f]{3}:	afbc0000 	sw	gp,0\(sp\)
++  400[0-9a-f]{3}:	8f998018 	lw	t9,-32744\(gp\)
++  400[0-9a-f]{3}:	27848028 	addiu	a0,gp,-32728
++  400[0-9a-f]{3}:	0320f809 	jalr	t9
++  400[0-9a-f]{3}:	00000000 	nop
++  400[0-9a-f]{3}:	8fdc0000 	lw	gp,0\(s8\)
++  400[0-9a-f]{3}:	00000000 	nop
++  400[0-9a-f]{3}:	8f998018 	lw	t9,-32744\(gp\)
++  400[0-9a-f]{3}:	27848020 	addiu	a0,gp,-32736
++  400[0-9a-f]{3}:	0320f809 	jalr	t9
++  400[0-9a-f]{3}:	00000000 	nop
++  400[0-9a-f]{3}:	8fdc0000 	lw	gp,0\(s8\)
++  400[0-9a-f]{3}:	00401021 	move	v0,v0
++  400[0-9a-f]{3}:	3c030000 	lui	v1,0x0
++  400[0-9a-f]{3}:	24638000 	addiu	v1,v1,-32768
++  400[0-9a-f]{3}:	00621821 	addu	v1,v1,v0
++  400[0-9a-f]{3}:	7c02283b 	rdhwr	v0,\$5
++  400[0-9a-f]{3}:	8f83801c 	lw	v1,-32740\(gp\)
++  400[0-9a-f]{3}:	00000000 	nop
++  400[0-9a-f]{3}:	00621821 	addu	v1,v1,v0
++  400[0-9a-f]{3}:	7c02283b 	rdhwr	v0,\$5
++  400[0-9a-f]{3}:	3c030000 	lui	v1,0x0
++  400[0-9a-f]{3}:	24639004 	addiu	v1,v1,-28668
++  400[0-9a-f]{3}:	00621821 	addu	v1,v1,v0
++  400[0-9a-f]{3}:	03c0e821 	move	sp,s8
++  400[0-9a-f]{3}:	8fbe0008 	lw	s8,8\(sp\)
++  400[0-9a-f]{3}:	03e00008 	jr	ra
++  400[0-9a-f]{3}:	27bd0010 	addiu	sp,sp,16
+ 
+-00400158 <__tls_get_addr>:
+-  400158:	03e00008 	jr	ra
+-  40015c:	00000000 	nop
++00400[0-9a-f]{3} <__tls_get_addr>:
++  400[0-9a-f]{3}:	03e00008 	jr	ra
++  400[0-9a-f]{3}:	00000000 	nop
+--- binutils-2.23/ld/testsuite/ld-powerpc/tls.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tls.d
+@@ -9,45 +9,45 @@
+ 
+ Disassembly of section \.text:
+ 
+-0+100000e8 <_start>:
+-    100000e8:	3c 6d 00 00 	addis   r3,r13,0
+-    100000ec:	60 00 00 00 	nop
+-    100000f0:	38 63 90 78 	addi    r3,r3,-28552
+-    100000f4:	3c 6d 00 00 	addis   r3,r13,0
+-    100000f8:	60 00 00 00 	nop
+-    100000fc:	38 63 10 00 	addi    r3,r3,4096
+-    10000100:	3c 6d 00 00 	addis   r3,r13,0
+-    10000104:	60 00 00 00 	nop
+-    10000108:	38 63 90 40 	addi    r3,r3,-28608
+-    1000010c:	3c 6d 00 00 	addis   r3,r13,0
+-    10000110:	60 00 00 00 	nop
+-    10000114:	38 63 10 00 	addi    r3,r3,4096
+-    10000118:	39 23 80 48 	addi    r9,r3,-32696
+-    1000011c:	3d 23 00 00 	addis   r9,r3,0
+-    10000120:	81 49 80 50 	lwz     r10,-32688\(r9\)
+-    10000124:	e9 22 80 10 	ld      r9,-32752\(r2\)
+-    10000128:	7d 49 18 2a 	ldx     r10,r9,r3
+-    1000012c:	3d 2d 00 00 	addis   r9,r13,0
+-    10000130:	a1 49 90 60 	lhz     r10,-28576\(r9\)
+-    10000134:	89 4d 90 68 	lbz     r10,-28568\(r13\)
+-    10000138:	3d 2d 00 00 	addis   r9,r13,0
+-    1000013c:	99 49 90 70 	stb     r10,-28560\(r9\)
+-    10000140:	3c 6d 00 00 	addis   r3,r13,0
+-    10000144:	60 00 00 00 	nop
+-    10000148:	38 63 90 00 	addi    r3,r3,-28672
+-    1000014c:	3c 6d 00 00 	addis   r3,r13,0
+-    10000150:	60 00 00 00 	nop
+-    10000154:	38 63 10 00 	addi    r3,r3,4096
+-    10000158:	f9 43 80 08 	std     r10,-32760\(r3\)
+-    1000015c:	3d 23 00 00 	addis   r9,r3,0
+-    10000160:	91 49 80 10 	stw     r10,-32752\(r9\)
+-    10000164:	e9 22 80 08 	ld      r9,-32760\(r2\)
+-    10000168:	7d 49 19 2a 	stdx    r10,r9,r3
+-    1000016c:	3d 2d 00 00 	addis   r9,r13,0
+-    10000170:	b1 49 90 60 	sth     r10,-28576\(r9\)
+-    10000174:	e9 4d 90 2a 	lwa     r10,-28632\(r13\)
+-    10000178:	3d 2d 00 00 	addis   r9,r13,0
+-    1000017c:	a9 49 90 30 	lha     r10,-28624\(r9\)
++0+10000[0-9a-f]{3} <_start>:
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 90 78 	addi    r3,r3,-28552
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 10 00 	addi    r3,r3,4096
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 90 40 	addi    r3,r3,-28608
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 10 00 	addi    r3,r3,4096
++    10000[0-9a-f]{3}:	39 23 80 48 	addi    r9,r3,-32696
++    10000[0-9a-f]{3}:	3d 23 00 00 	addis   r9,r3,0
++    10000[0-9a-f]{3}:	81 49 80 50 	lwz     r10,-32688\(r9\)
++    10000[0-9a-f]{3}:	e9 22 80 10 	ld      r9,-32752\(r2\)
++    10000[0-9a-f]{3}:	7d 49 18 2a 	ldx     r10,r9,r3
++    10000[0-9a-f]{3}:	3d 2d 00 00 	addis   r9,r13,0
++    10000[0-9a-f]{3}:	a1 49 90 60 	lhz     r10,-28576\(r9\)
++    10000[0-9a-f]{3}:	89 4d 90 68 	lbz     r10,-28568\(r13\)
++    10000[0-9a-f]{3}:	3d 2d 00 00 	addis   r9,r13,0
++    10000[0-9a-f]{3}:	99 49 90 70 	stb     r10,-28560\(r9\)
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 90 00 	addi    r3,r3,-28672
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 10 00 	addi    r3,r3,4096
++    10000[0-9a-f]{3}:	f9 43 80 08 	std     r10,-32760\(r3\)
++    10000[0-9a-f]{3}:	3d 23 00 00 	addis   r9,r3,0
++    10000[0-9a-f]{3}:	91 49 80 10 	stw     r10,-32752\(r9\)
++    10000[0-9a-f]{3}:	e9 22 80 08 	ld      r9,-32760\(r2\)
++    10000[0-9a-f]{3}:	7d 49 19 2a 	stdx    r10,r9,r3
++    10000[0-9a-f]{3}:	3d 2d 00 00 	addis   r9,r13,0
++    10000[0-9a-f]{3}:	b1 49 90 60 	sth     r10,-28576\(r9\)
++    10000[0-9a-f]{3}:	e9 4d 90 2a 	lwa     r10,-28632\(r13\)
++    10000[0-9a-f]{3}:	3d 2d 00 00 	addis   r9,r13,0
++    10000[0-9a-f]{3}:	a9 49 90 30 	lha     r10,-28624\(r9\)
+ 
+-0+10000180 <\.__tls_get_addr>:
+-    10000180:	4e 80 00 20 	blr
++0+10000[0-9a-f]{3} <\.__tls_get_addr>:
++    10000[0-9a-f]{3}:	4e 80 00 20 	blr
+--- binutils-2.23/ld/testsuite/ld-powerpc/tls.g
++++ binutils-2.23/ld/testsuite/ld-powerpc/tls.g
+@@ -8,5 +8,5 @@
+ .*: +file format elf64-powerpc
+ 
+ Contents of section \.got:
+- 100101e0 00000000 100181e0 ffffffff ffff8018  .*
+- 100101f0 ffffffff ffff8058                    .*
++ 10010([0-9a-f]{3}) 00000000 10018\1 ffffffff ffff8018  .*
++ 10010[0-9a-f]{3} ffffffff ffff8058                    .*
+--- binutils-2.23/ld/testsuite/ld-powerpc/tls32.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tls32.d
+@@ -9,42 +9,42 @@
+ 
+ Disassembly of section \.text:
+ 
+-0+1800094 <_start>:
+- 1800094:	3c 62 00 00 	addis   r3,r2,0
+- 1800098:	38 63 90 3c 	addi    r3,r3,-28612
+- 180009c:	3c 62 00 00 	addis   r3,r2,0
+- 18000a0:	38 63 10 00 	addi    r3,r3,4096
+- 18000a4:	3c 62 00 00 	addis   r3,r2,0
+- 18000a8:	38 63 90 20 	addi    r3,r3,-28640
+- 18000ac:	3c 62 00 00 	addis   r3,r2,0
+- 18000b0:	38 63 10 00 	addi    r3,r3,4096
+- 18000b4:	39 23 80 24 	addi    r9,r3,-32732
+- 18000b8:	3d 23 00 00 	addis   r9,r3,0
+- 18000bc:	81 49 80 28 	lwz     r10,-32728\(r9\)
+- 18000c0:	3d 22 00 00 	addis   r9,r2,0
+- 18000c4:	a1 49 90 30 	lhz     r10,-28624\(r9\)
+- 18000c8:	89 42 90 34 	lbz     r10,-28620\(r2\)
+- 18000cc:	3d 22 00 00 	addis   r9,r2,0
+- 18000d0:	99 49 90 38 	stb     r10,-28616\(r9\)
+- 18000d4:	3c 62 00 00 	addis   r3,r2,0
+- 18000d8:	38 63 90 00 	addi    r3,r3,-28672
+- 18000dc:	3c 62 00 00 	addis   r3,r2,0
+- 18000e0:	38 63 10 00 	addi    r3,r3,4096
+- 18000e4:	91 43 80 04 	stw     r10,-32764\(r3\)
+- 18000e8:	3d 23 00 00 	addis   r9,r3,0
+- 18000ec:	91 49 80 08 	stw     r10,-32760\(r9\)
+- 18000f0:	3d 22 00 00 	addis   r9,r2,0
+- 18000f4:	b1 49 90 30 	sth     r10,-28624\(r9\)
+- 18000f8:	a1 42 90 14 	lhz     r10,-28652\(r2\)
+- 18000fc:	3d 22 00 00 	addis   r9,r2,0
+- 1800100:	a9 49 90 18 	lha     r10,-28648\(r9\)
++0+1800[0-9a-f]{3} <_start>:
++ 1800[0-9a-f]{3}:	3c 62 00 00 	addis   r3,r2,0
++ 1800[0-9a-f]{3}:	38 63 90 3c 	addi    r3,r3,-28612
++ 1800[0-9a-f]{3}:	3c 62 00 00 	addis   r3,r2,0
++ 1800[0-9a-f]{3}:	38 63 10 00 	addi    r3,r3,4096
++ 1800[0-9a-f]{3}:	3c 62 00 00 	addis   r3,r2,0
++ 1800[0-9a-f]{3}:	38 63 90 20 	addi    r3,r3,-28640
++ 1800[0-9a-f]{3}:	3c 62 00 00 	addis   r3,r2,0
++ 1800[0-9a-f]{3}:	38 63 10 00 	addi    r3,r3,4096
++ 1800[0-9a-f]{3}:	39 23 80 24 	addi    r9,r3,-32732
++ 1800[0-9a-f]{3}:	3d 23 00 00 	addis   r9,r3,0
++ 1800[0-9a-f]{3}:	81 49 80 28 	lwz     r10,-32728\(r9\)
++ 1800[0-9a-f]{3}:	3d 22 00 00 	addis   r9,r2,0
++ 1800[0-9a-f]{3}:	a1 49 90 30 	lhz     r10,-28624\(r9\)
++ 1800[0-9a-f]{3}:	89 42 90 34 	lbz     r10,-28620\(r2\)
++ 1800[0-9a-f]{3}:	3d 22 00 00 	addis   r9,r2,0
++ 1800[0-9a-f]{3}:	99 49 90 38 	stb     r10,-28616\(r9\)
++ 1800[0-9a-f]{3}:	3c 62 00 00 	addis   r3,r2,0
++ 1800[0-9a-f]{3}:	38 63 90 00 	addi    r3,r3,-28672
++ 1800[0-9a-f]{3}:	3c 62 00 00 	addis   r3,r2,0
++ 1800[0-9a-f]{3}:	38 63 10 00 	addi    r3,r3,4096
++ 1800[0-9a-f]{3}:	91 43 80 04 	stw     r10,-32764\(r3\)
++ 1800[0-9a-f]{3}:	3d 23 00 00 	addis   r9,r3,0
++ 1800[0-9a-f]{3}:	91 49 80 08 	stw     r10,-32760\(r9\)
++ 1800[0-9a-f]{3}:	3d 22 00 00 	addis   r9,r2,0
++ 1800[0-9a-f]{3}:	b1 49 90 30 	sth     r10,-28624\(r9\)
++ 1800[0-9a-f]{3}:	a1 42 90 14 	lhz     r10,-28652\(r2\)
++ 1800[0-9a-f]{3}:	3d 22 00 00 	addis   r9,r2,0
++ 1800[0-9a-f]{3}:	a9 49 90 18 	lha     r10,-28648\(r9\)
+ 
+-0+1800104 <__tls_get_addr>:
+- 1800104:	4e 80 00 20 	blr
++0+1800[0-9a-f]{3} <__tls_get_addr>:
++ 1800[0-9a-f]{3}:	4e 80 00 20 	blr
+ Disassembly of section \.got:
+ 
+-0+1810128 <_GLOBAL_OFFSET_TABLE_-0x4>:
+- 1810128:	4e 80 00 21 	blrl
++0+1810[0-9a-f]{3} <_GLOBAL_OFFSET_TABLE_-0x4>:
++ 1810[0-9a-f]{3}:	4e 80 00 21 	blrl
+ 
+-0+181012c <_GLOBAL_OFFSET_TABLE_>:
++0+1810[0-9a-f]{3} <_GLOBAL_OFFSET_TABLE_>:
+ 	\.\.\.
+--- binutils-2.23/ld/testsuite/ld-powerpc/tls32.g
++++ binutils-2.23/ld/testsuite/ld-powerpc/tls32.g
+@@ -8,4 +8,4 @@
+ .*: +file format elf32-powerpc
+ 
+ Contents of section \.got:
+- 1810128 4e800021 00000000 00000000 00000000  .*
++ 18101[0-9a-f]{2} 4e800021 00000000 00000000 00000000  .*
+--- binutils-2.23/ld/testsuite/ld-powerpc/tls32.t
++++ binutils-2.23/ld/testsuite/ld-powerpc/tls32.t
+@@ -8,5 +8,5 @@
+ .*: +file format elf32-powerpc
+ 
+ Contents of section \.tdata:
+- 1810108 12345678 23456789 3456789a 456789ab  .*
+- 1810118 56789abc 6789abcd 789abcde 00c0ffee  .*
++ 18101[0-9a-f]{2} 12345678 23456789 3456789a 456789ab  .*
++ 18101[0-9a-f]{2} 56789abc 6789abcd 789abcde 00c0ffee  .*
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsexe32.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsexe32.d
+@@ -44,4 +44,4 @@ Disassembly of section \.got:
+ .*:	4e 80 00 21 	blrl
+ 
+ .* <_GLOBAL_OFFSET_TABLE_>:
+-.*:	01 81 02 b8 00 00 00 00 00 00 00 00  .*
++.*:	01 81 02 [bd]8 00 00 00 00 00 00 00 00  .*
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsexe32.g
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsexe32.g
+@@ -8,4 +8,4 @@
+ 
+ Contents of section \.got:
+ .* 00000000 00000000 00000000 4e800021  .*
+-.* 018102b8 00000000 00000000           .*
++.* 018102[bd]8 00000000 00000000           .*
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsexe32.r
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsexe32.r
+@@ -33,13 +33,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+ 
+ Program Headers:
+  +Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
+- +PHDR +0x000034 0x01800034 0x01800034 0x000c0 0x000c0 R E 0x4
+- +INTERP +0x0000f4 0x018000f4 0x018000f4 0x00011 0x00011 R +0x1
++ +PHDR +0x000034 0x01800034 0x01800034 (0x000[0-9a-f]{2}) \1 R E 0x4
++ +INTERP +0x000([0-9a-f]{3}) 0x01800\1 0x01800\1 0x00011 0x00011 R +0x1
+  +\[Requesting program interpreter: .*\]
+  +LOAD .* R E 0x10000
+  +LOAD .* RWE 0x10000
+  +DYNAMIC .* RW +0x4
+  +TLS .* 0x0001c 0x00038 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections\.\.\.
+@@ -49,6 +50,7 @@ Program Headers:
+  +03 +\.tdata \.dynamic \.got \.plt 
+  +04 +\.dynamic 
+  +05 +\.tdata \.tbss 
++ +06 +
+ 
+ Relocation section '\.rela\.dyn' at offset .* contains 2 entries:
+  Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsmark.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsmark.d
+@@ -9,29 +9,29 @@
+ 
+ Disassembly of section \.text:
+ 
+-0+100000e8 <_start>:
+-    100000e8:	48 00 00 18 	b       10000100 <_start\+0x18>
+-    100000ec:	60 00 00 00 	nop
+-    100000f0:	38 63 90 00 	addi    r3,r3,-28672
+-    100000f4:	e8 83 00 00 	ld      r4,0\(r3\)
+-    100000f8:	3c 6d 00 00 	addis   r3,r13,0
+-    100000fc:	48 00 00 0c 	b       10000108 <_start\+0x20>
+-    10000100:	3c 6d 00 00 	addis   r3,r13,0
+-    10000104:	4b ff ff e8 	b       100000ec <_start\+0x4>
+-    10000108:	60 00 00 00 	nop
+-    1000010c:	38 63 10 00 	addi    r3,r3,4096
+-    10000110:	e8 83 80 00 	ld      r4,-32768\(r3\)
+-    10000114:	3c 6d 00 00 	addis   r3,r13,0
+-    10000118:	48 00 00 0c 	b       10000124 <_start\+0x3c>
+-    1000011c:	3c 6d 00 00 	addis   r3,r13,0
+-    10000120:	48 00 00 14 	b       10000134 <_start\+0x4c>
+-    10000124:	60 00 00 00 	nop
+-    10000128:	38 63 90 04 	addi    r3,r3,-28668
+-    1000012c:	e8 a3 00 00 	ld      r5,0\(r3\)
+-    10000130:	4b ff ff ec 	b       1000011c <_start\+0x34>
+-    10000134:	60 00 00 00 	nop
+-    10000138:	38 63 10 00 	addi    r3,r3,4096
+-    1000013c:	e8 a3 80 04 	ld      r5,-32764\(r3\)
++0+10000[0-9a-f]{3} <_start>:
++    10000[0-9a-f]{3}:	48 00 00 18 	b       10000[0-9a-f]{3} <_start\+0x18>
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 90 00 	addi    r3,r3,-28672
++    10000[0-9a-f]{3}:	e8 83 00 00 	ld      r4,0\(r3\)
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	48 00 00 0c 	b       10000[0-9a-f]{3} <_start\+0x20>
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	4b ff ff e8 	b       10000[0-9a-f]{3} <_start\+0x4>
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 10 00 	addi    r3,r3,4096
++    10000[0-9a-f]{3}:	e8 83 80 00 	ld      r4,-32768\(r3\)
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	48 00 00 0c 	b       10000[0-9a-f]{3} <_start\+0x3c>
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	48 00 00 14 	b       10000[0-9a-f]{3} <_start\+0x4c>
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 90 04 	addi    r3,r3,-28668
++    10000[0-9a-f]{3}:	e8 a3 00 00 	ld      r5,0\(r3\)
++    10000[0-9a-f]{3}:	4b ff ff ec 	b       10000[0-9a-f]{3} <_start\+0x34>
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 10 00 	addi    r3,r3,4096
++    10000[0-9a-f]{3}:	e8 a3 80 04 	ld      r5,-32764\(r3\)
+ 
+-0+10000140 <\.__tls_get_addr>:
+-    10000140:	4e 80 00 20 	blr
++0+10000[0-9a-f]{3} <\.__tls_get_addr>:
++    10000[0-9a-f]{3}:	4e 80 00 20 	blr
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsmark32.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsmark32.d
+@@ -9,17 +9,17 @@
+ 
+ Disassembly of section \.text:
+ 
+-0+1800094 <_start>:
+- 1800094:	48 00 00 14 	b       18000a8 <_start\+0x14>
+- 1800098:	38 63 90 00 	addi    r3,r3,-28672
+- 180009c:	80 83 00 00 	lwz     r4,0\(r3\)
+- 18000a0:	3c 62 00 00 	addis   r3,r2,0
+- 18000a4:	48 00 00 0c 	b       18000b0 <_start\+0x1c>
+- 18000a8:	3c 62 00 00 	addis   r3,r2,0
+- 18000ac:	4b ff ff ec 	b       1800098 <_start\+0x4>
+- 18000b0:	38 63 10 00 	addi    r3,r3,4096
+- 18000b4:	80 83 80 00 	lwz     r4,-32768\(r3\)
++0+18000[0-9a-f]{2} <_start>:
++ 18000[0-9a-f]{2}:	48 00 00 14 	b       18000[0-9a-f]{2} <_start\+0x14>
++ 18000[0-9a-f]{2}:	38 63 90 00 	addi    r3,r3,-28672
++ 18000[0-9a-f]{2}:	80 83 00 00 	lwz     r4,0\(r3\)
++ 18000[0-9a-f]{2}:	3c 62 00 00 	addis   r3,r2,0
++ 18000[0-9a-f]{2}:	48 00 00 0c 	b       18000[0-9a-f]{2} <_start\+0x1c>
++ 18000[0-9a-f]{2}:	3c 62 00 00 	addis   r3,r2,0
++ 18000[0-9a-f]{2}:	4b ff ff ec 	b       18000[0-9a-f]{2} <_start\+0x4>
++ 18000[0-9a-f]{2}:	38 63 10 00 	addi    r3,r3,4096
++ 18000[0-9a-f]{2}:	80 83 80 00 	lwz     r4,-32768\(r3\)
+ 
+-0+18000b8 <__tls_get_addr>:
+- 18000b8:	4e 80 00 20 	blr
+-#pass
+\ No newline at end of file
++0+18000[0-9a-f]{2} <__tls_get_addr>:
++ 18000[0-9a-f]{2}:	4e 80 00 20 	blr
++#pass
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsopt1.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsopt1.d
+@@ -9,17 +9,17 @@
+ 
+ Disassembly of section \.text:
+ 
+-0+100000e8 <\.__tls_get_addr>:
+-    100000e8:	4e 80 00 20 	blr
++0+10000[0-9a-f]{3} <\.__tls_get_addr>:
++    10000[0-9a-f]{3}:	4e 80 00 20 	blr
+ 
+ Disassembly of section \.no_opt1:
+ 
+-0+100000ec <\.no_opt1>:
+-    100000ec:	38 62 80 08 	addi    r3,r2,-32760
+-    100000f0:	2c 24 00 00 	cmpdi   r4,0
+-    100000f4:	41 82 00 10 	beq-    .*
+-    100000f8:	4b ff ff f1 	bl      100000e8 <\.__tls_get_addr>
+-    100000fc:	60 00 00 00 	nop
+-    10000100:	48 00 00 0c 	b       .*
+-    10000104:	4b ff ff e5 	bl      100000e8 <\.__tls_get_addr>
+-    10000108:	60 00 00 00 	nop
++0+10000[0-9a-f]{3} <\.no_opt1>:
++    10000[0-9a-f]{3}:	38 62 80 08 	addi    r3,r2,-32760
++    10000[0-9a-f]{3}:	2c 24 00 00 	cmpdi   r4,0
++    10000[0-9a-f]{3}:	41 82 00 10 	beq-    .*
++    10000[0-9a-f]{3}:	4b ff ff f1 	bl      10000[0-9a-f]{3} <\.__tls_get_addr>
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	48 00 00 0c 	b       .*
++    10000[0-9a-f]{3}:	4b ff ff e5 	bl      10000[0-9a-f]{3} <\.__tls_get_addr>
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsopt1_32.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsopt1_32.d
+@@ -9,16 +9,16 @@
+ 
+ Disassembly of section \.text:
+ 
+-0+1800094 <__tls_get_addr>:
+- 1800094:	4e 80 00 20 	blr
++0+18000[0-9a-f]{2} <__tls_get_addr>:
++ 18000[0-9a-f]{2}:	4e 80 00 20 	blr
+ 
+ Disassembly of section \.no_opt1:
+ 
+-0+1800098 <\.no_opt1>:
+- 1800098:	38 6d ff f4 	addi    r3,r13,-12
+- 180009c:	2c 04 00 00 	cmpwi   r4,0
+- 18000a0:	41 82 00 0c 	beq-    .*
+- 18000a4:	4b ff ff f1 	bl      1800094 <__tls_get_addr>
+- 18000a8:	48 00 00 08 	b       .*
+- 18000ac:	4b ff ff e9 	bl      1800094 <__tls_get_addr>
++0+18000[0-9a-f]{2} <\.no_opt1>:
++ 18000[0-9a-f]{2}:	38 6d ff f4 	addi    r3,r13,-12
++ 18000[0-9a-f]{2}:	2c 04 00 00 	cmpwi   r4,0
++ 18000[0-9a-f]{2}:	41 82 00 0c 	beq-    .*
++ 18000[0-9a-f]{2}:	4b ff ff f1 	bl      18000[0-9a-f]{2} <__tls_get_addr>
++ 18000[0-9a-f]{2}:	48 00 00 08 	b       .*
++ 18000[0-9a-f]{2}:	4b ff ff e9 	bl      18000[0-9a-f]{2} <__tls_get_addr>
+ #pass
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsopt2.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsopt2.d
+@@ -9,15 +9,15 @@
+ 
+ Disassembly of section \.text:
+ 
+-0+100000e8 <\.__tls_get_addr>:
+-    100000e8:	4e 80 00 20 	blr
++0+10000[0-9a-f]{3} <\.__tls_get_addr>:
++    10000[0-9a-f]{3}:	4e 80 00 20 	blr
+ 
+ Disassembly of section \.no_opt2:
+ 
+-0+100000ec <\.no_opt2>:
+-    100000ec:	38 62 80 08 	addi    r3,r2,-32760
+-    100000f0:	2c 24 00 00 	cmpdi   r4,0
+-    100000f4:	41 82 00 08 	beq-    .*
+-    100000f8:	38 62 80 08 	addi    r3,r2,-32760
+-    100000fc:	4b ff ff ed 	bl      100000e8 <\.__tls_get_addr>
+-    10000100:	60 00 00 00 	nop
++0+10000[0-9a-f]{3} <\.no_opt2>:
++    10000[0-9a-f]{3}:	38 62 80 08 	addi    r3,r2,-32760
++    10000[0-9a-f]{3}:	2c 24 00 00 	cmpdi   r4,0
++    10000[0-9a-f]{3}:	41 82 00 08 	beq-    .*
++    10000[0-9a-f]{3}:	38 62 80 08 	addi    r3,r2,-32760
++    10000[0-9a-f]{3}:	4b ff ff ed 	bl      10000[0-9a-f]{3} <\.__tls_get_addr>
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsopt2_32.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsopt2_32.d
+@@ -9,15 +9,15 @@
+ 
+ Disassembly of section \.text:
+ 
+-0+1800094 <__tls_get_addr>:
+- 1800094:	4e 80 00 20 	blr
++0+18000[0-9a-f]{2} <__tls_get_addr>:
++ 18000[0-9a-f]{2}:	4e 80 00 20 	blr
+ 
+ Disassembly of section \.no_opt2:
+ 
+-0+1800098 <\.no_opt2>:
+- 1800098:	38 6d ff f4 	addi    r3,r13,-12
+- 180009c:	2c 04 00 00 	cmpwi   r4,0
+- 18000a0:	41 82 00 08 	beq-    .*
+- 18000a4:	38 6d ff f4 	addi    r3,r13,-12
+- 18000a8:	4b ff ff ed 	bl      1800094 <__tls_get_addr>
++0+18000[0-9a-f]{2} <\.no_opt2>:
++ 18000[0-9a-f]{2}:	38 6d ff f4 	addi    r3,r13,-12
++ 18000[0-9a-f]{2}:	2c 04 00 00 	cmpwi   r4,0
++ 18000[0-9a-f]{2}:	41 82 00 08 	beq-    .*
++ 18000[0-9a-f]{2}:	38 6d ff f4 	addi    r3,r13,-12
++ 18000[0-9a-f]{2}:	4b ff ff ed 	bl      18000[0-9a-f]{2} <__tls_get_addr>
+ #pass
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsopt3.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsopt3.d
+@@ -9,18 +9,18 @@
+ 
+ Disassembly of section \.text:
+ 
+-00000000100000e8 <\.__tls_get_addr>:
+-    100000e8:	4e 80 00 20 	blr
++0000000010000[0-9a-f]{3} <\.__tls_get_addr>:
++    10000[0-9a-f]{3}:	4e 80 00 20 	blr
+ 
+ Disassembly of section \.no_opt3:
+ 
+-00000000100000ec <\.no_opt3>:
+-    100000ec:	38 62 80 08 	addi    r3,r2,-32760
+-    100000f0:	48 00 00 0c 	b       .*
+-    100000f4:	38 62 80 18 	addi    r3,r2,-32744
+-    100000f8:	48 00 00 10 	b       .*
+-    100000fc:	4b ff ff ed 	bl      100000e8 <\.__tls_get_addr>
+-    10000100:	60 00 00 00 	nop
+-    10000104:	48 00 00 0c 	b       .*
+-    10000108:	4b ff ff e1 	bl      100000e8 <\.__tls_get_addr>
+-    1000010c:	60 00 00 00 	nop
++0000000010000[0-9a-f]{3} <\.no_opt3>:
++    10000[0-9a-f]{3}:	38 62 80 08 	addi    r3,r2,-32760
++    10000[0-9a-f]{3}:	48 00 00 0c 	b       .*
++    10000[0-9a-f]{3}:	38 62 80 18 	addi    r3,r2,-32744
++    10000[0-9a-f]{3}:	48 00 00 10 	b       .*
++    10000[0-9a-f]{3}:	4b ff ff ed 	bl      10000[0-9a-f]{3} <\.__tls_get_addr>
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	48 00 00 0c 	b       .*
++    10000[0-9a-f]{3}:	4b ff ff e1 	bl      10000[0-9a-f]{3} <\.__tls_get_addr>
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsopt3_32.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsopt3_32.d
+@@ -9,17 +9,17 @@
+ 
+ Disassembly of section \.text:
+ 
+-0+1800094 <__tls_get_addr>:
+- 1800094:	4e 80 00 20 	blr
++0+18000[0-9a-f]{2} <__tls_get_addr>:
++ 18000[0-9a-f]{2}:	4e 80 00 20 	blr
+ 
+ Disassembly of section \.no_opt3:
+ 
+-0+1800098 <\.no_opt3>:
+- 1800098:	38 6d ff ec 	addi    r3,r13,-20
+- 180009c:	48 00 00 0c 	b       .*
+- 18000a0:	38 6d ff f4 	addi    r3,r13,-12
+- 18000a4:	48 00 00 0c 	b       .*
+- 18000a8:	4b ff ff ed 	bl      1800094 <__tls_get_addr>
+- 18000ac:	48 00 00 08 	b       .*
+- 18000b0:	4b ff ff e5 	bl      1800094 <__tls_get_addr>
++0+18000[0-9a-f]{2} <\.no_opt3>:
++ 18000[0-9a-f]{2}:	38 6d ff ec 	addi    r3,r13,-20
++ 18000[0-9a-f]{2}:	48 00 00 0c 	b       .*
++ 18000[0-9a-f]{2}:	38 6d ff f4 	addi    r3,r13,-12
++ 18000[0-9a-f]{2}:	48 00 00 0c 	b       .*
++ 18000[0-9a-f]{2}:	4b ff ff ed 	bl      18000[0-9a-f]{2} <__tls_get_addr>
++ 18000[0-9a-f]{2}:	48 00 00 08 	b       .*
++ 18000[0-9a-f]{2}:	4b ff ff e5 	bl      18000[0-9a-f]{2} <__tls_get_addr>
+ #pass
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsopt4.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsopt4.d
+@@ -9,40 +9,40 @@
+ 
+ Disassembly of section \.text:
+ 
+-0+100000e8 <\.__tls_get_addr>:
+-    100000e8:	4e 80 00 20 	blr
++0+10000[0-9a-f]{3} <\.__tls_get_addr>:
++    10000[0-9a-f]{3}:	4e 80 00 20 	blr
+ 
+ Disassembly of section \.opt1:
+ 
+-0+100000ec <\.opt1>:
+-    100000ec:	3c 6d 00 00 	addis   r3,r13,0
+-    100000f0:	2c 24 00 00 	cmpdi   r4,0
+-    100000f4:	41 82 00 10 	beq-    .*
+-    100000f8:	60 00 00 00 	nop
+-    100000fc:	38 63 90 10 	addi    r3,r3,-28656
+-    10000100:	48 00 00 0c 	b       .*
+-    10000104:	60 00 00 00 	nop
+-    10000108:	38 63 90 10 	addi    r3,r3,-28656
++0+10000[0-9a-f]{3} <\.opt1>:
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	2c 24 00 00 	cmpdi   r4,0
++    10000[0-9a-f]{3}:	41 82 00 10 	beq-    .*
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 90 10 	addi    r3,r3,-28656
++    10000[0-9a-f]{3}:	48 00 00 0c 	b       .*
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 90 10 	addi    r3,r3,-28656
+ 
+ Disassembly of section \.opt2:
+ 
+-0+1000010c <\.opt2>:
+-    1000010c:	3c 6d 00 00 	addis   r3,r13,0
+-    10000110:	2c 24 00 00 	cmpdi   r4,0
+-    10000114:	41 82 00 08 	beq-    .*
+-    10000118:	3c 6d 00 00 	addis   r3,r13,0
+-    1000011c:	60 00 00 00 	nop
+-    10000120:	38 63 90 10 	addi    r3,r3,-28656
++0+10000[0-9a-f]{3} <\.opt2>:
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	2c 24 00 00 	cmpdi   r4,0
++    10000[0-9a-f]{3}:	41 82 00 08 	beq-    .*
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 90 10 	addi    r3,r3,-28656
+ 
+ Disassembly of section \.opt3:
+ 
+-0+10000124 <\.opt3>:
+-    10000124:	3c 6d 00 00 	addis   r3,r13,0
+-    10000128:	48 00 00 0c 	b       .*
+-    1000012c:	3c 6d 00 00 	addis   r3,r13,0
+-    10000130:	48 00 00 10 	b       .*
+-    10000134:	60 00 00 00 	nop
+-    10000138:	38 63 90 10 	addi    r3,r3,-28656
+-    1000013c:	48 00 00 0c 	b       .*
+-    10000140:	60 00 00 00 	nop
+-    10000144:	38 63 90 08 	addi    r3,r3,-28664
++0+10000[0-9a-f]{3} <\.opt3>:
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	48 00 00 0c 	b       .*
++    10000[0-9a-f]{3}:	3c 6d 00 00 	addis   r3,r13,0
++    10000[0-9a-f]{3}:	48 00 00 10 	b       .*
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 90 10 	addi    r3,r3,-28656
++    10000[0-9a-f]{3}:	48 00 00 0c 	b       .*
++    10000[0-9a-f]{3}:	60 00 00 00 	nop
++    10000[0-9a-f]{3}:	38 63 90 08 	addi    r3,r3,-28664
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsopt4_32.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsopt4_32.d
+@@ -9,36 +9,36 @@
+ 
+ Disassembly of section \.text:
+ 
+-0+1800094 <__tls_get_addr>:
+- 1800094:	4e 80 00 20 	blr
++0+18000[0-9a-f]{2} <__tls_get_addr>:
++ 18000[0-9a-f]{2}:	4e 80 00 20 	blr
+ 
+ Disassembly of section \.opt1:
+ 
+-0+1800098 <\.opt1>:
+- 1800098:	3c 62 00 00 	addis   r3,r2,0
+- 180009c:	2c 04 00 00 	cmpwi   r4,0
+- 18000a0:	41 82 00 0c 	beq-    .*
+- 18000a4:	38 63 90 10 	addi    r3,r3,-28656
+- 18000a8:	48 00 00 08 	b       .*
+- 18000ac:	38 63 90 10 	addi    r3,r3,-28656
++0+18000[0-9a-f]{2} <\.opt1>:
++ 18000[0-9a-f]{2}:	3c 62 00 00 	addis   r3,r2,0
++ 18000[0-9a-f]{2}:	2c 04 00 00 	cmpwi   r4,0
++ 18000[0-9a-f]{2}:	41 82 00 0c 	beq-    .*
++ 18000[0-9a-f]{2}:	38 63 90 10 	addi    r3,r3,-28656
++ 18000[0-9a-f]{2}:	48 00 00 08 	b       .*
++ 18000[0-9a-f]{2}:	38 63 90 10 	addi    r3,r3,-28656
+ 
+ Disassembly of section \.opt2:
+ 
+-0+18000b0 <\.opt2>:
+- 18000b0:	3c 62 00 00 	addis   r3,r2,0
+- 18000b4:	2c 04 00 00 	cmpwi   r4,0
+- 18000b8:	41 82 00 08 	beq-    .*
+- 18000bc:	3c 62 00 00 	addis   r3,r2,0
+- 18000c0:	38 63 90 10 	addi    r3,r3,-28656
++0+18000[0-9a-f]{2} <\.opt2>:
++ 18000[0-9a-f]{2}:	3c 62 00 00 	addis   r3,r2,0
++ 18000[0-9a-f]{2}:	2c 04 00 00 	cmpwi   r4,0
++ 18000[0-9a-f]{2}:	41 82 00 08 	beq-    .*
++ 18000[0-9a-f]{2}:	3c 62 00 00 	addis   r3,r2,0
++ 18000[0-9a-f]{2}:	38 63 90 10 	addi    r3,r3,-28656
+ 
+ Disassembly of section \.opt3:
+ 
+-0+18000c4 <\.opt3>:
+- 18000c4:	3c 62 00 00 	addis   r3,r2,0
+- 18000c8:	48 00 00 0c 	b       .*
+- 18000cc:	3c 62 00 00 	addis   r3,r2,0
+- 18000d0:	48 00 00 0c 	b       .*
+- 18000d4:	38 63 90 10 	addi    r3,r3,-28656
+- 18000d8:	48 00 00 08 	b       .*
+- 18000dc:	38 63 90 08 	addi    r3,r3,-28664
++0+18000[0-9a-f]{2} <\.opt3>:
++ 18000[0-9a-f]{2}:	3c 62 00 00 	addis   r3,r2,0
++ 18000[0-9a-f]{2}:	48 00 00 0c 	b       .*
++ 18000[0-9a-f]{2}:	3c 62 00 00 	addis   r3,r2,0
++ 18000[0-9a-f]{2}:	48 00 00 0c 	b       .*
++ 18000[0-9a-f]{2}:	38 63 90 10 	addi    r3,r3,-28656
++ 18000[0-9a-f]{2}:	48 00 00 08 	b       .*
++ 18000[0-9a-f]{2}:	38 63 90 08 	addi    r3,r3,-28664
+ #pass
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsso32.d
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsso32.d
+@@ -42,5 +42,5 @@ Disassembly of section \.got:
+ #...
+ .*:	4e 80 00 21 	blrl
+ .* <_GLOBAL_OFFSET_TABLE_>:
+-.*:	00 01 03 ec .*
++.*:	00 01 [0-9a-f]{2} [0-9a-f]{2} .*
+ #pass
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsso32.g
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsso32.g
+@@ -9,5 +9,5 @@
+ Contents of section \.got:
+ .* 00000000 00000000 00000000 00000000  .*
+ .* 00000000 00000000 00000000 00000000  .*
+-.* 00000000 4e800021 000103ec 00000000  .*
++.* 00000000 4e800021 00010[0-9a-f]{3} 00000000  .*
+ .* 00000000                             .*
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlsso32.r
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlsso32.r
+@@ -35,6 +35,7 @@ Program Headers:
+  +LOAD .* RWE 0x10000
+  +DYNAMIC .* RW +0x4
+  +TLS .* 0x0+1c 0x0+38 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections\.\.\.
+@@ -42,6 +43,7 @@ Program Headers:
+  +01 +\.tdata \.dynamic \.got \.plt 
+  +02 +\.dynamic 
+  +03 +\.tdata \.tbss 
++ +04 +
+ 
+ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
+  Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
+@@ -52,9 +54,9 @@ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
+ [0-9a-f ]+R_PPC_TPREL16 +0+30 +le0 \+ 0
+ [0-9a-f ]+R_PPC_TPREL16_HA +0+34 +le1 \+ 0
+ [0-9a-f ]+R_PPC_TPREL16_LO +0+34 +le1 \+ 0
+-[0-9a-f ]+R_PPC_TPREL16 +0+103d0 +\.tdata \+ 103e4
+-[0-9a-f ]+R_PPC_TPREL16_HA +0+103d0 +\.tdata \+ 103e8
+-[0-9a-f ]+R_PPC_TPREL16_LO +0+103d0 +\.tdata \+ 103e8
++[0-9a-f ]+R_PPC_TPREL16 +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
++[0-9a-f ]+R_PPC_TPREL16_HA +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
++[0-9a-f ]+R_PPC_TPREL16_LO +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
+ [0-9a-f ]+R_PPC_DTPMOD32 +0
+ [0-9a-f ]+R_PPC_DTPREL32 +0
+ [0-9a-f ]+R_PPC_DTPMOD32 +0
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlstoc.g
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlstoc.g
+@@ -8,8 +8,8 @@
+ .*: +file format elf64-powerpc
+ 
+ Contents of section \.got:
+- 100101a0 00000000 00000001 00000000 00000000  .*
+- 100101b0 00000000 00000001 00000000 00000000  .*
+- 100101c0 00000000 00000001 00000000 00000000  .*
+- 100101d0 00000000 00000001 00000000 00000000  .*
+- 100101e0 ffffffff ffff8060 00000000 00000000  .*
++ 10010[0-9a-f]{3} 00000000 00000001 00000000 00000000  .*
++ 10010[0-9a-f]{3} 00000000 00000001 00000000 00000000  .*
++ 10010[0-9a-f]{3} 00000000 00000001 00000000 00000000  .*
++ 10010[0-9a-f]{3} 00000000 00000001 00000000 00000000  .*
++ 10010[0-9a-f]{3} ffffffff ffff8060 00000000 00000000  .*
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlstoc.t
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlstoc.t
+@@ -8,7 +8,7 @@
+ .*: +file format elf64-powerpc
+ 
+ Contents of section \.tdata:
+- 10010148 00c0ffee 00000000 12345678 9abcdef0  .*
+- 10010158 23456789 abcdef01 3456789a bcdef012  .*
+- 10010168 456789ab cdef0123 56789abc def01234  .*
+- 10010178 6789abcd ef012345 789abcde f0123456  .*
++ 10010180 00c0ffee 00000000 12345678 9abcdef0  .*
++ 10010190 23456789 abcdef01 3456789a bcdef012  .*
++ 100101a0 456789ab cdef0123 56789abc def01234  .*
++ 100101b0 6789abcd ef012345 789abcde f0123456  .*
+--- binutils-2.23/ld/testsuite/ld-powerpc/tlstocso.g
++++ binutils-2.23/ld/testsuite/ld-powerpc/tlstocso.g
+@@ -7,7 +7,7 @@
+ .*: +file format elf64-powerpc
+ 
+ Contents of section \.got:
+-.* 00000000 000186c0 00000000 00000000  .*
++.* 00000000 000186f8 00000000 00000000  .*
+ .* 00000000 00000000 00000000 00000000  .*
+ .* 00000000 00000000 00000000 00000000  .*
+ .* 00000000 00000000 00000000 00000000  .*
+--- binutils-2.23/ld/testsuite/ld-s390/tlsbin.rd
++++ binutils-2.23/ld/testsuite/ld-s390/tlsbin.rd
+@@ -36,6 +36,7 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+  +LOAD .* RW +0x1000
+  +DYNAMIC .* RW +0x4
+  +TLS .* 0x0+60 0x0+a0 R +0x20
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections...
+@@ -52,6 +53,7 @@ Program Headers:
+  +03 +.tdata .dynamic .got *
+  +04 +.dynamic *
+  +05 +.tdata .tbss *
++ +06 +
+ 
+ Relocation section '.rela.dyn' at offset .* contains 4 entries:
+  Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
+--- binutils-2.23/ld/testsuite/ld-s390/tlsbin_64.rd
++++ binutils-2.23/ld/testsuite/ld-s390/tlsbin_64.rd
+@@ -36,6 +36,7 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+  +LOAD .* RW +0x1000
+  +DYNAMIC .* RW +0x8
+  +TLS .* 0x0+60 0x0+a0 R +0x20
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections...
+@@ -52,6 +53,7 @@ Program Headers:
+  +03 +.tdata .dynamic .got *
+  +04 +.dynamic *
+  +05 +.tdata .tbss *
++ +06 +
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
+  +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+--- binutils-2.23/ld/testsuite/ld-s390/tlspic.rd
++++ binutils-2.23/ld/testsuite/ld-s390/tlspic.rd
+@@ -39,6 +39,7 @@ Program Headers:
+  +LOAD .* RW +0x1000
+  +DYNAMIC .* RW +0x4
+  +TLS .* 0x0+60 0x0+80 R +0x20
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections...
+@@ -46,6 +47,7 @@ Program Headers:
+  +01 +.tdata .dynamic .got 
+  +02 +.dynamic 
+  +03 +.tdata .tbss 
++ +04 +
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+  Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
+--- binutils-2.23/ld/testsuite/ld-s390/tlspic_64.rd
++++ binutils-2.23/ld/testsuite/ld-s390/tlspic_64.rd
+@@ -39,6 +39,7 @@ Program Headers:
+  +LOAD .* RW +0x1000
+  +DYNAMIC .* RW +0x8
+  +TLS .* 0x0+60 0x0+80 R +0x20
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections...
+@@ -46,6 +47,7 @@ Program Headers:
+  +01 +.tdata .dynamic .got *
+  +02 +.dynamic *
+  +03 +.tdata .tbss *
++ +04 +
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+  +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+--- binutils-2.23/ld/testsuite/ld-scripts/empty-aligned.d
++++ binutils-2.23/ld/testsuite/ld-scripts/empty-aligned.d
+@@ -8,7 +8,9 @@
+ Program Headers:
+  +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg +Align
+  +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ [RWE ]+ +0x[0-9a-f]+
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections\.\.\.
+  +00 +.text 
++ +01 +
+--- binutils-2.23/ld/testsuite/ld-sh/tlsbin-2.d
++++ binutils-2.23/ld/testsuite/ld-sh/tlsbin-2.d
+@@ -44,6 +44,7 @@ Program Headers:
+  +LOAD.*
+  +DYNAMIC.*
+  +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+18 0x0+28 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections\.\.\.
+@@ -53,6 +54,7 @@ Program Headers:
+  +03 +\.tdata \.dynamic \.got *
+  +04 +\.dynamic *
+  +05 +\.tdata \.tbss *
++ +06 +
+ 
+ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
+  Offset +Info +Type +Sym\.Value +Sym\. Name \+ Addend
+--- binutils-2.23/ld/testsuite/ld-sh/tlspic-2.d
++++ binutils-2.23/ld/testsuite/ld-sh/tlspic-2.d
+@@ -32,7 +32,7 @@ Key to Flags:
+ 
+ Elf file type is DYN \(Shared object file\)
+ Entry point 0x[0-9a-f]+
+-There are 4 program headers, starting at offset [0-9]+
++There are [0-9] program headers, starting at offset [0-9]+
+ 
+ Program Headers:
+  +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+@@ -40,6 +40,7 @@ Program Headers:
+  +LOAD.*
+  +DYNAMIC.*
+  +TLS .* 0x0+18 0x0+20 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections\.\.\.
+@@ -47,6 +48,7 @@ Program Headers:
+  +01 +\.tdata \.dynamic \.got *
+  +02 +\.dynamic *
+  +03 +\.tdata \.tbss *
++ +04 +
+ 
+ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 10 entries:
+  Offset +Info +Type +Sym\.Value +Sym\. Name \+ Addend
+--- binutils-2.23/ld/testsuite/ld-sparc/gotop32.rd
++++ binutils-2.23/ld/testsuite/ld-sparc/gotop32.rd
+@@ -31,6 +31,7 @@ Program Headers:
+  +LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x10000
+  +LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+2000 0x0+2000 RW +0x10000
+  +DYNAMIC +0x0+2000 0x0+12000 0x0+12000 0x0+70 0x0+70 RW +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
+--- binutils-2.23/ld/testsuite/ld-sparc/gotop64.rd
++++ binutils-2.23/ld/testsuite/ld-sparc/gotop64.rd
+@@ -31,6 +31,7 @@ Program Headers:
+  +LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x100000
+  +LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+2000 0x0+2000 RW +0x100000
+  +DYNAMIC +0x0+2000 0x0+102000 0x0+102000 0x0+e0 0x0+e0 RW +0x8
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
+--- binutils-2.23/ld/testsuite/ld-sparc/tlssunbin32.rd
++++ binutils-2.23/ld/testsuite/ld-sparc/tlssunbin32.rd
+@@ -30,13 +30,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+ 
+ Program Headers:
+  +Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
+- +PHDR +0x0+34 0x0+10034 0x0+10034 0x0+c0 0x0+c0 R E 0x4
+- +INTERP +0x0+f4 0x0+100f4 0x0+100f4 0x0+11 0x0+11 R +0x1
++ +PHDR +0x0+34 0x0+10034 0x0+10034 (0x[0-9a-f]+) \1 R E 0x4
++ +INTERP +(0x[0-9a-f]+ ){3}0x0+11 0x0+11 R +0x1
+ .*Requesting program interpreter.*
+  +LOAD .* R E 0x10000
+  +LOAD .* RW +0x10000
+  +DYNAMIC .* RW +0x4
+  +TLS .* 0x0+1060 0x0+10a0 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
+--- binutils-2.23/ld/testsuite/ld-sparc/tlssunbin64.rd
++++ binutils-2.23/ld/testsuite/ld-sparc/tlssunbin64.rd
+@@ -30,13 +30,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
+ 
+ Program Headers:
+  +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+- +PHDR +0x0+40 0x0+100040 0x0+100040 0x0+150 0x0+150 R E 0x8
+- +INTERP +0x0+190 0x0+100190 0x0+100190 0x0+19 0x0+19 R +0x1
++ +PHDR +0x0+40 0x0+100040 0x0+100040 (0x[0-9a-f]+) \1 R E 0x8
++ +INTERP +0x0+([0-9a-f]+) (0x0+10+\1) \2 0x0+19 0x0+19 R +0x1
+ .*Requesting program interpreter.*
+  +LOAD .* R E 0x100000
+  +LOAD .* RW +0x100000
+  +DYNAMIC .* RW +0x8
+  +TLS .* 0x0+60 0x0+a0 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
+--- binutils-2.23/ld/testsuite/ld-sparc/tlssunnopic32.rd
++++ binutils-2.23/ld/testsuite/ld-sparc/tlssunnopic32.rd
+@@ -32,6 +32,7 @@ Program Headers:
+  +LOAD .* RW +0x10000
+  +DYNAMIC .* RW +0x4
+  +TLS .* 0x0+ 0x0+24 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 12 entries:
+--- binutils-2.23/ld/testsuite/ld-sparc/tlssunnopic64.rd
++++ binutils-2.23/ld/testsuite/ld-sparc/tlssunnopic64.rd
+@@ -32,6 +32,7 @@ Program Headers:
+  +LOAD .* RW +0x100000
+  +DYNAMIC .* RW +0x8
+  +TLS .* 0x0+ 0x0+24 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+--- binutils-2.23/ld/testsuite/ld-sparc/tlssunpic32.rd
++++ binutils-2.23/ld/testsuite/ld-sparc/tlssunpic32.rd
+@@ -36,6 +36,7 @@ Program Headers:
+  +LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+184 0x0+184 RWE 0x10000
+  +DYNAMIC +0x0+2060 0x0+12060 0x0+12060 0x0+98 0x0+98 RW +0x4
+  +TLS +0x0+2000 0x0+12000 0x0+12000 0x0+60 0x0+80 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+--- binutils-2.23/ld/testsuite/ld-sparc/tlssunpic64.rd
++++ binutils-2.23/ld/testsuite/ld-sparc/tlssunpic64.rd
+@@ -36,6 +36,7 @@ Program Headers:
+  +LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+3a0 0x0+3a0 RWE 0x100000
+  +DYNAMIC +0x0+2060 0x0+102060 0x0+102060 0x0+130 0x0+130 RW +0x8
+  +TLS +0x0+2000 0x0+102000 0x0+102000 0x0+60 0x0+80 R +0x4
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ #...
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+--- binutils-2.23/ld/testsuite/ld-x86-64/tlsgdesc.rd
++++ binutils-2.23/ld/testsuite/ld-x86-64/tlsgdesc.rd
+@@ -36,12 +36,14 @@ Program Headers:
+  +LOAD.*
+  +LOAD.*
+  +DYNAMIC.*
++ +PAX_FLAGS.*
+ 
+  Section to Segment mapping:
+  +Segment Sections...
+  +00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text *
+  +01 +.dynamic .got .got.plt *
+  +02 +.dynamic *
++ +03 +
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
+  +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+--- binutils-2.23/ld/testsuite/ld-x86-64/tlspic.rd
++++ binutils-2.23/ld/testsuite/ld-x86-64/tlspic.rd
+@@ -40,6 +40,7 @@ Program Headers:
+  +LOAD +0x0+11ac 0x0+2011ac 0x0+2011ac 0x0+244 0x0+244 RW +0x200000
+  +DYNAMIC +0x0+1210 0x0+201210 0x0+201210 0x0+130 0x0+130 RW +0x8
+  +TLS +0x0+11ac 0x0+2011ac 0x0+2011ac 0x0+60 0x0+80 R +0x1
++ +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
+ 
+  Section to Segment mapping:
+  +Segment Sections...
+@@ -47,6 +48,7 @@ Program Headers:
+  +01 +.tdata .dynamic .got .got.plt *
+  +02 +.dynamic *
+  +03 +.tdata .tbss *
++ +04 +
+ 
+ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+  +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
diff --git a/pkgs/development/tools/misc/cbrowser/default.nix b/pkgs/development/tools/misc/cbrowser/default.nix
index bf927db2793..2cc8e640631 100644
--- a/pkgs/development/tools/misc/cbrowser/default.nix
+++ b/pkgs/development/tools/misc/cbrowser/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Tcl/Tk GUI front-end to cscope";
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     homepage = http://sourceforge.net/projects/cbrowser/;
 
diff --git a/pkgs/development/tools/misc/ccache/default.nix b/pkgs/development/tools/misc/ccache/default.nix
index 05a0d9bbeb5..3dd634274f3 100644
--- a/pkgs/development/tools/misc/ccache/default.nix
+++ b/pkgs/development/tools/misc/ccache/default.nix
@@ -3,10 +3,10 @@
 let
   ccache =
 stdenv.mkDerivation {
-  name = "ccache-3.1.7";
+  name = "ccache-3.1.9";
   src = fetchurl {
-    url = http://samba.org/ftp/ccache/ccache-3.1.7.tar.gz;
-    sha256 = "04ax6ks49b6rn57hx4v9wbvmsfmw6ipn0wyfqwhh4lzw70flv3r7";
+    url = http://samba.org/ftp/ccache/ccache-3.1.9.tar.gz;
+    sha256 = "0ixlxqv1xyacwgg0k9b4a6by07c7k75y0xbr8dp76jvyada0c9x2";
   };
 
   buildInputs = [ zlib ];
diff --git a/pkgs/development/tools/misc/cflow/default.nix b/pkgs/development/tools/misc/cflow/default.nix
index d9be5802fa9..53bc8ed78c8 100644
--- a/pkgs/development/tools/misc/cflow/default.nix
+++ b/pkgs/development/tools/misc/cflow/default.nix
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
       produced flowcharts in Emacs.
     '';
 
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
 
     homepage = http://www.gnu.org/software/cflow/;
 
diff --git a/pkgs/development/tools/misc/cgdb/default.nix b/pkgs/development/tools/misc/cgdb/default.nix
index adabcec9898..09c9325d4ff 100644
--- a/pkgs/development/tools/misc/cgdb/default.nix
+++ b/pkgs/development/tools/misc/cgdb/default.nix
@@ -15,7 +15,9 @@ stdenv.mkDerivation rec {
 
     homepage = http://cgdb.sourceforge.net/;
 
-    license = "GPLv2+";
+    repositories.git = git://github.com/cgdb/cgdb.git;
+
+    license = stdenv.lib.licenses.gpl2Plus;
 
     platforms = with stdenv.lib.platforms; linux ++ cygwin;
     maintainers = with stdenv.lib.maintainers; [ viric ];
diff --git a/pkgs/development/tools/misc/chrpath/default.nix b/pkgs/development/tools/misc/chrpath/default.nix
new file mode 100644
index 00000000000..4170570e08a
--- /dev/null
+++ b/pkgs/development/tools/misc/chrpath/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "chrpath-0.16";
+
+  src = fetchurl {
+    url = "https://alioth.debian.org/frs/download.php/file/3979/chrpath-0.16.tar.gz";
+    sha256 = "0yvfq891mcdkf8g18gjjkn2m5rvs8z4z4cl1vwdhx6f2p9a4q3dv";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Command line tool to adjust the RPATH or RUNPATH of ELF binaries";
+    longDescription = ''
+      chrpath changes, lists or removes the rpath or runpath setting in a
+      binary. The rpath, or runpath if it is present, is where the runtime
+      linker should look for the libraries needed for a program.
+    '';
+    homepage = https://alioth.debian.org/projects/chrpath/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/pkgs/development/tools/misc/cl-launch/default.nix b/pkgs/development/tools/misc/cl-launch/default.nix
index 3978d96400c..d66ca9868f5 100644
--- a/pkgs/development/tools/misc/cl-launch/default.nix
+++ b/pkgs/development/tools/misc/cl-launch/default.nix
@@ -3,11 +3,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="cl-launch";
-    version="3.22.1";
+    version="4.0.5";
     name="${baseName}-${version}";
-    hash="08lb8nm4dvkbgraqclw5xd7j6xskw9hgjpg9ql087gib5a90k09i";
-    url="http://common-lisp.net/project/xcvb/cl-launch/cl-launch-3.22.1.tar.gz";
-    sha256="08lb8nm4dvkbgraqclw5xd7j6xskw9hgjpg9ql087gib5a90k09i";
+    hash="00i11pkwsb9r9cjzxjmj0dsp369i0gpz04f447xss9a9v192dhlj";
+    url="http://common-lisp.net/project/xcvb/cl-launch/cl-launch-4.0.5.tar.gz";
+    sha256="00i11pkwsb9r9cjzxjmj0dsp369i0gpz04f447xss9a9v192dhlj";
   };
   buildInputs = [
   ];
diff --git a/pkgs/development/tools/misc/cl-launch/default.upstream b/pkgs/development/tools/misc/cl-launch/default.upstream
index 1ff5daca02c..ff7ee9446d2 100644
--- a/pkgs/development/tools/misc/cl-launch/default.upstream
+++ b/pkgs/development/tools/misc/cl-launch/default.upstream
@@ -1,2 +1,2 @@
 url http://common-lisp.net/project/xcvb/cl-launch/
-version_link '.-[0-9].*[0-9][.]tar[.].*'
+version_link '.-[0-9].*[0-9][.]tar[.][a-z0-9]*$'
diff --git a/pkgs/development/tools/misc/coccinelle/default.nix b/pkgs/development/tools/misc/coccinelle/default.nix
index 122c256657f..0bf5bbce692 100644
--- a/pkgs/development/tools/misc/coccinelle/default.nix
+++ b/pkgs/development/tools/misc/coccinelle/default.nix
@@ -54,7 +54,7 @@ in stdenv.mkDerivation {
       '';
 
     homepage = http://coccinelle.lip6.fr/;
-    license = "GPLv2";
+    license = stdenv.lib.licenses.gpl2;
 
     maintainers = [ ];
     platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
diff --git a/pkgs/development/tools/misc/complexity/default.nix b/pkgs/development/tools/misc/complexity/default.nix
index 076a68b8137..9f1eca0fa13 100644
--- a/pkgs/development/tools/misc/complexity/default.nix
+++ b/pkgs/development/tools/misc/complexity/default.nix
@@ -19,6 +19,13 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
+  preBuild = ''
+    sed -i -e '/gets is a security/d' lib/stdio.in.h
+    sed -i '42 i\
+      #undef false\
+      #undef true' src/complexity.h
+  '';
+
   meta = {
     description = "GNU Complexity, C code complexity measurement tool";
 
@@ -28,7 +35,7 @@ stdenv.mkDerivation rec {
          addresses several issues not considered in that scoring scheme.
       '';
 
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
 
     homepage = http://www.gnu.org/software/complexity/;
 
diff --git a/pkgs/development/tools/misc/cpphs/default.nix b/pkgs/development/tools/misc/cpphs/default.nix
index e5c9df96aab..f3a724f3039 100644
--- a/pkgs/development/tools/misc/cpphs/default.nix
+++ b/pkgs/development/tools/misc/cpphs/default.nix
@@ -1,16 +1,18 @@
-{ cabal }:
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, polyparse }:
 
 cabal.mkDerivation (self: {
   pname = "cpphs";
-  version = "1.17.1";
-  sha256 = "1xk1gk3skgiy6bc8rdhm7i3f6b5nqsm9nz6qswbxq94nxmw3pg9p";
+  version = "1.18.5";
+  sha256 = "0bqfz0wkfnxvv711fgmhmh6rbwffgna1pfqbj7whb6crqji9w7g7";
   isLibrary = true;
   isExecutable = true;
+  buildDepends = [ polyparse ];
   meta = {
-    homepage = "http://haskell.org/cpphs/";
+    homepage = "http://projects.haskell.org/cpphs/";
     description = "A liberalised re-implementation of cpp, the C pre-processor";
     license = "LGPL";
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/misc/cppi/default.nix b/pkgs/development/tools/misc/cppi/default.nix
index f9246df9e56..500129c7c9d 100644
--- a/pkgs/development/tools/misc/cppi/default.nix
+++ b/pkgs/development/tools/misc/cppi/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
          to the level of nesting of that directive.
       '';
 
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
 
     maintainers = [ stdenv.lib.maintainers.ludo ];
     platforms = stdenv.lib.platforms.all;
diff --git a/pkgs/development/tools/misc/d-feet/default.nix b/pkgs/development/tools/misc/d-feet/default.nix
new file mode 100644
index 00000000000..df5fdbfab5a
--- /dev/null
+++ b/pkgs/development/tools/misc/d-feet/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, pkgconfig, fetchurl, itstool, intltool, libxml2, glib, gtk3
+, pango, gdk_pixbuf, atk, pep8, python, makeWrapper, gnome3
+, pygobject3, gobjectIntrospection, libwnck3 }:
+
+let
+  version = "${major}.8";
+  major = "0.3";
+in
+
+stdenv.mkDerivation rec {
+  name = "d-feet-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/d-feet/${major}/d-feet-${version}.tar.xz";
+    sha256 = "e8423feb18fdff9b1465bf8442b78994ba13c12f8fa3b08e6a2f05768b4feee5";
+  };
+
+  buildInputs = [
+    pkgconfig libxml2 itstool intltool glib gtk3 pep8 python
+    gnome3.gnome_icon_theme gnome3.gnome_icon_theme_symbolic
+    makeWrapper pygobject3 libwnck3
+  ];
+
+  preFixup =
+    ''
+      wrapProgram $out/bin/d-feet \
+        --prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${pygobject3})" \
+        --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
+        --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$out/share"
+
+      rm $out/share/icons/hicolor/icon-theme.cache
+    '';
+
+  meta = {
+    description = "D-Feet is an easy to use D-Bus debugger";
+
+    longDescription = ''
+      D-Feet can be used to inspect D-Bus interfaces of running programs
+      and invoke methods on those interfaces.
+    '';
+
+    homepage = https://wiki.gnome.org/action/show/Apps/DFeet;
+    platforms = stdenv.lib.platforms.all;
+    maintainers = with stdenv.lib.maintainers; [ ktosiek ];
+  };
+}
diff --git a/pkgs/development/tools/misc/ddd/default.nix b/pkgs/development/tools/misc/ddd/default.nix
index 0a6895aff6b..91150255bda 100644
--- a/pkgs/development/tools/misc/ddd/default.nix
+++ b/pkgs/development/tools/misc/ddd/default.nix
@@ -13,6 +13,6 @@ stdenv.mkDerivation rec {
 	meta = {
 	  homepage = http://www.gnu.org/software/ddd;
 		description = "Graphical front-end for command-line debuggers";
-		license = "GPLv2";
+		license = stdenv.lib.licenses.gpl2;
 	};
 }
diff --git a/pkgs/development/tools/misc/dejagnu/default.nix b/pkgs/development/tools/misc/dejagnu/default.nix
index beed6032393..d3c2e7e6389 100644
--- a/pkgs/development/tools/misc/dejagnu/default.nix
+++ b/pkgs/development/tools/misc/dejagnu/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = {
-    description = "The DejaGNU testing framework";
+    description = "Framework for testing other programs";
 
     longDescription = ''
       DejaGnu is a framework for testing other programs.  Its purpose
@@ -47,9 +47,9 @@ stdenv.mkDerivation rec {
     '';
 
     homepage = http://www.gnu.org/software/dejagnu/;
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
-    platforms = stdenv.lib.platforms.all;
+    platforms = stdenv.lib.platforms.linux;
     maintainers = [ stdenv.lib.maintainers.ludo ];
   };
 }
diff --git a/pkgs/development/tools/misc/dfu-programmer/default.nix b/pkgs/development/tools/misc/dfu-programmer/default.nix
new file mode 100644
index 00000000000..2df687b8bc6
--- /dev/null
+++ b/pkgs/development/tools/misc/dfu-programmer/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, libusb }:
+let
+  version = "0.7.0";
+in
+stdenv.mkDerivation rec {
+  name="dfu-programmer-${version}";
+
+  buildInputs = [ libusb ];
+
+  src = fetchurl {
+    url = "mirror://sourceforge/dfu-programmer/${name}.tar.gz";
+    sha256 = "17lglglk5xrqd2n0impg5bkq4j96qc51cw3kzcghzmzmn6fvg3gf";
+  };
+
+  configureFlags = [ "--disable-libusb_1_0" ];
+
+  meta = with stdenv.lib; {
+    license = licenses.gpl2;
+    description = "A Device Firmware Update based USB programmer for Atmel chips with a USB bootloader.";
+    homepage = http://dfu-programmer.sourceforge.net/;
+    maintainers = [ maintainers.the-kenny ];
+  };
+}
diff --git a/pkgs/development/tools/misc/distcc/masq.nix b/pkgs/development/tools/misc/distcc/masq.nix
index 117480670c3..753c35b5d3a 100644
--- a/pkgs/development/tools/misc/distcc/masq.nix
+++ b/pkgs/development/tools/misc/distcc/masq.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation {
 
   phases = [ "installPhase" ];
   installPhase = ''
-    ensureDir $out/bin
+    mkdir -p $out/bin
 
     bin=${gccRaw}/bin
 
diff --git a/pkgs/development/tools/misc/drush/default.nix b/pkgs/development/tools/misc/drush/default.nix
new file mode 100644
index 00000000000..cb534d511ea
--- /dev/null
+++ b/pkgs/development/tools/misc/drush/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, php, which, makeWrapper, bash, coreutils, ncurses }:
+
+stdenv.mkDerivation rec {
+  name = "drush-6.1.0";
+
+  meta = with stdenv.lib; {
+    description = "Command-line shell and Unix scripting interface for Drupal";
+    homepage    = http://github.com/drush-ops/drush;
+    license     = licenses.gpl2;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.all;
+  };
+
+  src = fetchurl {
+    url    = https://github.com/drush-ops/drush/archive/6.1.0.tar.gz;
+    sha256 = "1jgnc4jjyapyn04iczvcz92ic0vq8d1w8xi55ismqyy5cxhqj6bp";
+  };
+
+  consoleTable = fetchurl {
+    url    = http://download.pear.php.net/package/Console_Table-1.1.3.tgz;
+    sha256 = "07gbjd7m1fj5dmavr0z20vkqwx1cz2522sj9022p257jifj1yl76";
+  };
+
+  buildInputs = [ php which makeWrapper ];
+
+  installPhase = ''
+    # install libraries
+    cd lib
+    tar -xf ${consoleTable}
+    cd ..
+
+    mkdir -p "$out"
+    cp -r . "$out/src"
+    mkdir "$out/bin"
+    wrapProgram "$out/src/drush" --prefix PATH : "${which}/bin:${php}/bin:${bash}/bin:${coreutils}/bin:${ncurses}/bin"
+    ln -s "$out/src/drush" "$out/bin/drush"
+  '';
+}
diff --git a/pkgs/development/tools/misc/elfutils/CVE-2014-0172.patch b/pkgs/development/tools/misc/elfutils/CVE-2014-0172.patch
new file mode 100644
index 00000000000..6553dea7b4c
--- /dev/null
+++ b/pkgs/development/tools/misc/elfutils/CVE-2014-0172.patch
@@ -0,0 +1,32 @@
+https://bugzilla.redhat.com/show_bug.cgi?id=1085663
+
+Reported-by: Florian Weimer <fweimer at redhat.com>
+Signed-off-by: Mark Wielaard <mjw at redhat.com>
+---
+ libdw/dwarf_begin_elf.c |    8 +++++++-
+ 2 files changed, 12 insertions(+), 1 deletions(-)
+
+diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c
+index 79daeac..34ea373 100644
+--- a/libdw/dwarf_begin_elf.c
++++ b/libdw/dwarf_begin_elf.c
+@@ -1,5 +1,5 @@
+ /* Create descriptor from ELF descriptor for processing file.
+-   Copyright (C) 2002-2011 Red Hat, Inc.
++   Copyright (C) 2002-2011, 2014 Red Hat, Inc.
+    This file is part of elfutils.
+    Written by Ulrich Drepper <drepper at redhat.com>, 2002.
+ 
+@@ -282,6 +282,12 @@ check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp)
+ 	    memcpy (&size, data->d_buf + 4, sizeof size);
+ 	    size = be64toh (size);
+ 
++	    /* Check for unsigned overflow so malloc always allocated
++	       enough memory for both the Elf_Data header and the
++	       uncompressed section data.  */
++	    if (unlikely (sizeof (Elf_Data) + size < size))
++	      break;
++
+ 	    Elf_Data *zdata = malloc (sizeof (Elf_Data) + size);
+ 	    if (unlikely (zdata == NULL))
+ 	      break;
diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix
index 526a66e0280..53e4bd6821f 100644
--- a/pkgs/development/tools/misc/elfutils/default.nix
+++ b/pkgs/development/tools/misc/elfutils/default.nix
@@ -3,20 +3,21 @@
 # TODO: Look at the hardcoded paths to kernel, modules etc.
 stdenv.mkDerivation rec {
   name = "elfutils-${version}";
-  version = "0.152";
-  
+  version = "0.158";
+
   src = fetchurl {
     urls = [
-      "https://fedorahosted.org/releases/e/l/elfutils/${version}/${name}.tar.bz2"
+      "http://fedorahosted.org/releases/e/l/elfutils/${version}/${name}.tar.bz2"
       "mirror://gentoo/distfiles/${name}.tar.bz2"
       ];
-    sha256 = "19mlgxyzcwiv64ynj2cibgkiw4qkm3n37kizvy6555dsmlaqfybq";
+    sha256 = "0z9rprmizd7rwb3xwfmz5liii7hbiv3g2arl23h56brm45fay9xy";
   };
 
   patches = [
+    ./CVE-2014-0172.patch
     (fetchurl {
-      url = https://fedorahosted.org/releases/e/l/elfutils/0.152/elfutils-portability.patch;
-      sha256 = "0q318w4cvvqv9ps4xcwphapj1gl31isgjyya4y9sm72qj68n61p0";
+      url = "http://fedorahosted.org/releases/e/l/elfutils/${version}/elfutils-portability.patch";
+      sha256 = "0y2fyjis5xrd3g2pcbcm145q2kmh52n5c74w8dwv3hqdp5ky7igd";
     }) ];
 
   # We need bzip2 in NativeInputs because otherwise we can't unpack the src,
diff --git a/pkgs/development/tools/misc/frama-c/0007-Port-to-OCamlgraph-1.8.2.patch b/pkgs/development/tools/misc/frama-c/0007-Port-to-OCamlgraph-1.8.2.patch
deleted file mode 100644
index 1c16e1794ab..00000000000
--- a/pkgs/development/tools/misc/frama-c/0007-Port-to-OCamlgraph-1.8.2.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From: Mehdi Dogguy <mehdi@debian.org>
-Date: Wed, 16 May 2012 14:48:40 +0200
-Subject: Port to OCamlgraph 1.8.2
-
- o Graph.Topological: as of OCamlgraph 1.8.2, the input graph must
-   implement Sig.COMPARABLE instead of Sig.HASHABLE
----
- src/misc/service_graph.ml           |    2 +-
- src/misc/service_graph.mli          |    2 +-
- src/semantic_callgraph/register.ml  |    1 +
- src/syntactic_callgraph/register.ml |    1 +
- 4 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/misc/service_graph.ml b/src/misc/service_graph.ml
-index f30a1be..567698f 100644
---- a/src/misc/service_graph.ml
-+++ b/src/misc/service_graph.ml
-@@ -24,7 +24,7 @@ module Make
-   (G: sig
-      type t
-      module V: sig
--       include Graph.Sig.HASHABLE
-+       include Graph.Sig.COMPARABLE
-        val id: t -> int
-        val name: t -> string
-        val attributes: t -> Graph.Graphviz.DotAttributes.vertex list
-diff --git a/src/misc/service_graph.mli b/src/misc/service_graph.mli
-index 5ebb570..8006977 100644
---- a/src/misc/service_graph.mli
-+++ b/src/misc/service_graph.mli
-@@ -28,7 +28,7 @@ module Make
-   (G: sig
-      type t
-      module V: sig
--       include Graph.Sig.HASHABLE
-+       include Graph.Sig.COMPARABLE
-        val id: t -> int
-          (** assume is >= 0 and unique for each vertices of the graph *)
-        val name: t -> string
-diff --git a/src/semantic_callgraph/register.ml b/src/semantic_callgraph/register.ml
-index 0b3b4df..064dca8 100644
---- a/src/semantic_callgraph/register.ml
-+++ b/src/semantic_callgraph/register.ml
-@@ -107,6 +107,7 @@ module Service =
-                (if Kernel_function.is_definition v then `Bold
-                 else `Dotted) ]
-          let equal = Kernel_function.equal
-+         let compare v1 v2 = Datatype.Int.compare (id v1) (id v2)
-          let hash = Kernel_function.hash
-          let entry_point () =
-            try Some (fst (Globals.entry_point ()))
-diff --git a/src/syntactic_callgraph/register.ml b/src/syntactic_callgraph/register.ml
-index 4efb594..d9d78b9 100644
---- a/src/syntactic_callgraph/register.ml
-+++ b/src/syntactic_callgraph/register.ml
-@@ -41,6 +41,7 @@ module Service =
-              | NIVar (_,b) when not !b -> `Style `Dotted
-              | _ -> `Style `Bold ]
-          let equal v1 v2 = id v1 = id v2
-+         let compare v1 v2 = Datatype.Int.compare (id v1) (id v2)
-          let hash = id
-          let entry_point () = !entry_point_ref
-        end
--- 
diff --git a/pkgs/development/tools/misc/frama-c/default.nix b/pkgs/development/tools/misc/frama-c/default.nix
deleted file mode 100644
index ede316b4b7b..00000000000
--- a/pkgs/development/tools/misc/frama-c/default.nix
+++ /dev/null
@@ -1,67 +0,0 @@
-# Note on a potential dependency-bloat:
-# Frama-c ships with several plugins that have dependencies on other
-# software. Not providing the dependencies has as effect that certain
-# plugins will not be available.
-# I've included the dependencies that are well-supported by nixpkgs
-# and seem useful in general. Not included are:
-#   alt-ergo, ltl2ba, otags, why-dp
-
-{ stdenv, fetchurl, ncurses, ocamlPackages, coq, graphviz }:
-
-let
-
-  version = "20111001";
-  sha256 = "8afad848321c958fab265045cd152482e77ce7c175ee7c9af2d4bec57a1bc671";
-
-in stdenv.mkDerivation {
-  name = "frama-c-${version}";
-
-  src = fetchurl {
-    url = "http://frama-c.com/download/frama-c-Nitrogen-${version}.tar.gz";
-    inherit sha256;
-  };
-
-  buildInputs = with ocamlPackages; [
-    ncurses ocaml findlib ocamlgraph
-    lablgtk coq graphviz  # optional dependencies
-  ];
-
-  patches = [
-    # this patch comes from the debian frama-c package, and was
-    # posted on the frama-c issue tracker.
-    ./0007-Port-to-OCamlgraph-1.8.2.patch
-  ];
-
-  postPatch = ''
-    # strip absolute paths to /usr/bin
-    for file in ./configure ./share/Makefile.common ./src/*/configure; do
-      substituteInPlace $file  --replace '/usr/bin/' ""
-    done
-
-    # find library paths
-    OCAMLGRAPH_HOME=`ocamlfind query ocamlgraph`
-    LABLGTK_HOME=`ocamlfind query lablgtk2`
-
-    # patch search paths
-    # ensure that the tests against the ocamlgraph version succeeds
-    # filter out the additional search paths from ocamldep
-    substituteInPlace ./configure \
-      --replace '$OCAMLLIB/ocamlgraph' "$OCAMLGRAPH_HOME" \
-      --replace '$OCAMLLIB/lablgtk2' "$LABLGTK_HOME" \
-      --replace '+ocamlgraph' "$OCAMLGRAPH_HOME" \
-      --replace '1.8)' '*)'
-    substituteInPlace ./Makefile --replace '+lablgtk2' "$LABLGTK_HOME" \
-      --replace '$(patsubst +%,.,$(INCLUDES) $(GUI_INCLUDES))' \
-                '$(patsubst /%,.,$(patsubst +%,.,$(INCLUDES) $(GUI_INCLUDES)))'
-  '';
-
-  meta = {
-    description = "Frama-C is an extensible tool for source-code analysis of C software";
-
-    homepage = http://frama-c.com/;
-    license = "GPLv2";
-
-    maintainers = [ stdenv.lib.maintainers.amiddelk ];
-    platforms = stdenv.lib.platforms.gnu;
-  };
-}
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix
index 4dd83f63c7d..2b5ced78063 100644
--- a/pkgs/development/tools/misc/gdb/default.nix
+++ b/pkgs/development/tools/misc/gdb/default.nix
@@ -8,7 +8,7 @@
 
 let
 
-  basename = "gdb-7.6";
+  basename = "gdb-7.7";
 
   # Whether (cross-)building for GNU/Hurd.  This is an approximation since
   # having `stdenv ? cross' doesn't tell us if we're building `crossDrv' and
@@ -27,9 +27,11 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnu/gdb/${basename}.tar.bz2";
-    md5 = "fda57170e4d11cdde74259ca575412a8";
+    sha256 = "08vcb97j1b7vxwq6088wb6s3g3bm8iwikd922y0xsgbbxv3d2104";
   };
 
+  patches = [ ./edit-signals.patch ];
+
   # I think python is not a native input, but I leave it
   # here while I will not need it cross building
   nativeBuildInputs = [ texinfo python ]
@@ -76,9 +78,9 @@ stdenv.mkDerivation rec {
 
     homepage = http://www.gnu.org/software/gdb/;
 
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
 
-    platforms = with platforms; linux ++ cygwin;
+    platforms = with platforms; linux ++ cygwin ++ darwin;
     maintainers = with maintainers; [ pierron ];
   };
 }
diff --git a/pkgs/development/tools/misc/gdb/edit-signals.patch b/pkgs/development/tools/misc/gdb/edit-signals.patch
new file mode 100644
index 00000000000..e9da8035ef5
--- /dev/null
+++ b/pkgs/development/tools/misc/gdb/edit-signals.patch
@@ -0,0 +1,25 @@
+Patch adapted from
+https://www.sourceware.org/ml/gdb-patches/2012-08/msg00439.html
+
+Without it, spawning a terminal 'vim' from gdb 'edit' cmd, makes
+all gdb grazy.
+
+diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
+index 7ea0fec..be5455c 100644
+--- a/gdb/tui/tui-win.c
++++ b/gdb/tui/tui-win.c
+@@ -831,11 +831,12 @@ void
+ tui_initialize_win (void)
+ {
+ #ifdef SIGWINCH
+-#ifdef HAVE_SIGACTION
++#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
+   struct sigaction old_winch;
+ 
+-  memset (&old_winch, 0, sizeof (old_winch));
++  sigemptyset (&old_winch.sa_mask);
+   old_winch.sa_handler = &tui_sigwinch_handler;
++  old_winch.sa_flags = SA_RESTART;
+   sigaction (SIGWINCH, &old_winch, NULL);
+ #else
+   signal (SIGWINCH, &tui_sigwinch_handler);
diff --git a/pkgs/development/tools/misc/gengetopt/default.nix b/pkgs/development/tools/misc/gengetopt/default.nix
index dc7a467fb0c..9926dd6cd33 100644
--- a/pkgs/development/tools/misc/gengetopt/default.nix
+++ b/pkgs/development/tools/misc/gengetopt/default.nix
@@ -1,11 +1,11 @@
 { fetchurl, stdenv }:
 
 stdenv.mkDerivation rec {
-  name = "gengetopt-2.22.5";
+  name = "gengetopt-2.22.6";
 
   src = fetchurl {
     url = "mirror://gnu/gengetopt/${name}.tar.gz";
-    sha256 = "0dr1xmlgk9q8za17wnpgghb5ifnbca5vb0w5bc6fpc2j0cjb6vrv";
+    sha256 = "1xq1kcfs6hri101ss4dhym0jn96z4v6jdvx288mfywadc245mc1h";
   };
 
   doCheck = true;
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
 
     homepage = http://www.gnu.org/software/gengetopt/;
 
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
 
     maintainers = [ ];
     platforms = stdenv.lib.platforms.all;
diff --git a/pkgs/development/tools/misc/global/default.nix b/pkgs/development/tools/misc/global/default.nix
index 91cf2be4f73..d6abf8d10bd 100644
--- a/pkgs/development/tools/misc/global/default.nix
+++ b/pkgs/development/tools/misc/global/default.nix
@@ -1,11 +1,11 @@
 { fetchurl, stdenv, libtool, ncurses }:
 
 stdenv.mkDerivation rec {
-  name = "global-6.2.2";
+  name = "global-6.2.12";
 
   src = fetchurl {
     url = "mirror://gnu/global/${name}.tar.gz";
-    sha256 = "0a41d3wc22f05fqi5zpx1r22annsi4whdkjdmw50nidjca1vq5pj";
+    sha256 = "05jkhya1cs6yqhkf8nw5x56adkxxrqyga7sq7hx44dbf7alczwfa";
   };
 
   buildInputs = [ libtool ncurses ];
@@ -37,11 +37,11 @@ stdenv.mkDerivation rec {
       operating system like GNU and BSD.
     '';
 
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
 
     homepage = http://www.gnu.org/software/global/;
 
     maintainers = [ stdenv.lib.maintainers.ludo ];
-    platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
+    platforms = stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix
index d1b0d0e376e..67688254a40 100644
--- a/pkgs/development/tools/misc/gnum4/default.nix
+++ b/pkgs/development/tools/misc/gnum4/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl}:
 
-stdenv.mkDerivation {
-  name = "gnum4-1.4.16";
+stdenv.mkDerivation rec {
+  name = "gnum4-1.4.17";
 
   src = fetchurl {
-    url = mirror://gnu/m4/m4-1.4.16.tar.bz2;
-    sha256 = "035r7ma272j2cwni2961jp22k6bn3n9xwn3b3qbcn2yrvlghql22";
+    url = "mirror://gnu/m4/m4-1.4.17.tar.bz2";
+    sha256 = "0w0da1chh12mczxa5lnwzjk9czi3dq6gnnndbpa6w4rj76b1yklf";
   };
 
   doCheck = !stdenv.isDarwin
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
     && !stdenv.isSunOS;                    # XXX: `test-setlocale2.sh' fails
 
   # Upstream is aware of it; it may be in the next release.
-  patches = [ ./s_isdir.patch ./readlink-EINVAL.patch ./no-gets.patch ];
+  patches = [ ./s_isdir.patch ];
 
   meta = {
     homepage = http://www.gnu.org/software/m4/;
@@ -36,7 +36,7 @@ stdenv.mkDerivation {
       compiler or as a macro processor in its own right.
     '';
 
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
   };
 
 }
diff --git a/pkgs/development/tools/misc/gnum4/no-gets.patch b/pkgs/development/tools/misc/gnum4/no-gets.patch
deleted file mode 100644
index 456c08b56c3..00000000000
--- a/pkgs/development/tools/misc/gnum4/no-gets.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-devel/m4/files/m4-1.4.16-no-gets.patch?revision=1.1
-
-https://bugs.gentoo.org/424978
-
-hack until m4 pulls a newer gnulib version
-
-From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
-From: Eric Blake <eblake@redhat.com>
-Date: Thu, 29 Mar 2012 13:30:41 -0600
-Subject: [PATCH] stdio: don't assume gets any more
-
-Gnulib intentionally does not have a gets module, and now that C11
-and glibc have dropped it, we should be more proactive about warning
-any user on a platform that still has a declaration of this dangerous
-interface.
-
---- a/lib/stdio.in.h
-+++ b/lib/stdio.in.h
-@@ -125,7 +125,6 @@
-    so any use of gets warrants an unconditional warning.  Assume it is
-    always declared, since it is required by C89.  */
- #undef gets
--_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
- 
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@
diff --git a/pkgs/development/tools/misc/gnum4/readlink-EINVAL.patch b/pkgs/development/tools/misc/gnum4/readlink-EINVAL.patch
deleted file mode 100644
index dd371584a79..00000000000
--- a/pkgs/development/tools/misc/gnum4/readlink-EINVAL.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Newer Linux kernels would return EINVAL instead of ENOENT.
-The patch below, taken from Gnulib, allows the test to pass when
-these Linux versions are in use:
-https://lists.gnu.org/archive/html/bug-gnulib/2011-03/msg00308.html .
-
-diff --git a/tests/test-readlink.h b/tests/test-readlink.h
-index 08d5662..7247fc4 100644
---- a/tests/test-readlink.h
-+++ b/tests/test-readlink.h
-@@ -38,7 +38,7 @@ test_readlink (ssize_t (*func) (char const *, char *, size_t), bool print)
-   ASSERT (errno == ENOENT);
-   errno = 0;
-   ASSERT (func ("", buf, sizeof buf) == -1);
--  ASSERT (errno == ENOENT);
-+  ASSERT (errno == ENOENT || errno == EINVAL);
-   errno = 0;
-   ASSERT (func (".", buf, sizeof buf) == -1);
-   ASSERT (errno == EINVAL);
diff --git a/pkgs/development/tools/misc/gob2/default.nix b/pkgs/development/tools/misc/gob2/default.nix
index c86a65f33b6..a434e54bba9 100644
--- a/pkgs/development/tools/misc/gob2/default.nix
+++ b/pkgs/development/tools/misc/gob2/default.nix
@@ -1,9 +1,9 @@
-{ stdenv, fetchurl_gnome, pkgconfig, glib, bison, flex }:
+{ stdenv, fetchurlGnome, pkgconfig, glib, bison, flex }:
 
 stdenv.mkDerivation rec {
   name = src.pkgname;
 
-  src = fetchurl_gnome {
+  src = fetchurlGnome {
     project = "gob2";
     major = "2"; minor = "0"; patchlevel = "18"; extension = "gz";
     sha256 = "1r242s3rsxyqiw2ic2gdpvvrx903jgjd1aa4mkl26in5k9zk76fa";
@@ -15,6 +15,6 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Preprocessor for making GObjects with inline C code";
     homepage = http://www.jirka.org/gob.html;
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
   };
 }
diff --git a/pkgs/development/tools/misc/gperf/default.nix b/pkgs/development/tools/misc/gperf/default.nix
index 478d2162b33..e25998e5420 100644
--- a/pkgs/development/tools/misc/gperf/default.nix
+++ b/pkgs/development/tools/misc/gperf/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
       employed by gperf.
     '';
 
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
 
     homepage = http://www.gnu.org/software/gperf/;
   };
diff --git a/pkgs/development/tools/misc/grafana/default.nix b/pkgs/development/tools/misc/grafana/default.nix
new file mode 100644
index 00000000000..b1566684cf0
--- /dev/null
+++ b/pkgs/development/tools/misc/grafana/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, unzip, conf ? null }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "grafana-${version}";
+  version = "1.5.4";
+
+  src = fetchurl {
+    url = "http://grafanarel.s3.amazonaws.com/${name}.zip";
+    sha256 = "fee7334efba967142955be2fa39ecae7bca0cc9b7a76c301430746be4fc7ec6d";
+  };
+
+  buildInputs = [ unzip ];
+
+  phases = ["unpackPhase" "installPhase"];
+  installPhase = ''
+    mkdir -p $out && cp -R * $out
+    ${optionalString (conf!=null) ''cp ${conf} $out/config.js''}
+  '';
+
+  meta = {
+    description = "A Graphite & InfluxDB Dashboard and Graph Editor";
+    homepage = http://grafana.org/;
+    license = licenses.asl20;
+
+    maintainers = [ maintainers.offline ];
+  };
+}
diff --git a/pkgs/development/tools/misc/gtkdialog/default.nix b/pkgs/development/tools/misc/gtkdialog/default.nix
index b447cf918cf..cd8ad0d64cd 100644
--- a/pkgs/development/tools/misc/gtkdialog/default.nix
+++ b/pkgs/development/tools/misc/gtkdialog/default.nix
@@ -13,6 +13,6 @@ stdenv.mkDerivation {
   meta = {
     homepage = http://gtkdialog.googlecode.com/;
     description = "Small utility for fast and easy GUI building from many scripted and compiled languages";
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
   };
 }
diff --git a/pkgs/development/tools/misc/help2man/default.nix b/pkgs/development/tools/misc/help2man/default.nix
index edbc37e76a6..23bd35c8739 100644
--- a/pkgs/development/tools/misc/help2man/default.nix
+++ b/pkgs/development/tools/misc/help2man/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, perl, gettext, LocaleGettext, makeWrapper }:
 
 stdenv.mkDerivation rec {
-  name = "help2man-1.40.8";
+  name = "help2man-1.44.1";
 
   src = fetchurl {
-    url = "mirror://gnu/help2man/${name}.tar.gz";
-    sha256 = "0s6phazn8jgvpbsby8kj2m58rj1zjghi1aipvamh8af226ssqfzj";
+    url = "mirror://gnu/help2man/${name}.tar.xz";
+    sha256 = "1yyyfw9zrfdvslnv91bnhyqmazwx243wmkc9wdaz888rfx36ipi2";
   };
 
   buildInputs = [ makeWrapper perl gettext LocaleGettext ];
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
 
     homepage = http://www.gnu.org/software/help2man/;
 
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
     platforms = stdenv.lib.platforms.gnu;         # arbitrary choice
     maintainers = [ stdenv.lib.maintainers.ludo ];
   };
diff --git a/pkgs/development/tools/misc/hydra/default.nix b/pkgs/development/tools/misc/hydra/default.nix
index caa277bfbf5..0940bcca191 100644
--- a/pkgs/development/tools/misc/hydra/default.nix
+++ b/pkgs/development/tools/misc/hydra/default.nix
@@ -67,7 +67,7 @@ stdenv.mkDerivation {
   meta = {
     description = "Hydra, the Nix-based continuous integration system";
     homepage = http://nixos.org/hydra/;
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
     platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/development/tools/misc/icon-naming-utils/default.nix b/pkgs/development/tools/misc/icon-naming-utils/default.nix
index 7a03eb7b128..7f8dafad4af 100644
--- a/pkgs/development/tools/misc/icon-naming-utils/default.nix
+++ b/pkgs/development/tools/misc/icon-naming-utils/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, perl, XMLSimple}:
+{stdenv, fetchurl, perl, XMLSimple, librsvg}:
 
 stdenv.mkDerivation rec {
   name = "icon-naming-utils-0.8.90";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "071fj2jm5kydlz02ic5sylhmw6h2p3cgrm3gwdfabinqkqcv4jh4";
   };
   
-  buildInputs = [perl XMLSimple];
+  buildInputs = [perl XMLSimple librsvg];
 
   postInstall =
     ''
@@ -17,7 +17,8 @@ stdenv.mkDerivation rec {
           --replace '/bin/perl' '/bin/perl -I${XMLSimple}/lib/perl5/site_perl'
     '';
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://tango.freedesktop.org/Standard_Icon_Naming_Specification;
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/tools/misc/indent/default.nix b/pkgs/development/tools/misc/indent/default.nix
index 0c82c2cd275..17714b7a9d4 100644
--- a/pkgs/development/tools/misc/indent/default.nix
+++ b/pkgs/development/tools/misc/indent/default.nix
@@ -18,6 +18,6 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = http://www.gnu.org/software/indent/;
     description = "A source code reformatter";
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
   };
 }
diff --git a/pkgs/development/tools/misc/inotify-tools/default.nix b/pkgs/development/tools/misc/inotify-tools/default.nix
index 0465b6d90a8..3402c2060e7 100644
--- a/pkgs/development/tools/misc/inotify-tools/default.nix
+++ b/pkgs/development/tools/misc/inotify-tools/default.nix
@@ -1,17 +1,18 @@
 { stdenv, fetchurl }:
 
-stdenv.mkDerivation {
-  name = "inotify-tools-3.13";
+stdenv.mkDerivation rec {
+  name = "inotify-tools-${version}";
+  version = "3.14";
 
   src = fetchurl {
-    url = mirror://sourceforge/inotify-tools/inotify-tools/3.13/inotify-tools-3.13.tar.gz;
+    url = "http://github.com/downloads/rvoicilas/inotify-tools/inotify-tools-${version}.tar.gz";
     sha256 = "0icl4bx041axd5dvhg89kilfkysjj86hjakc7bk8n49cxjn4cha6";
   };
 
-  meta = {
-    homepage = http://sourceforge.net/projects/inotify-tools/;
-    license = "GPLv2";
-    maintainers = [ stdenv.lib.maintainers.marcweber ];
-    platforms = stdenv.lib.platforms.linux;
+  meta = with stdenv.lib; {
+    homepage = https://github.com/rvoicilas/inotify-tools/wiki;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ marcweber pSub ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/tools/misc/intel-gpu-tools/default.nix b/pkgs/development/tools/misc/intel-gpu-tools/default.nix
new file mode 100644
index 00000000000..14bfe74821d
--- /dev/null
+++ b/pkgs/development/tools/misc/intel-gpu-tools/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, pkgconfig, libdrm, libpciaccess, cairo, dri2proto, udev, libX11, libXext, libXv, libXrandr, glib, bison }:
+
+stdenv.mkDerivation rec {
+  name = "intel-gpu-tools-1.7";
+
+  src = fetchurl {
+    url = "http://xorg.freedesktop.org/archive/individual/app/${name}.tar.bz2";
+    sha256 = "0yi0024kr1xzglkkhyjpxr081bmwvdakb61az6wiidfrpd1j6q92";
+  };
+
+  configureFlags = [ "--disable-tests" ];
+
+  buildInputs = [ pkgconfig libdrm libpciaccess cairo dri2proto udev libX11 libXext libXv libXrandr glib bison ];
+
+  meta = with stdenv.lib; {
+    homepage = https://01.org/linuxgraphics/;
+    description = "Tools for development and testing of the Intel DRM driver";
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/development/tools/misc/intltool/default.nix b/pkgs/development/tools/misc/intltool/default.nix
index b2a400a6189..c9bb661935a 100644
--- a/pkgs/development/tools/misc/intltool/default.nix
+++ b/pkgs/development/tools/misc/intltool/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
     homepage = "http://launchpad.net/intltool/";
     license = stdenv.lib.licenses.gpl2Plus;
     maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.linux;
+    platforms = stdenv.lib.platforms.unix;
     inherit (s) version;
   };
 }
diff --git a/pkgs/development/tools/misc/jscoverage/default.nix b/pkgs/development/tools/misc/jscoverage/default.nix
index c7f790b7d50..07ef5ffc082 100644
--- a/pkgs/development/tools/misc/jscoverage/default.nix
+++ b/pkgs/development/tools/misc/jscoverage/default.nix
@@ -42,6 +42,6 @@ stdenv.mkDerivation rec {
     '';
 
     homepage = http://siliconforks.com/jscoverage/;
-    license = "GPLv2";
+    license = stdenv.lib.licenses.gpl2;
   };
 }
diff --git a/pkgs/development/tools/misc/libtool/default.nix b/pkgs/development/tools/misc/libtool/default.nix
index 78cd15e04bd..5eee9ead5d6 100644
--- a/pkgs/development/tools/misc/libtool/default.nix
+++ b/pkgs/development/tools/misc/libtool/default.nix
@@ -29,6 +29,6 @@ stdenv.mkDerivation rec {
 
     homepage = http://www.gnu.org/software/libtool/;
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
   };
 }
diff --git a/pkgs/development/tools/misc/libtool/libtool2.nix b/pkgs/development/tools/misc/libtool/libtool2.nix
index 0252750bf12..98d22dcf42b 100644
--- a/pkgs/development/tools/misc/libtool/libtool2.nix
+++ b/pkgs/development/tools/misc/libtool/libtool2.nix
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
 
     homepage = http://www.gnu.org/software/libtool/;
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     maintainers = [ stdenv.lib.maintainers.ludo ];
   };
diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix
index bdd35dc50f0..ec3a5e9bcbf 100644
--- a/pkgs/development/tools/misc/lsof/default.nix
+++ b/pkgs/development/tools/misc/lsof/default.nix
@@ -12,7 +12,9 @@ stdenv.mkDerivation {
   
   preBuild = "sed -i Makefile -e 's/^CFGF=/&	-DHASIPv6=1/;';";
   
-  configurePhase = "./Configure -n linux;";
+  configurePhase = if stdenv.isDarwin
+    then "./Configure -n darwin;"
+    else "./Configure -n linux;";
   
   installPhase = ''
     mkdir -p $out/bin $out/man/man8
@@ -28,5 +30,6 @@ stdenv.mkDerivation {
       socket (IPv6/IPv4/UNIX local), or partition (by opening a file
       from it).
     '';
+    maintainers = stdenv.lib.maintainers.mornfall;
   };
 }
diff --git a/pkgs/development/tools/misc/ltrace/default.nix b/pkgs/development/tools/misc/ltrace/default.nix
index a436f29df14..1d20d8eef45 100644
--- a/pkgs/development/tools/misc/ltrace/default.nix
+++ b/pkgs/development/tools/misc/ltrace/default.nix
@@ -1,17 +1,18 @@
 { stdenv, fetchurl, elfutils }:
 
 stdenv.mkDerivation rec {
-  name = "ltrace-0.5.3";
+  name = "ltrace-0.7.3";
 
   src = fetchurl {
-    url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.5.3.orig.tar.gz;
-    sha256 = "0cmyw8zyw8b1gszrwizcm53cr0mig1iw3kv18v5952m9spb2frjw";
+    url = ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_0.7.3.orig.tar.bz2;
+    sha256 = "00wmbdghqbz6x95m1mcdd3wd46l6hgcr4wggdp049dbifh3qqvqf";
   };
 
   buildInputs = [ elfutils ];
 
-  preBuild =
+  preConfigure =
     ''
+      configureFlags="--disable-werror"
       makeFlagsArray=(INSTALL="install -c")
     '';
 
diff --git a/pkgs/development/tools/misc/lttng-tools/default.nix b/pkgs/development/tools/misc/lttng-tools/default.nix
index 42d11ebe7c5..5758500d86f 100644
--- a/pkgs/development/tools/misc/lttng-tools/default.nix
+++ b/pkgs/development/tools/misc/lttng-tools/default.nix
@@ -1,16 +1,19 @@
-{ stdenv, fetchurl, popt, libuuid, liburcu, lttngUst }:
+{ stdenv, fetchurl, popt, libuuid, liburcu, lttng-ust, kmod }:
 
 stdenv.mkDerivation rec {
-  name = "lttng-tools-2.3.0";
+  name = "lttng-tools-2.4.1";
 
   src = fetchurl {
     url = "https://lttng.org/files/lttng-tools/${name}.tar.bz2";
-    sha256 = "16j55xqrh00mjbcvdmdkfxchavi7jsxlpnfjqc1g1d3x65ss9wri";
+    sha256 = "1v9f7a3c2shwgn4g759bblgr27h9ql9sfq71r1mbkf8rd235g2jr";
   };
 
-  buildInputs = [ popt libuuid liburcu lttngUst ];
+  buildInputs = [ popt libuuid liburcu lttng-ust ];
 
-  patches = [ ./lttng-change-modprobe-path-from-sbin-modprobe-to-modprobe.patch ];
+  prePatch = ''
+    sed -e "s|/sbin/modprobe|${kmod}/sbin/modprobe|g" \
+        -i src/bin/lttng-sessiond/modprobe.c
+  '';
 
   meta = with stdenv.lib; {
     description = "Tracing tools (kernel + user space) for Linux";
diff --git a/pkgs/development/tools/misc/lttng-tools/lttng-change-modprobe-path-from-sbin-modprobe-to-modprobe.patch b/pkgs/development/tools/misc/lttng-tools/lttng-change-modprobe-path-from-sbin-modprobe-to-modprobe.patch
deleted file mode 100644
index 7d9edbda97a..00000000000
--- a/pkgs/development/tools/misc/lttng-tools/lttng-change-modprobe-path-from-sbin-modprobe-to-modprobe.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From daba2e936571a236817022b760d91c48b730c30b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com>
-Date: Tue, 9 Jul 2013 23:47:47 +0200
-Subject: [PATCH] Change modprobe path from "/sbin/modprobe" to "modprobe"
- (rely on PATH lookup)
-
----
- src/bin/lttng-sessiond/modprobe.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/bin/lttng-sessiond/modprobe.c b/src/bin/lttng-sessiond/modprobe.c
-index 7e06dad..4075efe 100644
---- a/src/bin/lttng-sessiond/modprobe.c
-+++ b/src/bin/lttng-sessiond/modprobe.c
-@@ -90,7 +90,7 @@ void modprobe_remove_lttng_control(void)
- 
- 	for (i = ARRAY_SIZE(kern_modules_control) - 1; i >= 0; i--) {
- 		ret = snprintf(modprobe, sizeof(modprobe),
--				"/sbin/modprobe -r -q %s",
-+				"modprobe -r -q %s",
- 				kern_modules_control[i].name);
- 		if (ret < 0) {
- 			PERROR("snprintf modprobe -r");
-@@ -125,7 +125,7 @@ void modprobe_remove_lttng_data(void)
- 
- 	for (i = ARRAY_SIZE(kern_modules_list) - 1; i >= 0; i--) {
- 		ret = snprintf(modprobe, sizeof(modprobe),
--				"/sbin/modprobe -r -q %s",
-+				"modprobe -r -q %s",
- 				kern_modules_list[i].name);
- 		if (ret < 0) {
- 			PERROR("snprintf modprobe -r");
-@@ -169,7 +169,7 @@ int modprobe_lttng_control(void)
- 
- 	for (i = 0; i < ARRAY_SIZE(kern_modules_control); i++) {
- 		ret = snprintf(modprobe, sizeof(modprobe),
--				"/sbin/modprobe %s%s",
-+				"modprobe %s%s",
- 				kern_modules_control[i].required ? "" : "-q ",
- 				kern_modules_control[i].name);
- 		if (ret < 0) {
-@@ -205,7 +205,7 @@ int modprobe_lttng_data(void)
- 
- 	for (i = 0; i < ARRAY_SIZE(kern_modules_list); i++) {
- 		ret = snprintf(modprobe, sizeof(modprobe),
--				"/sbin/modprobe %s%s",
-+				"modprobe %s%s",
- 				kern_modules_list[i].required ? "" : "-q ",
- 				kern_modules_list[i].name);
- 		if (ret < 0) {
--- 
-1.8.2.3
-
diff --git a/pkgs/development/tools/misc/lttng-ust/default.nix b/pkgs/development/tools/misc/lttng-ust/default.nix
index 014a97a9158..0cba211f28b 100644
--- a/pkgs/development/tools/misc/lttng-ust/default.nix
+++ b/pkgs/development/tools/misc/lttng-ust/default.nix
@@ -12,11 +12,11 @@
 # Debian builds with std.h (systemtap).
 
 stdenv.mkDerivation rec {
-  name = "lttng-ust-2.3.0";
+  name = "lttng-ust-2.4.1";
 
   src = fetchurl {
     url = "https://lttng.org/files/lttng-ust/${name}.tar.bz2";
-    sha256 = "1hazjybrppyaakvfp1bs92vx0n2sgcsw0m6i5hwq7xq8vij7cj4q";
+    sha256 = "1nx9b1haiylajzjy03wgfcy85nwg578c6gy8ip55y8cabjrw0hp1";
   };
 
   buildInputs = [ liburcu ];
diff --git a/pkgs/development/tools/misc/lttv/default.nix b/pkgs/development/tools/misc/lttv/default.nix
index df9f81d02e6..0096cbdbabf 100644
--- a/pkgs/development/tools/misc/lttv/default.nix
+++ b/pkgs/development/tools/misc/lttv/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pkgconfig, glib, gtk2, popt, babeltrace }:
 
 stdenv.mkDerivation rec {
-  name = "lttv-1.5-beta1";
+  name = "lttv-1.5";
 
   src = fetchurl {
     url = "http://lttng.org/files/packages/${name}.tar.bz2";
-    sha256 = "0cz69q189wndwpvic0l6wvzl1nsfqadbrigaaxgzij72r7n89sfc";
+    sha256 = "1faldxnh9dld5k0vxckwpqw241ya1r2zv286l6rpgqr500zqw7r1";
   };
 
   buildInputs = [ pkgconfig glib gtk2 popt babeltrace ];
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
     homepage = http://lttng.org/;
     # liblttvtraceread (ltt/ directory) is distributed under the GNU LGPL v2.1.
     # The rest of the LTTV package is distributed under the GNU GPL v2.
-    license = with licenses; [ gpl2 lgpl21 ];
+    # TODO license = with licenses; [ gpl2 lgpl21 ];
     platforms = platforms.linux;
     maintainers = [ maintainers.bjornfor ];
   };
diff --git a/pkgs/development/tools/misc/luarocks/default.nix b/pkgs/development/tools/misc/luarocks/default.nix
index d905d078d40..4a38762a3ff 100644
--- a/pkgs/development/tools/misc/luarocks/default.nix
+++ b/pkgs/development/tools/misc/luarocks/default.nix
@@ -1,16 +1,16 @@
-{stdenv, fetchurl, lua, curl}:
+{stdenv, fetchurl, lua, curl, makeWrapper, which}:
 let
   s = # Generated upstream information
   rec {
     baseName="luarocks";
-    version="2.1.0";
+    version="2.2.0";
     name="${baseName}-${version}";
-    hash="12aqwchzn77yin2ahpxnc3lam5w0xhksrnhf31n3r7cxdsfh446c";
-    url="http://luarocks.org/releases/luarocks-2.1.0-rc3.tar.gz";
-    sha256="12aqwchzn77yin2ahpxnc3lam5w0xhksrnhf31n3r7cxdsfh446c";
+    hash="1717p694455w1fdldb2ldlyklln8w3bqk1dsly8gpqh3n73lw6lv";
+    url="http://luarocks.org/releases/luarocks-2.2.0-rc1.tar.gz";
+    sha256="1717p694455w1fdldb2ldlyklln8w3bqk1dsly8gpqh3n73lw6lv";
   };
   buildInputs = [
-    lua curl
+    lua curl makeWrapper which
   ];
 in
 stdenv.mkDerivation {
@@ -19,6 +19,29 @@ stdenv.mkDerivation {
   src = fetchurl {
     inherit (s) url sha256;
   };
+  preConfigure = ''
+    lua -e "" || {
+        luajit -e "" && {
+	    export LUA_SUFFIX=jit
+	    configureFlags="$configureFlags --lua-suffix=$LUA_SUFFIX"
+	}
+    }
+    lua_inc="$(echo "${lua}/include"/*/)"
+    if test -n "$lua_inc"; then
+        configureFlags="$configureFlags --with-lua-include=$lua_inc"
+    fi
+  '';
+  postInstall = ''
+    sed -e "1s@.*@#! ${lua}/bin/lua$LUA_SUFFIX@" -i "$out"/bin/*
+    for i in "$out"/bin/*; do
+        test -L "$i" || {
+	    wrapProgram "$i" \
+	      --prefix LUA_PATH ";" "$(echo "$out"/share/lua/*/)?.lua" \
+	      --prefix LUA_PATH ";" "$(echo "$out"/share/lua/*/)?/init.lua" \
+
+	}
+    done
+  '';
   meta = {
     inherit (s) version;
     description = ''A package manager for Lua'';
diff --git a/pkgs/development/tools/misc/ninka/default.nix b/pkgs/development/tools/misc/ninka/default.nix
index a5410204340..dc7eb5cabfd 100644
--- a/pkgs/development/tools/misc/ninka/default.nix
+++ b/pkgs/development/tools/misc/ninka/default.nix
@@ -29,6 +29,6 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A sentence based license detector";
     homepage = "http://ninka.turingmachine.org/";
-    license = "AGPLv3+";
+    license = stdenv.lib.licenses.agpl3Plus;
   };
 }
diff --git a/pkgs/development/tools/misc/opengrok/default.nix b/pkgs/development/tools/misc/opengrok/default.nix
new file mode 100644
index 00000000000..d38c862ecfb
--- /dev/null
+++ b/pkgs/development/tools/misc/opengrok/default.nix
@@ -0,0 +1,29 @@
+{ fetchurl, stdenv, jre, ctags, makeWrapper, coreutils, git }:
+
+stdenv.mkDerivation rec {
+  name = "opengrok-0.12.1";
+
+  src = fetchurl {
+    url = "http://java.net/projects/opengrok/downloads/download/${name}.tar.gz";
+    sha256 = "0ihaqgf1z2gsjmy2q96m0s07dpnh92j3ss3myiqjdsh9957fwg79";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -a * $out/
+    substituteInPlace $out/bin/OpenGrok --replace /bin/uname ${coreutils}/bin/uname
+    wrapProgram $out/bin/OpenGrok \
+      --prefix PATH : "${ctags}/bin:${git}/bin" \
+      --set JAVA_HOME "${jre}" \
+      --set OPENGROK_TOMCAT_BASE "/var/tomcat"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Source code search and cross reference engine";
+    homepage = http://opengrok.github.io/OpenGrok/;
+    license = licenses.cddl;
+    maintainers = [ maintainers.lethalman ];
+  };
+}
diff --git a/pkgs/development/tools/misc/openocd/default.nix b/pkgs/development/tools/misc/openocd/default.nix
index e0da284887c..7334fa8754f 100644
--- a/pkgs/development/tools/misc/openocd/default.nix
+++ b/pkgs/development/tools/misc/openocd/default.nix
@@ -1,38 +1,52 @@
-{stdenv, fetchurl, libftdi, libusb1 }:
+{ stdenv, fetchurl, libftdi, libusb1, pkgconfig }:
+
+# TODO: Add "hidapi" as dependency to gain access to CMSIS-DAP debuggers.
+# Support should be auto-detected, but if not, pass "--enable-cmsis-dap" to
+# configure.
 
 stdenv.mkDerivation rec {
   name = "openocd-${version}";
-  version = "0.7.0";
+  version = "0.8.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/openocd/openocd-${version}.tar.bz2";
-    sha256 = "0qwfyd821sy5p0agz0ybgn5nd7vplipw4mhm485ldj1hcmw7n8sj";
+    sha256 = "0byk7hnccgmhw0f84qlkfhps38gp2xp628bfrsc03vq08hr6q1sv";
   };
 
-  configureFlags = [ "--enable-ft2232_libftdi"
-                     "--enable-jlink"
-                     "--enable-rlink"
-                     "--enable-ulink"
-                     "--enable-stlink" ];
-
-  buildInputs = [ libftdi libusb1 ];
+  buildInputs = [ libftdi libusb1 pkgconfig ];
 
-  meta = {
-    homepage = http://openocd.sourceforge.net/;
-    description = "OpenOCD, an on-chip debugger";
+  configureFlags = [
+    "--enable-jtag_vpi"
+    "--enable-usb_blaster_libftdi"
+    "--enable-amtjtagaccel"
+    "--enable-gw16012"
+    "--enable-presto_libftdi"
+    "--enable-openjtag_ftdi"
+    "--enable-oocd_trace"
+    "--enable-buspirate"
+    "--enable-sysfsgpio"
+    "--enable-remote-bitbang"
+  ];
 
-    longDescription =
-      '' OpenOCD provides on-chip programming and debugging support with a
-         layered architecture of JTAG interface and TAP support, debug target
-         support (e.g. ARM, MIPS), and flash chip drivers (e.g. CFI, NAND,
-         etc.).  Several network interfaces are available for interactiving
-         with OpenOCD: HTTP, telnet, TCL, and GDB.  The GDB server enables
-         OpenOCD to function as a "remote target" for source-level debugging
-         of embedded systems using the GNU GDB program.
-      '';
+  postInstall = ''
+    mkdir -p "$out/etc/udev/rules.d"
+    ln -s "$out/share/openocd/contrib/99-openocd.rules" "$out/etc/udev/rules.d/99-openocd.rules"
+  '';
 
-    license = "GPLv2+";
-    maintainers = with stdenv.lib.maintainers; [ viric bjornfor ];
-    platforms = with stdenv.lib.platforms; linux;
+  meta = with stdenv.lib; {
+    description = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing";
+    longDescription = ''
+      OpenOCD provides on-chip programming and debugging support with a layered
+      architecture of JTAG interface and TAP support, debug target support
+      (e.g. ARM, MIPS), and flash chip drivers (e.g. CFI, NAND, etc.).  Several
+      network interfaces are available for interactiving with OpenOCD: HTTP,
+      telnet, TCL, and GDB.  The GDB server enables OpenOCD to function as a
+      "remote target" for source-level debugging of embedded systems using the
+      GNU GDB program.
+    '';
+    homepage = http://openocd.sourceforge.net/;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ viric bjornfor ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/tools/misc/patchelf/default.nix b/pkgs/development/tools/misc/patchelf/default.nix
index 65edd1a5187..32da8e40c92 100644
--- a/pkgs/development/tools/misc/patchelf/default.nix
+++ b/pkgs/development/tools/misc/patchelf/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "patchelf-0.6";
+  name = "patchelf-0.8";
 
   src = fetchurl {
     url = "http://nixos.org/releases/patchelf/${name}/${name}.tar.bz2";
-    sha256 = "fc7e7fa95f282fc37a591a802629e0e1ed07bc2a8bf162228d9a69dd76127c01";
+    sha256 = "c99f84d124347340c36707089ec8f70530abd56e7827c54d506eb4cc097a17e7";
   };
 
   doCheck = true;
@@ -14,5 +14,7 @@ stdenv.mkDerivation rec {
     homepage = http://nixos.org/patchelf.html;
     license = "GPL";
     description = "A small utility to modify the dynamic linker and RPATH of ELF executables";
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+    platforms = stdenv.lib.platforms.all;
   };
 }
diff --git a/pkgs/development/tools/misc/patchelf/unstable.nix b/pkgs/development/tools/misc/patchelf/unstable.nix
deleted file mode 100644
index aa8418496ea..00000000000
--- a/pkgs/development/tools/misc/patchelf/unstable.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ stdenv, fetchurl }:
-
-stdenv.mkDerivation rec {
-  name = "patchelf-0.7pre160_1c057cd";
-
-  src = fetchurl {
-    url = http://hydra.nixos.org/build/2961500/download/2/patchelf-0.7pre160_1c057cd.tar.bz2;
-    sha256 = "bbc46169f6b6803410e0072cf57e631481e3d5f1dde234f4eacbccb6562c5f4f";
-  };
-
-  meta = {
-    homepage = http://nixos.org/patchelf.html;
-    license = "GPL";
-    description = "A small utility to modify the dynamic linker and RPATH of ELF executables";
-  };
-}
diff --git a/pkgs/development/tools/misc/pkgconfig/default.nix b/pkgs/development/tools/misc/pkgconfig/default.nix
index 49b2cbfe66e..2ce1fd7b6e4 100644
--- a/pkgs/development/tools/misc/pkgconfig/default.nix
+++ b/pkgs/development/tools/misc/pkgconfig/default.nix
@@ -1,15 +1,17 @@
 {stdenv, fetchurl, automake, vanilla ? false}:
 
 stdenv.mkDerivation (rec {
-  name = "pkg-config-0.23";
+  name = "pkg-config-0.28";
   
   setupHook = ./setup-hook.sh;
   
   src = fetchurl {
     url = "http://pkgconfig.freedesktop.org/releases/${name}.tar.gz";
-    sha256 = "0lrvk17724mc2nzpaa0vwybarrl50r7qdnr4h6jijm50srrf1808";
+    sha256 = "0igqq5m204w71m11y0nipbdf5apx87hwfll6axs12hn4dqfb6vkb";
   };
 
+  configureFlags = [ "--with-internal-glib" ];
+
   patches = if vanilla then [] else [
     # Process Requires.private properly, see
     # http://bugs.freedesktop.org/show_bug.cgi?id=4738.
diff --git a/pkgs/development/tools/misc/pkgconfig/requires-private.patch b/pkgs/development/tools/misc/pkgconfig/requires-private.patch
index f5dee097d60..d40aa980137 100644
--- a/pkgs/development/tools/misc/pkgconfig/requires-private.patch
+++ b/pkgs/development/tools/misc/pkgconfig/requires-private.patch
@@ -1,221 +1,17 @@
-diff -rc pkg-config-0.23-orig/main.c pkg-config-0.23/main.c
-*** pkg-config-0.23-orig/main.c	2008-01-16 23:06:48.000000000 +0100
---- pkg-config-0.23/main.c	2008-10-14 13:04:04.000000000 +0200
-***************
-*** 431,436 ****
---- 431,454 ----
-    else
-      disable_private_libs();
-  
-+   /* Only process Requires field if cflags or libs wanted */
-+   if (want_libs ||
-+       want_cflags ||
-+       want_l_libs ||
-+       want_L_libs ||
-+       want_other_libs ||
-+       want_I_cflags ||
-+       want_other_cflags)
-+     enable_requires();
-+   else
-+     disable_requires();
-+ 
-+   /* Only process Requires.private if static libs wanted */
-+   if (want_static_lib_list)
-+     enable_requires_private();
-+   else
-+     disable_requires_private();
-+ 
-    if (want_my_version)
-      {
-        printf ("%s\n", VERSION);
-diff -rc pkg-config-0.23-orig/parse.c pkg-config-0.23/parse.c
-*** pkg-config-0.23-orig/parse.c	2008-01-16 21:42:49.000000000 +0100
---- pkg-config-0.23/parse.c	2008-10-13 14:41:42.000000000 +0200
-***************
-*** 913,919 ****
-  #endif
-  
-  static void
-! parse_line (Package *pkg, const char *untrimmed, const char *path, gboolean ignore_requires, gboolean ignore_private_libs)
-  {
-    char *str;
-    char *p;
---- 913,921 ----
-  #endif
-  
-  static void
-! parse_line (Package *pkg, const char *untrimmed, const char *path,
-!             gboolean ignore_requires, gboolean ignore_requires_private,
-!             gboolean ignore_private_libs)
-  {
-    char *str;
-    char *p;
-***************
-*** 956,970 ****
-          parse_description (pkg, p, path);
-        else if (strcmp (tag, "Version") == 0)
-          parse_version (pkg, p, path);
-!       else if (strcmp (tag, "Requires.private") == 0)
-! 	parse_requires_private (pkg, p, path);
-!       else if (strcmp (tag, "Requires") == 0)
-! 	{
-!           if (ignore_requires == FALSE)
-! 	    parse_requires (pkg, p, path);
-!           else
-! 	    goto cleanup;
-!         }
-        else if ((strcmp (tag, "Libs.private") == 0) && 
-                 ignore_private_libs == FALSE)
-          parse_libs_private (pkg, p, path);
---- 958,969 ----
-          parse_description (pkg, p, path);
-        else if (strcmp (tag, "Version") == 0)
-          parse_version (pkg, p, path);
-!       else if ((strcmp (tag, "Requires.private") == 0) &&
-!                ignore_requires_private == FALSE)
-!         parse_requires_private (pkg, p, path);
-!       else if ((strcmp (tag, "Requires") == 0) &&
-!                ignore_requires == FALSE)
-!         parse_requires (pkg, p, path);
-        else if ((strcmp (tag, "Libs.private") == 0) && 
-                 ignore_private_libs == FALSE)
-          parse_libs_private (pkg, p, path);
-***************
-*** 1067,1073 ****
-  }
-  
-  Package*
-! parse_package_file (const char *path, gboolean ignore_requires, gboolean ignore_private_libs)
-  {
-    FILE *f;
-    Package *pkg;
---- 1066,1074 ----
-  }
-  
-  Package*
-! parse_package_file (const char *path, gboolean ignore_requires,
-!                     gboolean ignore_requires_private,
-!                     gboolean ignore_private_libs)
-  {
-    FILE *f;
-    Package *pkg;
-***************
-*** 1104,1110 ****
-      {
-        one_line = TRUE;
-        
-!       parse_line (pkg, str->str, path, ignore_requires, ignore_private_libs);
-  
-        g_string_truncate (str, 0);
-      }
---- 1105,1112 ----
-      {
-        one_line = TRUE;
-        
-!       parse_line (pkg, str->str, path, ignore_requires,
-!                   ignore_requires_private, ignore_private_libs);
-  
-        g_string_truncate (str, 0);
-      }
-diff -rc pkg-config-0.23-orig/parse.h pkg-config-0.23/parse.h
-*** pkg-config-0.23-orig/parse.h	2008-01-16 21:42:49.000000000 +0100
---- pkg-config-0.23/parse.h	2008-10-13 14:41:42.000000000 +0200
-***************
-*** 23,28 ****
---- 23,29 ----
-  #include "pkg.h"
-  
-  Package *parse_package_file (const char *path, gboolean ignore_requires,
-+                              gboolean ignore_requires_private,
-                               gboolean ignore_private_libs);
-  
-  Package *get_compat_package (const char *name);
-diff -rc pkg-config-0.23-orig/pkg.c pkg-config-0.23/pkg.c
-*** pkg-config-0.23-orig/pkg.c	2008-01-16 22:59:49.000000000 +0100
---- pkg-config-0.23/pkg.c	2008-10-13 14:41:42.000000000 +0200
-***************
-*** 55,60 ****
---- 55,61 ----
-  
-  gboolean disable_uninstalled = FALSE;
-  gboolean ignore_requires = FALSE;
-+ gboolean ignore_requires_private = FALSE;
-  gboolean ignore_private_libs = TRUE;
-  
-  void
-***************
-*** 337,343 ****
-      }
-  
-    debug_spew ("Reading '%s' from file '%s'\n", name, location);
-!   pkg = parse_package_file (location, ignore_requires, ignore_private_libs);
-    
-    if (pkg == NULL)
-      {
---- 338,345 ----
-      }
-  
-    debug_spew ("Reading '%s' from file '%s'\n", name, location);
-!   pkg = parse_package_file (location, ignore_requires, ignore_requires_private,
-!                             ignore_private_libs);
-    
-    if (pkg == NULL)
-      {
-***************
-*** 1506,1511 ****
---- 1508,1514 ----
-    int mlen = 0;
-    
-    ignore_requires = TRUE;
-+   ignore_requires_private = TRUE;
-  
-    g_hash_table_foreach (locations, max_len_foreach, &mlen);
-    g_hash_table_foreach (locations, packages_foreach, GINT_TO_POINTER (mlen + 1));
-***************
-*** 1522,1524 ****
---- 1525,1551 ----
-  {
-    ignore_private_libs = TRUE;
-  }
-+ 
-+ void
-+ enable_requires(void)
-+ {
-+   ignore_requires = FALSE;
-+ }
-+ 
-+ void
-+ disable_requires(void)
-+ {
-+   ignore_requires = TRUE;
-+ }
-+ 
-+ void
-+ enable_requires_private(void)
-+ {
-+   ignore_requires_private = FALSE;
-+ }
-+ 
-+ void
-+ disable_requires_private(void)
-+ {
-+   ignore_requires_private = TRUE;
-+ }
-diff -rc pkg-config-0.23-orig/pkg.h pkg-config-0.23/pkg.h
-*** pkg-config-0.23-orig/pkg.h	2008-01-16 22:27:19.000000000 +0100
---- pkg-config-0.23/pkg.h	2008-10-13 14:41:42.000000000 +0200
-***************
-*** 120,125 ****
---- 120,131 ----
-  void enable_private_libs(void);
-  void disable_private_libs(void);
-  
-+ void enable_requires(void);
-+ void disable_requires(void);
-+ 
-+ void enable_requires_private(void);
-+ void disable_requires_private(void);
-+ 
-  /* If TRUE, do not automatically prefer uninstalled versions */
-  extern gboolean disable_uninstalled;
-  
+diff --git a/main.c b/main.c
+index b61ca34..5a420c2 100644
+--- a/main.c
++++ b/main.c
+@@ -602,10 +602,10 @@ main (int argc, char **argv)
+   else
+     disable_private_libs();
+ 
+-  /* honor Requires.private if any Cflags are requested or any static
++  /* honor Requires.private if any any static
+    * libs are requested */
+ 
+-  if (pkg_flags & CFLAGS_ANY || want_requires_private || want_exists ||
++  if (want_requires_private ||
+       (want_static_lib_list && (pkg_flags & LIBS_ANY)))
+     enable_requires_private();
+ 
diff --git a/pkgs/development/tools/misc/pmccabe/default.nix b/pkgs/development/tools/misc/pmccabe/default.nix
index 10cf371f13a..a71afd5d472 100644
--- a/pkgs/development/tools/misc/pmccabe/default.nix
+++ b/pkgs/development/tools/misc/pmccabe/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
   meta = {
     description = "McCabe-style function complexity and line counting for C and C++";
     homepage = http://www.parisc-linux.org/~bame/pmccabe/;
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     longDescription = ''
       pmccabe calculates McCabe-style cyclomatic complexity for C and
diff --git a/pkgs/development/tools/misc/prelink/default.nix b/pkgs/development/tools/misc/prelink/default.nix
new file mode 100644
index 00000000000..15abc1f48c1
--- /dev/null
+++ b/pkgs/development/tools/misc/prelink/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, libelf }:
+
+let
+  version = "20130503";
+in
+stdenv.mkDerivation rec {
+  name = "prelink-${version}";
+
+  buildInputs = [ libelf ];
+
+  src = fetchurl {
+    url = "http://people.redhat.com/jakub/prelink/prelink-${version}.tar.bz2";
+    sha256 = "1w20f6ilqrz8ca51qhrn1n13h7q1r34k09g33d6l2vwvbrhcffb3";
+  };
+
+  meta = {
+    homepage = http://people.redhat.com/jakub/prelink/;
+    license = "GPL";
+    description = "ELF prelinking utility to speed up dynamic linking";
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/tools/misc/premake/default.nix b/pkgs/development/tools/misc/premake/default.nix
index 8dce23aa959..770c8071095 100644
--- a/pkgs/development/tools/misc/premake/default.nix
+++ b/pkgs/development/tools/misc/premake/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, unzip}:
+{ stdenv, fetchurl, unzip }:
 
 let baseName = "premake";
   version  = "4.3";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
     sha256 = "1017rd0wsjfyq2jvpjjhpszaa7kmig6q1nimw76qx3cjz2868lrn";
   };
 
-  buildInputs = [unzip];
+  buildInputs = [ unzip ];
 
   buildPhase = ''
     make -C build/gmake.unix/
@@ -27,6 +27,6 @@ stdenv.mkDerivation {
     description = "A simple build configuration and project generation tool using lua";
     license = stdenv.lib.licenses.bsd3;
     platforms = platforms.linux;
-    maintainers = [maintainers.bjornfor];
+    maintainers = [ maintainers.bjornfor ];
   };
 }
diff --git a/pkgs/development/tools/misc/saleae-logic/default.nix b/pkgs/development/tools/misc/saleae-logic/default.nix
index 8fcf254e8ca..2fa7194cf07 100644
--- a/pkgs/development/tools/misc/saleae-logic/default.nix
+++ b/pkgs/development/tools/misc/saleae-logic/default.nix
@@ -3,6 +3,8 @@
 # Suggested udev rules to be able to access the Logic device without being root:
 #   SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="0925", ATTR{idProduct}=="3881", MODE="0666"
 #   SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="21a9", ATTR{idProduct}=="1001", MODE="0666"
+#
+# In NixOS, simply add this package to services.udev.packages.
 
 { stdenv, fetchurl, unzip, glib, libSM, libICE, gtk, libXext, libXft
 , fontconfig, libXrender, libXfixes, libX11, libXi, libXrandr, libXcursor
@@ -79,6 +81,10 @@ stdenv.mkDerivation rec {
     # Copy the generated .desktop file
     mkdir -p "$out/share/applications"
     cp "$desktopItem"/share/applications/* "$out/share/applications/"
+
+    # Install provided udev rules
+    mkdir -p "$out/etc/udev/rules.d"
+    cp Drivers/99-SaleaeLogic.rules "$out/etc/udev/rules.d/"
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/tools/misc/sloccount/default.nix b/pkgs/development/tools/misc/sloccount/default.nix
index 9dc50abf3f7..455305be749 100644
--- a/pkgs/development/tools/misc/sloccount/default.nix
+++ b/pkgs/development/tools/misc/sloccount/default.nix
@@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
       the Perl CPAN library using this tool suite.
     '';
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     homepage = http://www.dwheeler.com/sloccount/;
 
diff --git a/pkgs/development/tools/misc/srecord/default.nix b/pkgs/development/tools/misc/srecord/default.nix
index 25140093f51..e316b4a628e 100644
--- a/pkgs/development/tools/misc/srecord/default.nix
+++ b/pkgs/development/tools/misc/srecord/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, boost, libtool, groff, ghostscript }:
 
 stdenv.mkDerivation rec {
-  name = "srecord-1.62";
+  name = "srecord-1.63";
 
   src = fetchurl {
     url = "mirror://sourceforge/srecord/${name}.tar.gz";
-    sha256 = "0bfbmhsm9mbwiik3yrhm95q8bgx1k4mh2ai412k8zjyi8f5f3904";
+    sha256 = "06mzj9lrk8lzfzhnfyh8xm4p92j242jik6zm37ihcia20inwgzkq";
   };
 
   buildInputs = [ boost libtool groff ghostscript ];
diff --git a/pkgs/development/tools/misc/stlink/default.nix b/pkgs/development/tools/misc/stlink/default.nix
index 675f8f7f2af..13796453eba 100644
--- a/pkgs/development/tools/misc/stlink/default.nix
+++ b/pkgs/development/tools/misc/stlink/default.nix
@@ -8,11 +8,12 @@
 # SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE:="0666", SYMLINK+="stlinkv2_%n"
 
 stdenv.mkDerivation {
-  name = "stlink-git20130306";
+  name = "stlink-20130306";
 
   src = fetchgit {
     url = git://github.com/texane/stlink.git;
     rev = "5be889e3feb75fc7f594012c4855b4dc16940050";
+    sha256 = "1xbfr1kz4k6hhl0xpqn1vi83fdynjxx3ymn9gb7b0pb7h6ncjcyr";
   };
 
   buildInputs = [ autoconf automake libtool pkgconfig libusb1 ];
@@ -22,6 +23,6 @@ stdenv.mkDerivation {
     description = "In-circuit debug and programming for ST-Link devices";
     license = licenses.bsd3;
     platforms = platforms.linux;
-    maintainers = [maintainers.bjornfor];
+    maintainers = [ maintainers.bjornfor ];
   };
 }
diff --git a/pkgs/development/tools/misc/stm32flash/default.nix b/pkgs/development/tools/misc/stm32flash/default.nix
index 6b99a5755e4..6b06bf385b3 100644
--- a/pkgs/development/tools/misc/stm32flash/default.nix
+++ b/pkgs/development/tools/misc/stm32flash/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
   meta = with stdenv.lib; {
     description = "Open source flash program for the STM32 ARM processors using the ST bootloader";
     homepage = https://code.google.com/p/stm32flash/;
-    license = "GPLv2";
+    license = stdenv.lib.licenses.gpl2;
     platforms = platforms.all; # Should work on all platforms
     maintainers = [ maintainers.the-kenny ];
   };
diff --git a/pkgs/development/tools/misc/strace/default.nix b/pkgs/development/tools/misc/strace/default.nix
index bdf3a7d0561..732423da5cd 100644
--- a/pkgs/development/tools/misc/strace/default.nix
+++ b/pkgs/development/tools/misc/strace/default.nix
@@ -15,5 +15,6 @@ stdenv.mkDerivation rec {
     description = "A system call tracer for Linux";
     license = licenses.bsd3;
     platforms = platforms.linux;
+    maintainers = maintainers.mornfall;
   };
 }
diff --git a/pkgs/development/tools/misc/swig/2.x.nix b/pkgs/development/tools/misc/swig/2.x.nix
index f56598e2f0f..b51ce0f2d5a 100644
--- a/pkgs/development/tools/misc/swig/2.x.nix
+++ b/pkgs/development/tools/misc/swig/2.x.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pcre }:
 
 stdenv.mkDerivation rec {
-  name = "swig-2.0.4";
+  name = "swig-2.0.11";
 
   src = fetchurl {
     url = "mirror://sourceforge/swig/${name}.tar.gz";
-    sha256 = "12pcw4whi36vd41c43v8c62bn7vnq331hmvzsrg8wvyj61vi2fkn";
+    sha256 = "0kj21b6syp62vx68r1j6azv9033kng68pxm1k79pm4skkzr0ny33";
   };
 
   buildInputs = [ pcre ];
@@ -28,6 +28,8 @@ stdenv.mkDerivation rec {
     # Licensing is a mess: http://www.swig.org/Release/LICENSE .
     license = "BSD-style";
 
+    platforms = stdenv.lib.platforms.linux;
+
     maintainers = with stdenv.lib.maintainers; [ urkud ];
   };
 }
diff --git a/pkgs/development/tools/misc/swig/3.x.nix b/pkgs/development/tools/misc/swig/3.x.nix
new file mode 100644
index 00000000000..653fb061603
--- /dev/null
+++ b/pkgs/development/tools/misc/swig/3.x.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, pcre }:
+
+stdenv.mkDerivation rec {
+  name = "swig-3.0.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/swig/${name}.tar.gz";
+    sha256 = "99cab1055877d00280509f0e04c1fe76643ec3792e9b8e7efcc9aa6e247229df";
+  };
+
+  buildInputs = [ pcre ];
+
+  meta = {
+    description = "SWIG, an interface compiler that connects C/C++ code to higher-level languages";
+
+    longDescription = ''
+       SWIG is an interface compiler that connects programs written in C and
+       C++ with languages such as Perl, Python, Ruby, Scheme, and Tcl.  It
+       works by taking the declarations found in C/C++ header files and using
+       them to generate the wrapper code that scripting languages need to
+       access the underlying C/C++ code.  In addition, SWIG provides a variety
+       of customization features that let you tailor the wrapping process to
+       suit your application.
+    '';
+
+    homepage = http://swig.org/;
+
+    # Licensing is a mess: http://www.swig.org/Release/LICENSE .
+    license = "BSD-style";
+
+    platforms = stdenv.lib.platforms.linux;
+
+    maintainers = with stdenv.lib.maintainers; [ urkud ];
+  };
+}
diff --git a/pkgs/development/tools/misc/swig/default.nix b/pkgs/development/tools/misc/swig/default.nix
index 1f37fd87f8a..09978b5ad65 100644
--- a/pkgs/development/tools/misc/swig/default.nix
+++ b/pkgs/development/tools/misc/swig/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, boost }:
+{ stdenv, fetchurl, boost, tcl }:
 
 stdenv.mkDerivation rec {
   name = "swig-1.3.40";
@@ -8,18 +8,11 @@ stdenv.mkDerivation rec {
     sha256 = "02dc8g8wy75nd2is1974rl24c6mdl0ai1vszs1xpg9nd7dlv6i8r";
   };
 
-  #buildInputs = [ boost ]; # needed for `make check'
+  doCheck = true;
+  # 'make check' uses boost and tcl
+  buildInputs = stdenv.lib.optionals doCheck [ boost tcl ];
 
-  /* The test suite fails this way:
-
-      building python_cpp
-      python: tpp.c:63: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= __sched_fifo_min_prio && new_prio <= __sched_fifo_max_prio)' failed.
-      /bin/sh: line 1: 32101 Aborted                 env LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH PYTHONPATH=.:$PYTHONPATH python ./li_boost_shared_ptr_runme.py
-      make[1]: *** [li_boost_shared_ptr.cpptest] Error 134
-
-     This may be an uninitialized mutex or mutexattr or something.
-   */
-  doCheck = false;
+  configureFlags = stdenv.lib.optionalString stdenv.isDarwin "--disable-ccache";
 
   meta = {
     description = "SWIG, an interface compiler that connects C/C++ code to higher-level languages";
@@ -39,6 +32,8 @@ stdenv.mkDerivation rec {
     # Licensing is a mess: http://www.swig.org/Release/LICENSE .
     license = "BSD-style";
 
+    platforms = stdenv.lib.platforms.all;
+
     maintainers = [ ];
   };
 }
diff --git a/pkgs/development/tools/misc/sysbench/default.nix b/pkgs/development/tools/misc/sysbench/default.nix
index e3acf620c73..1b4cab361ce 100644
--- a/pkgs/development/tools/misc/sysbench/default.nix
+++ b/pkgs/development/tools/misc/sysbench/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "Modular, cross-platform and multi-threaded benchmark tool";
-    license = "GPLv2";
+    license = stdenv.lib.licenses.gpl2;
     platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/development/tools/misc/tcptrack/default.nix b/pkgs/development/tools/misc/tcptrack/default.nix
index 43ff8df70d2..645bd061177 100644
--- a/pkgs/development/tools/misc/tcptrack/default.nix
+++ b/pkgs/development/tools/misc/tcptrack/default.nix
@@ -17,6 +17,6 @@ stdenv.mkDerivation rec {
     homepage = http://www.rhythm.cx/~steve/devel/tcptrack/; # dead link
     license = licenses.lgpl21;
     platforms = platforms.linux;
-    maintainers = [maintainers.bjornfor];
+    maintainers = [ maintainers.bjornfor ];
   };
 }
diff --git a/pkgs/development/tools/misc/teensy/default.nix b/pkgs/development/tools/misc/teensy/default.nix
new file mode 100644
index 00000000000..9902cd03453
--- /dev/null
+++ b/pkgs/development/tools/misc/teensy/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, unzip, libusb }:
+let
+  version = "2.1";
+in
+stdenv.mkDerivation {
+  name = "teensy-loader-${version}";
+  src = fetchurl {
+    url = "http://www.pjrc.com/teensy/teensy_loader_cli.2.1.zip";
+    sha256 = "0iidj3q0l2hds1gaadnwgni4qdgk6r0nv101986jxda8cw6h9zfs";
+  };
+
+  buildInputs = [ unzip libusb ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -v teensy_loader_cli $out/bin/
+  '';
+
+  meta = with stdenv.lib; {
+    license = licenses.gpl3;
+    description = "Firmware uploader for the Teensy microcontroller board";
+    homepage = http://www.pjrc.com/teensy/;
+    maintainers = with maintainers; [ the-kenny ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/development/tools/misc/texi2html/default.nix b/pkgs/development/tools/misc/texi2html/default.nix
index 7fa604e4af6..1f36a14fa97 100644
--- a/pkgs/development/tools/misc/texi2html/default.nix
+++ b/pkgs/development/tools/misc/texi2html/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   meta = { 
     description = "Perl script which converts Texinfo source files to HTML output";
     homepage = http://www.nongnu.org/texi2html/;
-    license = "GPLv2";
+    license = stdenv.lib.licenses.gpl2;
     maintainers = [stdenv.lib.maintainers.marcweber];
     platforms = stdenv.lib.platforms.linux;
   };
diff --git a/pkgs/development/tools/misc/texinfo/4.13a.nix b/pkgs/development/tools/misc/texinfo/4.13a.nix
index 9a41d296342..5131d381412 100644
--- a/pkgs/development/tools/misc/texinfo/4.13a.nix
+++ b/pkgs/development/tools/misc/texinfo/4.13a.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
       well-integrated with GNU Emacs.
     '';
 
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
 
     homepage = http://www.gnu.org/software/texinfo/;
   };
diff --git a/pkgs/development/tools/misc/texinfo/4.9.nix b/pkgs/development/tools/misc/texinfo/4.9.nix
deleted file mode 100644
index fd42093e561..00000000000
--- a/pkgs/development/tools/misc/texinfo/4.9.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{stdenv, fetchurl, ncurses}:
-
-stdenv.mkDerivation {
-  name = "texinfo-4.9";
-  src = fetchurl {
-    url = mirror://gnu/texinfo/texinfo-4.9.tar.bz2;
-    sha256 = "0h7q9h405m88fjj067brzniiv8306ryl087pgjpmbpd2jci9h6g7";
-  };
-  buildInputs = [ncurses];
-}
diff --git a/pkgs/development/tools/misc/texinfo/5.1.nix b/pkgs/development/tools/misc/texinfo/5.2.nix
index 2f318f18d54..804e7a2527f 100644
--- a/pkgs/development/tools/misc/texinfo/5.1.nix
+++ b/pkgs/development/tools/misc/texinfo/5.2.nix
@@ -1,26 +1,28 @@
-{ stdenv, fetchurl, ncurses, perl }:
+{ stdenv, fetchurl, ncurses, perl, xz, interactive ? false }:
 
 stdenv.mkDerivation rec {
-  name = "texinfo-5.1";
+  name = "texinfo-5.2";
 
   src = fetchurl {
     url = "mirror://gnu/texinfo/${name}.tar.xz";
-    sha256 = "0864v5i488x3mb3v5p6nhy2kw0mqkzpa3b0453iibj81zlpq078q";
+    sha256 = "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal";
   };
 
-  buildInputs = [ ncurses perl ];
+  buildInputs = [ perl xz ]
+    ++ stdenv.lib.optional interactive ncurses;
 
   preInstall = ''
     installFlags="TEXMF=$out/texmf-dist";
     installTargets="install install-tex";
   '';
 
-  doCheck = true;
+  doCheck = !stdenv.isDarwin;
 
   meta = {
     homepage = "http://www.gnu.org/software/texinfo/";
     description = "GNU Texinfo, the GNU documentation system";
     license = stdenv.lib.licenses.gpl3Plus;
+    platforms = stdenv.lib.platforms.all;
 
     longDescription = ''
       Texinfo is the official documentation format of the GNU project.
diff --git a/pkgs/development/tools/misc/uhd/default.nix b/pkgs/development/tools/misc/uhd/default.nix
new file mode 100644
index 00000000000..67ef086941e
--- /dev/null
+++ b/pkgs/development/tools/misc/uhd/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, fetchurl, cmake, pkgconfig, python, cheetahTemplate, orc, libusb1, boost }:
+
+# You need these udev rules to not have to run as root (copied from
+# ${uhd}/share/uhd/utils/uhd-usrp.rules):
+#
+#   SUBSYSTEMS=="usb", ATTRS{idVendor}=="fffe", ATTRS{idProduct}=="0002", MODE:="0666"
+#   SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0002", MODE:="0666"
+
+stdenv.mkDerivation rec {
+  name = "uhd-${version}";
+  version = "3.7.0";
+
+  # UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz
+  # and xxx.yyy.zzz. Hrmpf...
+
+  src = fetchurl {
+    name = "${name}.tar.gz";
+    url = "https://github.com/EttusResearch/uhd/archive/release_003_007_000.tar.gz";
+    sha256 = "0x9imfy63s6wlbilr2n82c15nd33ix0mbap0q1xwh2pj1mk4d5jk";
+  };
+
+  cmakeFlags = "-DLIBUSB_INCLUDE_DIRS=${libusb1}/include/libusb-1.0";
+
+  buildInputs = [ cmake pkgconfig python cheetahTemplate orc libusb1 boost ];
+
+  # Build only the host software
+  preConfigure = "cd host";
+
+  # Firmware images are downloaded (pre-built)
+  uhdImagesName = "uhd-images_003.007.000-release";
+  uhdImagesSrc = fetchurl {
+    url = "http://files.ettus.com/binaries/maint_images/archive/${uhdImagesName}.tar.gz";
+    sha256 = "0vb0rc5ji8n6l6ycvd7pbazxzm0ihvkmqm77jflqrd3kky8r722d";
+  };
+
+  postPhases = [ "installFirmware" ];
+
+  installFirmware = ''
+    tar --strip-components=1 -xvf "${uhdImagesSrc}" -C "$out"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "USRP Hardware Driver (for Software Defined Radio)";
+    longDescription = ''
+      The USRP Hardware Driver (UHD) software is the hardware driver for all
+      USRP (Universal Software Radio Peripheral) devices.
+
+      USRP devices are designed and sold by Ettus Research, LLC and its parent
+      company, National Instruments.
+    '';
+    homepage = http://ettus-apps.sourcerepo.com/redmine/ettus/projects/uhd/wiki;
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/pkgs/development/tools/misc/uisp/default.nix b/pkgs/development/tools/misc/uisp/default.nix
index 732d3ab92c1..234ff82b50a 100644
--- a/pkgs/development/tools/misc/uisp/default.nix
+++ b/pkgs/development/tools/misc/uisp/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
 
   meta = {
     description = "Tool for AVR microcontrollers which can interface to many hardware in-system programmers";
-    license = "GPL-2";
+    license = stdenv.lib.licenses.gpl2;
     homepage = http://savannah.nongnu.org/projects/uisp;
   };
 }
diff --git a/pkgs/development/tools/misc/usb-modeswitch/default.nix b/pkgs/development/tools/misc/usb-modeswitch/default.nix
index 48a823c3c65..bba7ef7fad0 100644
--- a/pkgs/development/tools/misc/usb-modeswitch/default.nix
+++ b/pkgs/development/tools/misc/usb-modeswitch/default.nix
@@ -1,11 +1,11 @@
-{ stdenv, fetchurl, libusb }:
+{ stdenv, fetchurl, pkgconfig, libusb1 }:
 
-stdenv.mkDerivation {
-  name = "usb-modeswitch-1.1.2";
+stdenv.mkDerivation rec {
+  name = "usb-modeswitch-2.2.0";
 
   src =fetchurl {
-    url = "http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-1.1.2.tar.bz2";
-    sha256 = "1wzhd0r49nh5y43qrvsi3c7a29206zwd6v8xlpb8dqm40xg3j9nz";
+    url = "http://www.draisberghof.de/usb_modeswitch/${name}.tar.bz2";
+    sha256 = "0flaj3mq0xhzk72kkpclwglf77kcw5rkwvkaimn5zvbiw4yi0li7";
   };
 
   # make clean: we always build from source. It should be necessary on x86_64 only
@@ -16,10 +16,10 @@ stdenv.mkDerivation {
     makeFlags="DESTDIR=$out PREFIX=$out"
   '';
 
-  buildInputs = [ libusb ];
+  buildInputs = [ pkgconfig libusb1 ];
 
   meta = {
-    license = "GPLv2";
+    license = stdenv.lib.licenses.gpl2;
     maintainers = [ stdenv.lib.maintainers.marcweber ];
     platforms = stdenv.lib.platforms.linux;
   };
diff --git a/pkgs/development/tools/misc/xxdiff/default.nix b/pkgs/development/tools/misc/xxdiff/default.nix
index 36047210a92..1d7e6b33042 100644
--- a/pkgs/development/tools/misc/xxdiff/default.nix
+++ b/pkgs/development/tools/misc/xxdiff/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://furius.ca/xxdiff/";
     description = "graphical file and directories comparator and merge tool";
-    license = "GPLv2";
+    license = stdenv.lib.licenses.gpl2;
 
     platforms = stdenv.lib.platforms.linux;
     maintainers = [];
diff --git a/pkgs/development/tools/neoload/default.nix b/pkgs/development/tools/neoload/default.nix
index 384e724dfad..5b66ea75f65 100644
--- a/pkgs/development/tools/neoload/default.nix
+++ b/pkgs/development/tools/neoload/default.nix
@@ -13,9 +13,9 @@ if !licenseAccepted then throw ''
 else assert licenseAccepted;
 
 # the installer is very picky and demands 1.7.0.07
-let dotInstall4j = writeTextFile { name = "dot-install4j"; text = ''
-      JRE_VERSION	${jre}	1	7	0	7
-      JRE_INFO	${jre}	94
+let dotInstall4j = path: writeTextFile { name = "dot-install4j"; text = ''
+      JRE_VERSION	${jre}${path}	1	7	0	7
+      JRE_INFO	${jre}${path}	94
     ''; };
 
     responseVarfile = writeTextFile { name = "response.varfile"; text = ''
@@ -31,15 +31,15 @@ let dotInstall4j = writeTextFile { name = "dot-install4j"; text = ''
     ''; };
 
 in stdenv.mkDerivation rec {
-  name = "neoload-4.1.3";
+  name = "neoload-4.1.4";
 
   src = fetchurl (
     if stdenv.system == "x86_64-linux" then
-      { url = http://www.neotys.com/documents/download/neoload/v4.1/neoload_4_1_3_linux_x64.sh;
-        sha256 = "0qqp7iy6xpaqg535hk21yqmxi0inin5v160sa7nwxh41dq0li5xx"; }
+      { url = http://neoload.installers.neotys.com/documents/download/neoload/v4.1/neoload_4_1_4_linux_x64.sh;
+        sha256 = "199jcf5a0nwfm8wfld2rcjgq64g91vvz2bkmki8dxfzf1yasifcd"; }
     else
-      { url = http://www.neotys.com/documents/download/neoload/v4.1/neoload_4_1_3_linux_x86.sh;
-        sha256 = "0rvy6l9znha3wf8cn406lwvv2qshqnls9kasi68r4wgysr1hh662"; } );
+      { url = http://neoload.installers.neotys.com/documents/download/neoload/v4.1/neoload_4_1_4_linux_x86.sh;
+        sha256 = "1z66jiwcxixsqqwa0f4q8m2p5kna4knq6lic8y8l74dgv25mw912"; } );
 
   buildInputs = [ makeWrapper ];
   phases = [ "installPhase" ];
@@ -48,7 +48,6 @@ in stdenv.mkDerivation rec {
 
   installPhase = ''
     mkdir -p $out/lib/neoload
-    ln -s ${jre} $out/lib/neoload/jre
 
     # the installer wants to use its internal JRE
     # disable this. The extra spaces are needed because the installer carries
@@ -56,7 +55,7 @@ in stdenv.mkDerivation rec {
     sed -e 's/^if \[ -f jre.tar.gz/if false          /' $src > installer
     chmod a+x installer
 
-    cp ${dotInstall4j} .install4j
+    cp ${dotInstall4j ""} .install4j
     chmod u+w .install4j
 
     sed -e "s|INSTALLDIR|$out|" ${responseVarfile} > response.varfile
@@ -65,8 +64,10 @@ in stdenv.mkDerivation rec {
     export INSTALL4J_JAVA_HOME=${jre}
     bash -ic './installer -q -varfile response.varfile'
 
+    sed -i 's/Xmx450m/Xmx900m/;s/Xss192k/Xss384k/' $out/lib/neoload/conf/agent.properties
+
     for i in $out/bin/*; do
-      wrapProgram $i --run 'cp ${dotInstall4j} ~/.install4j' \
+      wrapProgram $i --run 'cp ${dotInstall4j "/lib/openjdk/jre"} ~/.install4j' \
                      --run 'chmod u+w ~/.install4j'
     done
 
@@ -75,7 +76,7 @@ in stdenv.mkDerivation rec {
       name=$(basename "$i")
       sed -e 's|/lib/neoload/bin|/bin|' "$i" > "$out/share/applications/$name"
     done
-    rm $out/lib/neoload/*.desktop $out/lib/neoload/uninstall
+    rm -r $out/lib/neoload/*.desktop $out/lib/neoload/uninstall
 
   '';
 
diff --git a/pkgs/development/tools/node-webkit/default.nix b/pkgs/development/tools/node-webkit/default.nix
new file mode 100644
index 00000000000..1f101776064
--- /dev/null
+++ b/pkgs/development/tools/node-webkit/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, fetchurl, buildEnv, makeWrapper
+, xlibs, alsaLib, dbus, glib, gtk, atk, pango, freetype, fontconfig
+, gdk_pixbuf, cairo, zlib, nss, nssTools, nspr, gconf, expat, udev}:
+let
+  bits = if stdenv.system == "x86_64-linux" then "x64"
+         else "ia32";
+
+  nwEnv = buildEnv {
+    name = "node-webkit-env";
+    paths = [
+      xlibs.libX11 xlibs.libXrender glib gtk atk pango cairo gdk_pixbuf
+      freetype fontconfig xlibs.libXcomposite alsaLib xlibs.libXdamage xlibs.libXext
+      xlibs.libXfixes nss nspr gconf expat dbus udev stdenv.gcc.gcc
+    ];
+  };
+
+in stdenv.mkDerivation rec {
+  name = "node-webkit-${version}";
+  version = "0.9.2";
+
+  src = fetchurl {
+    url = "https://s3.amazonaws.com/node-webkit/v${version}/node-webkit-v${version}-linux-${bits}.tar.gz";
+    sha256 = if bits == "x64" then
+      "04b9hgrxxnvrzyc7kmlabvrfbzj9d6lif7z69zgsbn3x25nxxd2n" else
+      "0icwdl564sbx27124js1l4whfld0n6nbysdd522frzk1759dzgri";
+  };
+
+  patchPhase = ''
+    patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" nw
+    patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" nwsnapshot
+  '';
+
+  installPhase = let
+    LD_LIBRARY_PATH = "${nwEnv}/lib:${nwEnv}/lib64:$out/share/node-webkit";
+  in ''
+    mkdir -p $out/bin
+    mkdir -p $out/share/node-webkit
+    cp -R * $out/share/node-webkit
+
+    ln -s ${udev}/lib/libudev.so $out/share/node-webkit/libudev.so.0
+
+    makeWrapper $out/share/node-webkit/nw $out/bin/nw --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}"
+    makeWrapper $out/share/node-webkit/nwsnapshot $out/bin/nwsnapshot --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}"
+  '';
+
+  buildInputs = [ makeWrapper ];
+
+  meta = with stdenv.lib; {
+    description = "An app runtime based on Chromium and node.js";
+    homepage = https://github.com/rogerwang/node-webkit;
+    platforms = ["i686-linux" "x86_64-linux"];
+    maintainers = [ maintainers.offline ];
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/tools/ocaml/camlp5/default.nix b/pkgs/development/tools/ocaml/camlp5/default.nix
index 74b3368293c..8691e1b9d11 100644
--- a/pkgs/development/tools/ocaml/camlp5/default.nix
+++ b/pkgs/development/tools/ocaml/camlp5/default.nix
@@ -7,11 +7,11 @@ in
 
 stdenv.mkDerivation {
 
-  name = "camlp5${if transitional then "_transitional" else ""}-6.06";
+  name = "camlp5${if transitional then "_transitional" else ""}-6.11";
 
   src = fetchurl {
-    url = http://pauillac.inria.fr/~ddr/camlp5/distrib/src/camlp5-6.06.tgz;
-    sha256 = "763f89ee6cde4ca063a50708c3fe252d55ea9f8037e3ae9801690411ea6180c5";
+    url = http://pauillac.inria.fr/~ddr/camlp5/distrib/src/camlp5-6.11.tgz;
+    sha256 = "0dxb5id6imq502sic75l786q94dhplqx6yyhjkkw19kf64fiqlk5";
   };
 
   buildInputs = [ ocaml ];
diff --git a/pkgs/development/tools/ocaml/cppo/default.nix b/pkgs/development/tools/ocaml/cppo/default.nix
new file mode 100644
index 00000000000..04475959f3d
--- /dev/null
+++ b/pkgs/development/tools/ocaml/cppo/default.nix
@@ -0,0 +1,37 @@
+{stdenv, fetchurl, ocaml, findlib}:
+let
+  pname = "cppo";
+  version = "0.9.4";
+  webpage = "http://mjambon.com/${pname}.html";
+in
+stdenv.mkDerivation rec {
+
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "http://mjambon.com/releases/${pname}/${name}.tar.gz";
+    sha256 = "1m7cbja7cf74l45plqnmjrjjz55v8x65rvx0ikk9mg1ak8lcmvxa";
+  };
+
+  buildInputs = [ ocaml findlib ];
+
+  createFindlibDestdir = true;
+
+  makeFlags = "PREFIX=$(out)";
+
+  preBuild = ''
+    mkdir $out/bin
+  '';
+
+  meta = {
+    description = "The C preprocessor for OCaml";
+    longDescription = ''
+      Cppo is an equivalent of the C preprocessor targeted at the OCaml language and its variants.
+    '';
+    homepage = "${webpage}";
+    license = "bsd";
+  };
+}
+
+
+
diff --git a/pkgs/development/tools/ocaml/deriving/default.nix b/pkgs/development/tools/ocaml/deriving/default.nix
index d53f41b5da5..55bbf3748ea 100644
--- a/pkgs/development/tools/ocaml/deriving/default.nix
+++ b/pkgs/development/tools/ocaml/deriving/default.nix
@@ -52,7 +52,7 @@ versionedDerivation "ocaml-deriving" version {
     # not all tests compile !?
     # (cd tests; make)
 
-    ensureDir $out/bin
+    mkdir -p $out/bin
     cp -a lib $out/
     cp -a syntax $out
 
diff --git a/pkgs/development/tools/ocaml/findlib/default.nix b/pkgs/development/tools/ocaml/findlib/default.nix
index aee0040f815..4c0176de7e8 100644
--- a/pkgs/development/tools/ocaml/findlib/default.nix
+++ b/pkgs/development/tools/ocaml/findlib/default.nix
@@ -5,11 +5,11 @@ let
 in
 
 stdenv.mkDerivation {
-  name = "ocaml-findlib-1.3.3";
+  name = "ocaml-findlib-1.4.1";
 
   src = fetchurl {
-    url = http://download.camlcity.org/download/findlib-1.3.3.tar.gz;
-    sha256 = "981f5c67118a2be015efa79f3af3cb0063376b93123b5d695e7cb5c586b1d45c";
+    url = http://download.camlcity.org/download/findlib-1.4.1.tar.gz;
+    sha256 = "0cdbr716r5686zvf86b9zm5ikdz0dw727m67b1f4rjjisp5v2zyf";
   };
 
   buildInputs = [m4 ncurses ocaml];
@@ -49,10 +49,11 @@ stdenv.mkDerivation {
   meta = {
     homepage = http://projects.camlcity.org/projects/findlib.html;
     description = "O'Caml library manager";
-    license = "MIT/X11";
+    license = stdenv.lib.licenses.mit;
     platforms = ocaml.meta.platforms;
     maintainers = [
       stdenv.lib.maintainers.z77z
+      stdenv.lib.maintainers.vbmithr
     ];
   };
 }
diff --git a/pkgs/development/tools/ocaml/merlin/default.nix b/pkgs/development/tools/ocaml/merlin/default.nix
new file mode 100644
index 00000000000..c0882439f5c
--- /dev/null
+++ b/pkgs/development/tools/ocaml/merlin/default.nix
@@ -0,0 +1,21 @@
+{stdenv, fetchurl, ocaml, findlib, easy-format, biniou, yojson, menhir}:
+stdenv.mkDerivation {
+
+  name = "merlin-1.6";
+
+  src = fetchurl {
+    url = "https://github.com/the-lambda-church/merlin/archive/v1.6.tar.gz";
+    sha256 = "0wq75hgffaszazrhkl0nfjxgx8bvazi2sjannd8q64hvax8hxzcy";
+  };
+
+  buildInputs = [ ocaml findlib biniou yojson menhir easy-format ];
+
+  prefixKey = "--prefix ";
+
+  meta = {
+    description = "An editor-independant tool to ease the developpement of programs in OCaml";
+    homepage = "http://the-lambda-church.github.io/merlin/";
+    license = stdenv.lib.licenses.mit;
+  };
+}
+
diff --git a/pkgs/development/tools/ocaml/oasis/default.nix b/pkgs/development/tools/ocaml/oasis/default.nix
new file mode 100644
index 00000000000..3ab935705a2
--- /dev/null
+++ b/pkgs/development/tools/ocaml/oasis/default.nix
@@ -0,0 +1,32 @@
+{stdenv, fetchurl, ocaml, findlib, ocaml_data_notation, ocaml_typeconv,
+ ocamlmod, ocamlify, ounit, expect}:
+
+stdenv.mkDerivation {
+  name = "ocaml-oasis-0.4.1";
+
+  src = fetchurl {
+    url = http://forge.ocamlcore.org/frs/download.php/1355/oasis-0.4.1.tar.gz;
+    sha256 = "1lsnw9f1jh6106kphxg40qp0sia6cbkbb9ahs5y6ifnfkmllkjhj";
+  };
+
+  createFindlibDestdir = true;
+
+  buildInputs =
+    [
+      ocaml findlib ocaml_data_notation ocaml_typeconv ocamlmod ocamlify ounit
+    ];
+
+  configurePhase = "ocaml setup.ml -configure --prefix $out";
+  buildPhase     = "ocaml setup.ml -build";
+  installPhase   = "ocaml setup.ml -install";
+
+  meta = {
+    homepage = http://oasis.forge.ocamlcore.org/;
+    description = "Configure, build and install system for OCaml projects";
+    license = stdenv.lib.licenses.lgpl21;
+    platforms = ocaml.meta.platforms;
+    maintainers = with stdenv.lib.maintainers; [
+      z77z
+    ];
+  };
+}
diff --git a/pkgs/development/tools/ocaml/ocamlify/default.nix b/pkgs/development/tools/ocaml/ocamlify/default.nix
new file mode 100644
index 00000000000..88b7451e0f0
--- /dev/null
+++ b/pkgs/development/tools/ocaml/ocamlify/default.nix
@@ -0,0 +1,26 @@
+{stdenv, fetchurl, ocaml, findlib, ounit}:
+
+stdenv.mkDerivation {
+  name = "ocamlify-0.0.2";
+
+  src = fetchurl {
+    url = http://forge.ocamlcore.org/frs/download.php/1209/ocamlify-0.0.2.tar.gz;
+    sha256 = "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii";
+  };
+
+  buildInputs = [ocaml findlib ounit];
+
+  configurePhase = "ocaml setup.ml -configure --prefix $out";
+  buildPhase     = "ocaml setup.ml -build";
+  installPhase   = "ocaml setup.ml -install";
+
+  meta = {
+    homepage = http://forge.ocamlcore.org/projects/ocamlmod/ocamlmod;
+    description = "Generate OCaml modules from source files";
+    platforms = ocaml.meta.platforms;
+    license = stdenv.lib.licenses.lgpl21;
+    maintainers = with stdenv.lib.maintainers; [
+      z77z
+    ];
+  };
+}
diff --git a/pkgs/development/tools/ocaml/ocamlmod/default.nix b/pkgs/development/tools/ocaml/ocamlmod/default.nix
new file mode 100644
index 00000000000..d72df18f899
--- /dev/null
+++ b/pkgs/development/tools/ocaml/ocamlmod/default.nix
@@ -0,0 +1,25 @@
+{stdenv, fetchurl, ocaml, findlib, ounit}:
+
+stdenv.mkDerivation {
+  name = "ocamlmod-0.0.7";
+
+  src = fetchurl {
+    url = http://forge.ocamlcore.org/frs/download.php/1350/ocamlmod-0.0.7.tar.gz;
+    sha256 = "11kg7wh0gy492ma5c6bcjh6frv1a9lh9f26hiys2i0d1ky8s0ad3";
+  };
+
+  buildInputs = [ocaml findlib ounit];
+
+  configurePhase = "ocaml setup.ml -configure --prefix $out";
+  buildPhase     = "ocaml setup.ml -build";
+  installPhase   = "ocaml setup.ml -install";
+
+  meta = {
+    homepage = http://forge.ocamlcore.org/projects/ocamlmod/ocamlmod;
+    description = "Generate OCaml modules from source files";
+    platforms = ocaml.meta.platforms;
+    maintainers = with stdenv.lib.maintainers; [
+      z77z
+    ];
+  };
+}
diff --git a/pkgs/development/tools/ocaml/opam/default.nix b/pkgs/development/tools/ocaml/opam/1.0.0.nix
index c36d0004992..f8f680ef4a5 100644
--- a/pkgs/development/tools/ocaml/opam/default.nix
+++ b/pkgs/development/tools/ocaml/opam/1.0.0.nix
@@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     maintainers = stdenv.lib.maintainers.orbitz;
-    description = "A package manager for ocaml";
+    description = "A package manager for OCaml";
     platforms   = stdenv.lib.platforms.all;
   };
 }
diff --git a/pkgs/development/tools/ocaml/opam/1.1.nix b/pkgs/development/tools/ocaml/opam/1.1.nix
new file mode 100644
index 00000000000..2c71f8ba49f
--- /dev/null
+++ b/pkgs/development/tools/ocaml/opam/1.1.nix
@@ -0,0 +1,64 @@
+{ stdenv, fetchgit, fetchurl, ocaml, unzip, ncurses, curl }:
+
+# Opam 1.1 only works with ocaml >= 3.12.1 according to ./configure
+assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12.1";
+
+let
+  srcs = {
+    cudf = fetchurl {
+      url = "https://gforge.inria.fr/frs/download.php/31910/cudf-0.6.3.tar.gz";
+      sha256 = "6e9f1bafe859df85c854679e2904a8172945d2bf2d676c8ae3ecb72fe6de0665";
+    };
+    extlib = fetchurl {
+      url = "http://ocaml-extlib.googlecode.com/files/extlib-1.5.3.tar.gz";
+      sha256 = "c095eef4202a8614ff1474d4c08c50c32d6ca82d1015387785cf03d5913ec021";
+    };
+    ocaml_re = fetchurl {
+      url = "https://github.com/ocaml/ocaml-re/archive/ocaml-re-1.2.0.tar.gz";
+      sha256 = "a34dd9d6136731436a963bbab5c4bbb16e5d4e21b3b851d34887a3dec451999f";
+    };
+    ocamlgraph = fetchurl {
+      url = "http://ocamlgraph.lri.fr/download/ocamlgraph-1.8.1.tar.gz";
+      sha256 = "ba6388ffc2c15139b0f26330ef6dd922f0ff0f364eee99a3202bf1cd93512b43";
+    };
+    dose3 = fetchurl {
+      url = "https://gforge.inria.fr/frs/download.php/31595/dose3-3.1.2.tar.gz";
+      sha256 = "3a07a08345be157c98cb26021d7329c72c2b95c99cfdff79887690656ec9f1a3";
+    };
+    cmdliner = fetchurl {
+      url = "http://erratique.ch/software/cmdliner/releases/cmdliner-0.9.3.tbz";
+      sha256 = "5421559aa12b4debffef947f7e1039c22e9dffd87a4aa68445a687a20764ae81";
+    };
+    opam = fetchurl {
+      url = "https://github.com/ocaml/opam/archive/1.1.1.zip";
+      sha256 = "9c69eeb448af5a38950b2664446401ce240b9f028e0b4d26b6ac1a96938a5f03";
+    };
+  };
+in
+stdenv.mkDerivation rec {
+  name = "opam-1.1.1";
+
+  buildInputs = [unzip curl ncurses ocaml];
+
+  src = srcs.opam;
+
+  postUnpack = ''
+    ln -sv ${srcs.cudf} $sourceRoot/src_ext/${srcs.cudf.name}
+    ln -sv ${srcs.extlib} $sourceRoot/src_ext/${srcs.extlib.name}
+    ln -sv ${srcs.ocaml_re} $sourceRoot/src_ext/${srcs.ocaml_re.name}
+    ln -sv ${srcs.ocamlgraph} $sourceRoot/src_ext/${srcs.ocamlgraph.name}
+    ln -sv ${srcs.dose3} $sourceRoot/src_ext/${srcs.dose3.name}
+    ln -sv ${srcs.cmdliner} $sourceRoot/src_ext/${srcs.cmdliner.name}
+  '';
+
+  # Dirty, but apparently ocp-build requires a TERM
+  makeFlags = ["TERM=screen"];
+
+  doCheck = false;
+
+  meta = {
+    maintainers = [stdenv.lib.maintainers.orbitz];
+    description = "A package manager for OCaml";
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/tools/packer/default.nix b/pkgs/development/tools/packer/default.nix
new file mode 100644
index 00000000000..073de5137f8
--- /dev/null
+++ b/pkgs/development/tools/packer/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, gox, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "packer-0.6.0";
+
+  src = import ./deps.nix {
+    inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
+  };
+
+  buildInputs = [ gox ];
+
+  installPhase = ''
+    export GOPATH=$src
+    XC_ARCH=$(go env GOARCH)
+    XC_OS=$(go env GOOS)
+
+    mkdir -p $out/bin
+
+    cd $src/src/github.com/mitchellh/packer
+    gox \
+        -os="''${XC_OS}" \
+        -arch="''${XC_ARCH}" \
+        -output "$out/bin/packer-{{.Dir}}" \
+        ./...
+    mv $out/bin/packer{*packer*,}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A tool for creating identical machine images for multiple platforms from a single source configuration";
+    homepage    = "http://www.packer.io";
+    license     = licenses.mpl20;
+    maintainers = with maintainers; [ cstrahan ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/pkgs/development/tools/packer/deps.nix b/pkgs/development/tools/packer/deps.nix
new file mode 100644
index 00000000000..ce56ecad8a2
--- /dev/null
+++ b/pkgs/development/tools/packer/deps.nix
@@ -0,0 +1,307 @@
+{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
+
+let
+  goDeps = [
+    {
+      root = "github.com/mitchellh/packer";
+      src = fetchFromGitHub {
+        owner = "mitchellh";
+        repo = "packer";
+        rev = "12e28f257f66299e3bb13a053bf06ccd236e7efd";
+        sha256 = "1r5j864kr7lx137c23kk5s82znk11hsrgq98zfz5r8sbzq1xpbzw";
+      };
+    }
+    {
+      root = "code.google.com/p/go.crypto";
+      src = fetchhg {
+        url = "http://code.google.com/p/go.crypto";
+        rev = "199";
+        sha256 = "0ibrpc6kknzl6a2g2fkxn03mvrd635lcnvf4a9rk1dfrpjbpcixh";
+      };
+    }
+    {
+      root = "code.google.com/p/goauth2";
+      src = fetchhg {
+        url = "http://code.google.com/p/goauth2";
+        rev = "67";
+        sha256 = "053vajj8hd9869by7z9qfgzn84h6avpcjvyxcyw5jml8dsln4bah";
+      };
+    }
+    {
+      root = "code.google.com/p/google-api-go-client";
+      src = fetchhg {
+        url = "http://code.google.com/p/google-api-go-client";
+        rev = "111";
+        sha256 = "1ib8i1c2mb86lkrr5w7bgwb70gkqmp860wa3h1j8080gxdx3yy16";
+      };
+    }
+    {
+      root = "code.google.com/p/gosshold";
+      src = fetchhg {
+        url = "http://code.google.com/p/gosshold";
+        rev = "2";
+        sha256 = "1ljl8pcxxfz5rv89b2ajd31gxxzifl57kzpksvdhyjdxh98gkvg8";
+      };
+    }
+    {
+      root = "github.com/ActiveState/tail";
+      src = fetchFromGitHub {
+        owner = "ActiveState";
+        repo = "tail";
+        rev = "8dcd1ad3e57aa8ce5614a837cbbdb21945fbb55a";
+        sha256 = "1jxj576dd7mawawwg5nzwf6k7sks0r3lp2x8f6kxaps50n3k1wiz";
+      };
+    }
+    {
+      root = "github.com/howeyc/fsnotify";
+      src = fetchFromGitHub {
+        owner = "howeyc";
+        repo = "fsnotify";
+        rev = "441bbc86b167f3c1f4786afae9931403b99fdacf";
+        sha256 = "1v5vrwhmidxjj6sppinyizf85v60zrmn7i6c9xk0pvx6k0kw2mr2";
+      };
+    }
+    {
+      root = "launchpad.net/tomb";
+      src = fetchbzr {
+        url = "https://launchpad.net/tomb";
+        rev = "17";
+        sha256 = "1cjw0sr9hald1darq6n8akfpkzcgrk3mcq59hga3ibf2lrg35ha0";
+      };
+    }
+    {
+      root = "github.com/going/toolkit";
+      src = fetchFromGitHub {
+        owner = "going";
+        repo = "toolkit";
+        rev = "6185c1893604d52d36a97dd6bb1247ace93a9b80";
+        sha256 = "1kzy5yppalcidsmv5yxmr6lpqplqj07kdqpn77fdp6fbb0y0sg11";
+      };
+    }
+    {
+      root = "code.google.com/p/goprotobuf";
+      src = fetchhg {
+        url = "http://code.google.com/p/goprotobuf";
+        rev = "246";
+        sha256 = "0k4wcv1dnkwcp0gdrajj6kr25f1lg4lgpbi0h5v9l9n7sdwzplf4";
+      };
+    }
+    {
+      root = "github.com/bmizerany/assert";
+      src = fetchFromGitHub {
+        owner = "bmizerany";
+        repo = "assert";
+        rev = "e17e99893cb6509f428e1728281c2ad60a6b31e3";
+        sha256 = "1lfrvqqmb09y6pcr76yjv4r84cshkd4s7fpmiy7268kfi2cvqnpc";
+      };
+    }
+    {
+      root = "github.com/kr/pretty";
+      src = fetchFromGitHub {
+        owner = "kr";
+        repo = "pretty";
+        rev = "bc9499caa0f45ee5edb2f0209fbd61fbf3d9018f";
+        sha256 = "1m61y592qsnwsqn76v54mm6h2pcvh4wlzbzscc1ag645x0j33vvl";
+      };
+    }
+    {
+      root = "github.com/kr/text";
+      src = fetchFromGitHub {
+        owner = "kr";
+        repo = "text";
+        rev = "6807e777504f54ad073ecef66747de158294b639";
+        sha256 = "1wkszsg08zar3wgspl9sc8bdsngiwdqmg3ws4y0bh02sjx5a4698";
+      };
+    }
+    {
+      root = "github.com/kr/pty";
+      src = fetchFromGitHub {
+        owner = "kr";
+        repo = "pty";
+        rev = "67e2db24c831afa6c64fc17b4a143390674365ef";
+        sha256 = "1l3z3wbb112ar9br44m8g838z0pq2gfxcp5s3ka0xvm1hjvanw2d";
+      };
+    }
+    {
+      root = "github.com/xiocode/toolkit";
+      src = fetchFromGitHub {
+        owner = "xiocode";
+        repo = "toolkit";
+        rev = "352fd7c6700074a81056cdfc9e82b3e8c5681ac5";
+        sha256 = "0p33zh57xpxyk2wyp9xahdxyrkq48ysihpr0n9kj713q0dh7x4a3";
+      };
+    }
+    {
+      root = "launchpad.net/gocheck";
+      src = fetchbzr {
+        url = "https://launchpad.net/gocheck";
+        rev = "87";
+        sha256 = "1y9fa2mv61if51gpik9isls48idsdz87zkm1p3my7swjdix7fcl0";
+      };
+    }
+    {
+      root = "github.com/hashicorp/go-version";
+      src = fetchFromGitHub {
+        owner = "hashicorp";
+        repo = "go-version";
+        rev = "bb92dddfa9792e738a631f04ada52858a139bcf7";
+        sha256 = "0fl5a6j6nk1xsxwjdpa24a24fxvgnvm3jjlgpyrnmbdn380zil3m";
+      };
+    }
+    {
+      root = "github.com/mitchellh/go-fs";
+      src = fetchFromGitHub {
+        owner = "mitchellh";
+        repo = "go-fs";
+        rev = "faaa223588dd7005e49bf66fa2d19e35c8c4d761";
+        sha256 = "19jsvy35g14f18ckymzxasy0zfd6n99zlqg6grpj1yqdfxfvqn9b";
+      };
+    }
+    {
+      root = "github.com/mitchellh/go-vnc";
+      src = fetchFromGitHub {
+        owner = "mitchellh";
+        repo = "go-vnc";
+        rev = "fc93dd80f5da4ccde0a9d97f0c73e56e04e0cf72";
+        sha256 = "03rwsp1frvfx6c7yxr711lq7jdgsr1gcwg14jw26xvbzzxwjvnsf";
+      };
+    }
+    {
+      root = "github.com/mitchellh/goamz";
+      src = fetchFromGitHub {
+        owner = "mitchellh";
+        repo = "goamz";
+        rev = "c3ff5f734c89f1ea1f290c6aadbbceeeb19a623c";
+        sha256 = "1nyi1p5yh21r161icnwkcgmj2y38b4m1jis47vvjbqinrp45w1gq";
+      };
+    }
+    {
+      root = "github.com/motain/gocheck";
+      src = fetchFromGitHub {
+        owner = "motain";
+        repo = "gocheck";
+        rev = "9beb271d26e640863a5bf4a3c5ea40ccdd466b84";
+        sha256 = "07arpwfdb51b5f7kzqnm5s5ndfmxv5j793hpn30nbdcya46diwjd";
+      };
+    }
+    {
+      root = "github.com/mitchellh/iochan";
+      src = fetchFromGitHub {
+        owner = "mitchellh";
+        repo = "iochan";
+        rev = "b584a329b193e206025682ae6c10cdbe03b0cd77";
+        sha256 = "1fcwdhfci41ibpng2j4c1bqfng578cwzb3c00yw1lnbwwhaq9r6b";
+      };
+    }
+    {
+      root = "github.com/mitchellh/mapstructure";
+      src = fetchFromGitHub {
+        owner = "mitchellh";
+        repo = "mapstructure";
+        rev = "743fcf103ac7cdbc159e540d9d0e3a7889b87d68";
+        sha256 = "1qqxsnxabd7c04n0ip1wmpr2g913qchqrbmblq0shrf5p1hnszgn";
+      };
+    }
+    {
+      root = "github.com/mitchellh/multistep";
+      src = fetchFromGitHub {
+        owner = "mitchellh";
+        repo = "multistep";
+        rev = "162146fc57112954184d90266f4733e900ed05a5";
+        sha256 = "0ydhbxziy9204qr43pjdh88y2jg34g2mhzdapjyfpf8a1rin6dn3";
+      };
+    }
+    {
+      root = "github.com/mitchellh/osext";
+      src = fetchFromGitHub {
+        owner = "mitchellh";
+        repo = "osext";
+        rev = "0dd3f918b21bec95ace9dc86c7e70266cfc5c702";
+        sha256 = "02pczqml6p1mnfdrygm3rs02g0r65qx8v1bi3x24dx8wv9dr5y23";
+      };
+    }
+    {
+      root = "github.com/mitchellh/panicwrap";
+      src = fetchFromGitHub {
+        owner = "mitchellh";
+        repo = "panicwrap";
+        rev = "1aedff2aaa8b8ff7f65ab58e94ef9f593e2e3bf4";
+        sha256 = "05brbpc7kizzbs1a128fmjddh7rdyg0jzzxgbvrl58cgklh4yzaa";
+      };
+    }
+    {
+      root = "github.com/rackspace/gophercloud";
+      src = fetchFromGitHub {
+        owner = "rackspace";
+        repo = "gophercloud";
+        rev = "2285a429874c1365ef6c6d3ceb08b1d428e26aca";
+        sha256 = "0py3h64r4wkl2r9j7xlh81nazpg2b0r5ba9iblh6d1380yk4fa7f";
+      };
+    }
+    {
+      root = "github.com/racker/perigee";
+      src = fetchFromGitHub {
+        owner = "racker";
+        repo = "perigee";
+        rev = "01db3191866051f2ec854c2d876ac1a179d3049c";
+        sha256 = "05pmlgwjynbr59bw50zhrklzhr5pgnij9ym5hqvijjrpw3qd9ivf";
+      };
+    }
+    {
+      root = "github.com/ugorji/go";
+      src = fetchFromGitHub {
+        owner = "ugorji";
+        repo = "go";
+        rev = "71c2886f5a673a35f909803f38ece5810165097b";
+        sha256 = "157f24xnkhclrjwwa1b7lmpj112ynlbf7g1cfw0c657iqny5720j";
+      };
+    }
+    {
+      root = "github.com/vmihailenco/msgpack";
+      src = fetchFromGitHub {
+        owner = "vmihailenco";
+        repo = "msgpack";
+        rev = "20c1b88a6c7fc5432037439f4e8c582e236fb205";
+        sha256 = "1dj5scpfhgnw0yrh0w6jlrb9d03halvsv4l3wgjhazrrimdqf0q0";
+      };
+    }
+    {
+      root = "github.com/ugorji/go-msgpack";
+      src = fetchFromGitHub {
+        owner = "ugorji";
+        repo = "go-msgpack";
+        rev = "75092644046c5e38257395b86ed26c702dc95b92";
+        sha256 = "1bmqi16bfiqw7qhb3d5hbh0dfzhx2bbq1g15nh2pxwxckwh80x98";
+      };
+    }
+    {
+      root = "launchpad.net/mgo";
+      src = fetchbzr {
+        url = "https://launchpad.net/mgo";
+        rev = "2";
+        sha256 = "0h1dxzyx5c4r4gfnmjxv92hlhjxrgx9p4g53p4fhmz6x2fdglb0x";
+      };
+    }
+    {
+      root = "github.com/vmihailenco/bufio";
+      src = fetchFromGitHub {
+        owner = "vmihailenco";
+        repo = "bufio";
+        rev = "24e7e48f60fc2d9e99e43c07485d9fff42051e66";
+        sha256 = "0x46qnf2f15v7m0j2dcb16raxjamk5rdc7hqwgyxfr1sqmmw3983";
+      };
+    }
+  ];
+
+in
+
+stdenv.mkDerivation rec {
+  name = "go-deps";
+
+  buildCommand =
+    lib.concatStrings
+      (map (dep: ''
+              mkdir -p $out/src/`dirname ${dep.root}`
+              ln -s ${dep.src} $out/src/${dep.root}
+            '') goDeps);
+}
diff --git a/pkgs/development/tools/parsing/Ebnf2ps/default.nix b/pkgs/development/tools/parsing/Ebnf2ps/default.nix
index 82d998c2fcb..b3d4c125bb9 100644
--- a/pkgs/development/tools/parsing/Ebnf2ps/default.nix
+++ b/pkgs/development/tools/parsing/Ebnf2ps/default.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, happy }:
 
 cabal.mkDerivation (self: {
@@ -12,6 +14,5 @@ cabal.mkDerivation (self: {
     description = "Peter's Syntax Diagram Drawing Tool";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/parsing/alex/2.3.1.nix b/pkgs/development/tools/parsing/alex/2.3.1.nix
index 7dc17cd4153..83138e2e0ff 100644
--- a/pkgs/development/tools/parsing/alex/2.3.1.nix
+++ b/pkgs/development/tools/parsing/alex/2.3.1.nix
@@ -8,11 +8,13 @@ cabal.mkDerivation (self: {
   isExecutable = true;
   buildTools = [ perl ];
   doCheck = false;
+  patches = [ ./adapt-crazy-perl-regex-for-cpp-4.8.0.patch ];
   meta = {
     homepage = "http://www.haskell.org/alex/";
     description = "Alex is a tool for generating lexical analysers in Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
     maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/parsing/alex/2.3.2.nix b/pkgs/development/tools/parsing/alex/2.3.2.nix
index 5d10dbd6995..0bc13d16017 100644
--- a/pkgs/development/tools/parsing/alex/2.3.2.nix
+++ b/pkgs/development/tools/parsing/alex/2.3.2.nix
@@ -8,11 +8,13 @@ cabal.mkDerivation (self: {
   isExecutable = true;
   buildTools = [ perl ];
   doCheck = false;
+  patches = [ ./adapt-crazy-perl-regex-for-cpp-4.8.0.patch ];
   meta = {
     homepage = "http://www.haskell.org/alex/";
     description = "Alex is a tool for generating lexical analysers in Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
     maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/parsing/alex/2.3.3.nix b/pkgs/development/tools/parsing/alex/2.3.3.nix
index bbe413d478f..ccef30058c5 100644
--- a/pkgs/development/tools/parsing/alex/2.3.3.nix
+++ b/pkgs/development/tools/parsing/alex/2.3.3.nix
@@ -8,11 +8,13 @@ cabal.mkDerivation (self: {
   isExecutable = true;
   buildTools = [ perl ];
   doCheck = false;
+  patches = [ ./adapt-crazy-perl-regex-for-cpp-4.8.0.patch ];
   meta = {
     homepage = "http://www.haskell.org/alex/";
     description = "Alex is a tool for generating lexical analysers in Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
     maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/parsing/alex/2.3.5.nix b/pkgs/development/tools/parsing/alex/2.3.5.nix
index 3fb843e6955..d8e7e759e76 100644
--- a/pkgs/development/tools/parsing/alex/2.3.5.nix
+++ b/pkgs/development/tools/parsing/alex/2.3.5.nix
@@ -8,11 +8,13 @@ cabal.mkDerivation (self: {
   isExecutable = true;
   buildTools = [ perl ];
   doCheck = false;
+  patches = [ ./adapt-crazy-perl-regex-for-cpp-4.8.0.patch ];
   meta = {
     homepage = "http://www.haskell.org/alex/";
     description = "Alex is a tool for generating lexical analysers in Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
     maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/parsing/alex/3.0.1.nix b/pkgs/development/tools/parsing/alex/3.0.1.nix
index cdcaead8635..7dc18c63c91 100644
--- a/pkgs/development/tools/parsing/alex/3.0.1.nix
+++ b/pkgs/development/tools/parsing/alex/3.0.1.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, perl, QuickCheck }:
 
 cabal.mkDerivation (self: {
@@ -14,6 +16,6 @@ cabal.mkDerivation (self: {
     description = "Alex is a tool for generating lexical analysers in Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
+    hydraPlatforms = self.stdenv.lib.platforms.none;
   };
 })
diff --git a/pkgs/development/tools/parsing/alex/3.0.2.nix b/pkgs/development/tools/parsing/alex/3.0.2.nix
index 9011db12c7d..c18c5d89d1b 100644
--- a/pkgs/development/tools/parsing/alex/3.0.2.nix
+++ b/pkgs/development/tools/parsing/alex/3.0.2.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, perl, QuickCheck }:
 
 cabal.mkDerivation (self: {
@@ -14,6 +16,6 @@ cabal.mkDerivation (self: {
     description = "Alex is a tool for generating lexical analysers in Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
+    hydraPlatforms = self.stdenv.lib.platforms.none;
   };
 })
diff --git a/pkgs/development/tools/parsing/alex/3.0.5.nix b/pkgs/development/tools/parsing/alex/3.0.5.nix
index f85aa42d165..af32598ee47 100644
--- a/pkgs/development/tools/parsing/alex/3.0.5.nix
+++ b/pkgs/development/tools/parsing/alex/3.0.5.nix
@@ -1,4 +1,4 @@
-{ cabal, fetchurl, perl, QuickCheck }:
+{ cabal, fetchpatch, perl, QuickCheck }:
 
 cabal.mkDerivation (self: {
   pname = "alex";
@@ -8,12 +8,13 @@ cabal.mkDerivation (self: {
   isExecutable = true;
   buildDepends = [ QuickCheck ];
   buildTools = [ perl ];
-  patches = [ (fetchurl { url="https://github.com/simonmar/alex/pull/21.patch"; sha256="0apv3rk00gwkf5rqw3467bg6pnamr07zdksbp9khhzzi73k9aq4f"; }) ];
+  patches = [ (fetchpatch { url="http://github.com/simonmar/alex/pull/21.patch"; sha256="050psfwmjlxhyxiy65jsn3v6b9rnfzy8x5q9mmhzwbirqwi0zkfm"; }) ];
   meta = {
     homepage = "http://www.haskell.org/alex/";
     description = "Alex is a tool for generating lexical analysers in Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
+    hydraPlatforms = self.stdenv.lib.platforms.none;
     maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/parsing/alex/3.1.0.nix b/pkgs/development/tools/parsing/alex/3.1.3.nix
index b6d46bea58e..172c90d96cc 100644
--- a/pkgs/development/tools/parsing/alex/3.1.0.nix
+++ b/pkgs/development/tools/parsing/alex/3.1.3.nix
@@ -1,18 +1,19 @@
-{ cabal, perl, QuickCheck }:
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
+{ cabal, happy, perl, QuickCheck }:
 
 cabal.mkDerivation (self: {
   pname = "alex";
-  version = "3.1.0";
-  sha256 = "1d2kdn4g3zyc3ijiscbqayzg1apy0iih603dv90pr9w2f36djrkh";
+  version = "3.1.3";
+  sha256 = "14hajxpqb6va5mclp2k682bgw9sbmd372vw41kq5aq815bkschcd";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [ QuickCheck ];
-  buildTools = [ perl ];
+  buildTools = [ happy perl ];
   meta = {
     homepage = "http://www.haskell.org/alex/";
     description = "Alex is a tool for generating lexical analysers in Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/parsing/alex/adapt-crazy-perl-regex-for-cpp-4.8.0.patch b/pkgs/development/tools/parsing/alex/adapt-crazy-perl-regex-for-cpp-4.8.0.patch
new file mode 100644
index 00000000000..1e5942bfbef
--- /dev/null
+++ b/pkgs/development/tools/parsing/alex/adapt-crazy-perl-regex-for-cpp-4.8.0.patch
@@ -0,0 +1,12 @@
+diff -ubr alex-2.3.5-orig/Setup.lhs alex-2.3.5/Setup.lhs
+--- alex-2.3.5-orig/Setup.lhs	2013-04-19 12:00:15.812606335 +0000
++++ alex-2.3.5/Setup.lhs	2013-04-19 12:05:41.635450321 +0000
+@@ -25,7 +25,7 @@
+ -- hack to turn cpp-style '# 27 "GenericTemplate.hs"' into 
+ -- '{-# LINE 27 "GenericTemplate.hs" #-}'.
+ crazy_perl_regexp =
+- "s/^#\\s+(\\d+)\\s+(\"[^\"]*\")/{-# LINE \\1 \\2 #-}/g;s/\\$(Id:.*)\\$/\\1/g"
++ "s/^#\\s+(\\d+)\\s+(\"[^\"]*\").*/{-# LINE \\1 \\2 #-}/g;s/\\$(Id:.*)\\$/\\1/g"
+ 
+ myPostBuild _ flags _ lbi = do
+   let runProgram p = rawSystemProgramConf (buildVerbose flags) p (withPrograms lbi)
diff --git a/pkgs/development/tools/parsing/antlr/2.7.7.nix b/pkgs/development/tools/parsing/antlr/2.7.7.nix
index 8d68479dd0e..23141185f68 100644
--- a/pkgs/development/tools/parsing/antlr/2.7.7.nix
+++ b/pkgs/development/tools/parsing/antlr/2.7.7.nix
@@ -8,4 +8,17 @@ stdenv.mkDerivation {
   };
   patches = [ ./2.7.7-fixes.patch ];
   buildInputs = [jdk python];
+
+  meta = with stdenv.lib; {
+    description = "Powerful parser generator";
+    longDescription = ''
+      ANTLR (ANother Tool for Language Recognition) is a powerful parser
+      generator for reading, processing, executing, or translating structured
+      text or binary files. It's widely used to build languages, tools, and
+      frameworks. From a grammar, ANTLR generates a parser that can build and
+      walk parse trees.
+    '';
+    homepage = http://www.antlr.org/;
+    platforms = platforms.linux;
+  };
 }
diff --git a/pkgs/development/tools/parsing/antlr/default.nix b/pkgs/development/tools/parsing/antlr/default.nix
index deb8040256b..e866f61f25a 100644
--- a/pkgs/development/tools/parsing/antlr/default.nix
+++ b/pkgs/development/tools/parsing/antlr/default.nix
@@ -8,4 +8,17 @@ stdenv.mkDerivation {
     md5 = "6a7e70ccece8149b735cc3aaa24241cc";
   };
   inherit jre;
+
+  meta = with stdenv.lib; {
+    description = "Powerful parser generator";
+    longDescription = ''
+      ANTLR (ANother Tool for Language Recognition) is a powerful parser
+      generator for reading, processing, executing, or translating structured
+      text or binary files. It's widely used to build languages, tools, and
+      frameworks. From a grammar, ANTLR generates a parser that can build and
+      walk parse trees.
+    '';
+    homepage = http://www.antlr.org/;
+    platforms = platforms.linux;
+  };
 }
diff --git a/pkgs/development/tools/parsing/bison/2.x.nix b/pkgs/development/tools/parsing/bison/2.x.nix
index 77ba164f07a..5bf5d7c2e8c 100644
--- a/pkgs/development/tools/parsing/bison/2.x.nix
+++ b/pkgs/development/tools/parsing/bison/2.x.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, m4, perl }:
 
 stdenv.mkDerivation rec {
-  name = "bison-2.6.5";
+  name = "bison-2.7";
 
   src = fetchurl {
-    url = "mirror://gnu/bison/${name}.tar.xz";
-    sha256 = "8640d5b51aad462db6863711f333a9159836853e0b1e79fdef708c6efb5cd52b";
+    url = "mirror://gnu/bison/${name}.tar.gz";
+    sha256 = "0cd8s2g7zjshya7kwjc9rh3drsssl4hiq4sccnkgf0nn9wvygfqr";
   };
 
   nativeBuildInputs = [ m4 ] ++ stdenv.lib.optional doCheck perl;
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://www.gnu.org/software/bison/";
     description = "GNU Bison, a Yacc-compatible parser generator";
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
 
     longDescription = ''
       Bison is a general-purpose parser generator that converts an
diff --git a/pkgs/development/tools/parsing/bison/3.x.nix b/pkgs/development/tools/parsing/bison/3.x.nix
index 9b1499c1537..5947f85343c 100644
--- a/pkgs/development/tools/parsing/bison/3.x.nix
+++ b/pkgs/development/tools/parsing/bison/3.x.nix
@@ -1,22 +1,20 @@
-{ stdenv, fetchurl, m4, perl, flex }:
+{ stdenv, fetchurl, m4, perl }:
 
 stdenv.mkDerivation rec {
-  name = "bison-3.0";
+  name = "bison-3.0.2";
 
   src = fetchurl {
-    url = "mirror://gnu/bison/${name}.tar.xz";
-    sha256 = "1j14fqgi9wzqgsy4fhkcdrv4hv6rrvhvn84axs520w9b022mbb79";
+    url = "mirror://gnu/bison/${name}.tar.gz";
+    sha256 = "1vc17y6242jlwp0gdj7wsim3nvc1ws7q3j0v3065nz8g9hd9vwnd";
   };
 
-  nativeBuildInputs = [ m4 ] ++ stdenv.lib.optionals doCheck [perl flex];
+  nativeBuildInputs = [ m4 perl ];
   propagatedBuildInputs = [ m4 ];
 
-  doCheck = true;
-
   meta = {
     homepage = "http://www.gnu.org/software/bison/";
     description = "GNU Bison, a Yacc-compatible parser generator";
-    license = "GPLv3+";
+    license = stdenv.lib.licenses.gpl3Plus;
 
     longDescription = ''
       Bison is a general-purpose parser generator that converts an
diff --git a/pkgs/development/tools/parsing/flex/flex-2.5.35.nix b/pkgs/development/tools/parsing/flex/2.5.35.nix
index 21180e7d185..8047080a125 100644
--- a/pkgs/development/tools/parsing/flex/flex-2.5.35.nix
+++ b/pkgs/development/tools/parsing/flex/2.5.35.nix
@@ -1,17 +1,16 @@
-# This should be moved to default.nix eventually (?)
-
-{stdenv, fetchurl, yacc, m4}:
-
-assert yacc != null && m4 != null;
+{ stdenv, fetchurl, bison, m4 }:
 
 stdenv.mkDerivation {
   name = "flex-2.5.35";
+
   src = fetchurl {
     url = mirror://sourceforge/flex/flex-2.5.35.tar.bz2;
     sha256 = "0ysff249mwhq0053bw3hxh58djc0gy7vjan2z1krrf9n5d5vvv0b";
   };
-  buildInputs = [yacc];
-  propagatedNativeBuildInputs = [m4];
+
+  buildInputs = [ bison ];
+
+  propagatedNativeBuildInputs = [ m4 ];
 
   crossAttrs = {
     preConfigure = ''
@@ -21,6 +20,7 @@ stdenv.mkDerivation {
   };
 
   meta = {
+    homepage = http://flex.sourceforge.net/;
     description = "A fast lexical analyser generator";
   };
 }
diff --git a/pkgs/development/tools/parsing/flex/2.5.39.nix b/pkgs/development/tools/parsing/flex/2.5.39.nix
new file mode 100644
index 00000000000..f12f89f6e24
--- /dev/null
+++ b/pkgs/development/tools/parsing/flex/2.5.39.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, bison, m4 }:
+
+stdenv.mkDerivation {
+  name = "flex-2.5.39";
+
+  src = fetchurl {
+    url = mirror://sourceforge/flex/flex-2.5.39.tar.bz2;
+    sha256 = "0zv15giw3gma03y2bzw78hjfy49vyir7vbcgnh9bb3637dgvblmd";
+  };
+
+  buildInputs = [ bison ];
+
+  propagatedNativeBuildInputs = [ m4 ];
+
+  postConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
+    sed -i Makefile -e 's/-no-undefined//;'
+  '';
+
+  crossAttrs = {
+    preConfigure = ''
+      export ac_cv_func_malloc_0_nonnull=yes
+      export ac_cv_func_realloc_0_nonnull=yes
+    '';
+  };
+
+  meta = {
+    homepage = http://flex.sourceforge.net/;
+    description = "A fast lexical analyser generator";
+  };
+}
diff --git a/pkgs/development/tools/parsing/flex/flex-2.5.33.nix b/pkgs/development/tools/parsing/flex/flex-2.5.33.nix
deleted file mode 100644
index 9be98689aea..00000000000
--- a/pkgs/development/tools/parsing/flex/flex-2.5.33.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-# !!! this should be moved to default.nix eventually (but I delay
-# doing that since it would cause a rebuild of lots of stuff).
-
-{stdenv, fetchurl, yacc, m4}:
-
-assert yacc != null && m4 != null;
-
-stdenv.mkDerivation {
-  name = "flex-2.5.33";
-  src = fetchurl {
-    url = mirror://sourceforge/flex/flex-2.5.33.tar.bz2;
-    md5 = "343374a00b38d9e39d1158b71af37150";
-  };
-  buildInputs = [yacc];
-  propagatedBuildInputs = [m4];
-
-  meta = {
-    description = "A fast lexical analyser generator";
-  };
-}
diff --git a/pkgs/development/tools/parsing/flex/flex-2.5.34.nix b/pkgs/development/tools/parsing/flex/flex-2.5.34.nix
deleted file mode 100644
index d56cf0c88a2..00000000000
--- a/pkgs/development/tools/parsing/flex/flex-2.5.34.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-# This should be moved to default.nix eventually (?)
-
-{stdenv, fetchurl, yacc, m4}:
-
-assert yacc != null && m4 != null;
-
-stdenv.mkDerivation {
-  name = "flex-2.5.34";
-  src = fetchurl {
-    url = mirror://sourceforge/flex/flex-2.5.34.tar.bz2;
-    sha256 = "1c8e64f32508841b0441ddfb139c4cfd25fee3728cadb63f5f351c6eb9b224a6";
-  };
-  buildInputs = [yacc];
-  propagatedBuildInputs = [m4];
-
-  meta = {
-    description = "A fast lexical analyser generator";
-  };
-}
diff --git a/pkgs/development/tools/parsing/flex/flex-2.5.4a.nix b/pkgs/development/tools/parsing/flex/flex-2.5.4a.nix
deleted file mode 100644
index 13bb6834979..00000000000
--- a/pkgs/development/tools/parsing/flex/flex-2.5.4a.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{stdenv, fetchurl, yacc}:
-
-assert yacc != null;
-
-stdenv.mkDerivation {
-  name = "flex-2.5.4a";
-  src = fetchurl {
-    url = mirror://sourceforge/flex/flex-2.5.4a.tar.gz;
-    md5 = "bd8753d0b22e1f4ec87a553a73021adf";
-  };
-  buildInputs = [yacc];
-}
diff --git a/pkgs/development/tools/parsing/happy/1.18.10.nix b/pkgs/development/tools/parsing/happy/1.18.10.nix
index d342d3381c8..187fd3628e8 100644
--- a/pkgs/development/tools/parsing/happy/1.18.10.nix
+++ b/pkgs/development/tools/parsing/happy/1.18.10.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, mtl, perl }:
 
 cabal.mkDerivation (self: {
@@ -13,6 +15,6 @@ cabal.mkDerivation (self: {
     description = "Happy is a parser generator for Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
+    hydraPlatforms = self.stdenv.lib.platforms.none;
   };
 })
diff --git a/pkgs/development/tools/parsing/happy/1.18.11.nix b/pkgs/development/tools/parsing/happy/1.18.11.nix
deleted file mode 100644
index 41f6d5c49a4..00000000000
--- a/pkgs/development/tools/parsing/happy/1.18.11.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ cabal, mtl, perl }:
-
-cabal.mkDerivation (self: {
-  pname = "happy";
-  version = "1.18.11";
-  sha256 = "1hssiihzl7xipmn5bz71q30wbq2sj92lh2f7z4jarckhldwcqfi9";
-  isLibrary = false;
-  isExecutable = true;
-  buildDepends = [ mtl ];
-  buildTools = [ perl ];
-  meta = {
-    homepage = "http://www.haskell.org/happy/";
-    description = "Happy is a parser generator for Haskell";
-    license = self.stdenv.lib.licenses.bsd3;
-    platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
-  };
-})
diff --git a/pkgs/development/tools/parsing/happy/1.18.4.nix b/pkgs/development/tools/parsing/happy/1.18.4.nix
index 401c4d1475c..c7e3f919568 100644
--- a/pkgs/development/tools/parsing/happy/1.18.4.nix
+++ b/pkgs/development/tools/parsing/happy/1.18.4.nix
@@ -8,11 +8,12 @@ cabal.mkDerivation (self: {
   isExecutable = true;
   buildDepends = [ mtl ];
   buildTools = [ perl ];
+  patches = [ ./adapt-crazy-perl-regex-for-cpp-4.8.0.patch ];
   meta = {
     homepage = "http://www.haskell.org/happy/";
     description = "Happy is a parser generator for Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
+    hydraPlatforms = self.stdenv.lib.platforms.none;
   };
 })
diff --git a/pkgs/development/tools/parsing/happy/1.18.5.nix b/pkgs/development/tools/parsing/happy/1.18.5.nix
index d64d8983e9c..f66f2089351 100644
--- a/pkgs/development/tools/parsing/happy/1.18.5.nix
+++ b/pkgs/development/tools/parsing/happy/1.18.5.nix
@@ -8,11 +8,12 @@ cabal.mkDerivation (self: {
   isExecutable = true;
   buildDepends = [ mtl ];
   buildTools = [ perl ];
+  patches = [ ./adapt-crazy-perl-regex-for-cpp-4.8.0.patch ];
   meta = {
     homepage = "http://www.haskell.org/happy/";
     description = "Happy is a parser generator for Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
+    hydraPlatforms = self.stdenv.lib.platforms.none;
   };
 })
diff --git a/pkgs/development/tools/parsing/happy/1.18.6.nix b/pkgs/development/tools/parsing/happy/1.18.6.nix
index fdc483fe571..7919908681e 100644
--- a/pkgs/development/tools/parsing/happy/1.18.6.nix
+++ b/pkgs/development/tools/parsing/happy/1.18.6.nix
@@ -8,11 +8,12 @@ cabal.mkDerivation (self: {
   isExecutable = true;
   buildDepends = [ mtl ];
   buildTools = [ perl ];
+  patches = [ ./adapt-crazy-perl-regex-for-cpp-4.8.0.patch ];
   meta = {
     homepage = "http://www.haskell.org/happy/";
     description = "Happy is a parser generator for Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
+    hydraPlatforms = self.stdenv.lib.platforms.none;
   };
 })
diff --git a/pkgs/development/tools/parsing/happy/1.18.9.nix b/pkgs/development/tools/parsing/happy/1.18.9.nix
index b1f752ae35f..4ad9bf546b5 100644
--- a/pkgs/development/tools/parsing/happy/1.18.9.nix
+++ b/pkgs/development/tools/parsing/happy/1.18.9.nix
@@ -1,3 +1,5 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, mtl, perl }:
 
 cabal.mkDerivation (self: {
@@ -13,6 +15,6 @@ cabal.mkDerivation (self: {
     description = "Happy is a parser generator for Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
+    hydraPlatforms = self.stdenv.lib.platforms.none;
   };
 })
diff --git a/pkgs/development/tools/parsing/happy/1.19.0.nix b/pkgs/development/tools/parsing/happy/1.19.0.nix
deleted file mode 100644
index 2ff2950591e..00000000000
--- a/pkgs/development/tools/parsing/happy/1.19.0.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ cabal, mtl, perl }:
-
-cabal.mkDerivation (self: {
-  pname = "happy";
-  version = "1.19.0";
-  sha256 = "1phk44crr1zi4sd3slxj1ik5ll799zl48k69z1miws3mxq6w076z";
-  isLibrary = false;
-  isExecutable = true;
-  buildDepends = [ mtl ];
-  buildTools = [ perl ];
-  meta = {
-    homepage = "http://www.haskell.org/happy/";
-    description = "Happy is a parser generator for Haskell";
-    license = self.stdenv.lib.licenses.bsd3;
-    platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
-  };
-})
diff --git a/pkgs/development/tools/parsing/happy/1.18.8.nix b/pkgs/development/tools/parsing/happy/1.19.4.nix
index decc992809a..979d4bc52e3 100644
--- a/pkgs/development/tools/parsing/happy/1.18.8.nix
+++ b/pkgs/development/tools/parsing/happy/1.19.4.nix
@@ -1,9 +1,11 @@
+# This file was auto-generated by cabal2nix. Please do NOT edit manually!
+
 { cabal, mtl, perl }:
 
 cabal.mkDerivation (self: {
   pname = "happy";
-  version = "1.18.8";
-  sha256 = "1mqdawxszmdk71fbl8ljxz7jyhai00sflaw0gahp039n44mrspam";
+  version = "1.19.4";
+  sha256 = "0vcklr1y6yjf8z4wip4al2zw4qlfxcahbdxwpf6c9y31dkv9kr3b";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [ mtl ];
@@ -13,6 +15,5 @@ cabal.mkDerivation (self: {
     description = "Happy is a parser generator for Haskell";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
-    maintainers = [ self.stdenv.lib.maintainers.andres ];
   };
 })
diff --git a/pkgs/development/tools/parsing/happy/adapt-crazy-perl-regex-for-cpp-4.8.0.patch b/pkgs/development/tools/parsing/happy/adapt-crazy-perl-regex-for-cpp-4.8.0.patch
new file mode 100644
index 00000000000..8bc4db0f405
--- /dev/null
+++ b/pkgs/development/tools/parsing/happy/adapt-crazy-perl-regex-for-cpp-4.8.0.patch
@@ -0,0 +1,12 @@
+diff -ubr happy-1.18.6-orig/Setup.lhs happy-1.18.6/Setup.lhs
+--- happy-1.18.6-orig/Setup.lhs	2013-04-19 14:17:10.865999210 +0200
++++ happy-1.18.6/Setup.lhs	2013-04-19 14:17:15.285214809 +0200
+@@ -25,7 +25,7 @@
+ -- hack to turn cpp-style '# 27 "GenericTemplate.hs"' into 
+ -- '{-# LINE 27 "GenericTemplate.hs" #-}'.
+ crazy_perl_regexp =
+- "s/^#\\s+(\\d+)\\s+(\"[^\"]*\")/{-# LINE \\1 \\2 #-}/g;s/\\$(Id:.*)\\$/\\1/g"
++ "s/^#\\s+(\\d+)\\s+(\"[^\"]*\").*/{-# LINE \\1 \\2 #-}/g;s/\\$(Id:.*)\\$/\\1/g"
+ 
+ myPostBuild _ flags _ lbi = do
+   let runProgram p = rawSystemProgramConf (buildVerbose flags) p (withPrograms lbi)
diff --git a/pkgs/development/tools/parsing/jikespg/builder.sh b/pkgs/development/tools/parsing/jikespg/builder.sh
deleted file mode 100644
index e63ec9808f2..00000000000
--- a/pkgs/development/tools/parsing/jikespg/builder.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-source $stdenv/setup
-
-set -e
-
-configurePhase() {
-  tar zxvf $src 
-  cd jikespg/src
-}
-
-installPhase() {
-  mkdir -p $out/bin
-  cp jikespg $out/bin
-}
-
-genericBuild
diff --git a/pkgs/development/tools/parsing/jikespg/default.nix b/pkgs/development/tools/parsing/jikespg/default.nix
index 290e9a3a003..ea66204d9cd 100644
--- a/pkgs/development/tools/parsing/jikespg/default.nix
+++ b/pkgs/development/tools/parsing/jikespg/default.nix
@@ -2,9 +2,22 @@
 
 stdenv.mkDerivation {
   name = "jikespg-1.3";
-  builder = ./builder.sh;
+
   src = fetchurl {
     url = mirror://sourceforge/jikes/jikespg-1.3.tar.gz;
     md5 = "eba183713d9ae61a887211be80eeb21f";
   };
+
+  sourceRoot = "jikespg/src";
+
+  installPhase =
+    ''
+      mkdir -p $out/bin
+      cp jikespg $out/bin
+    '';
+
+  meta = {
+    homepage = http://jikes.sourceforge.net/;
+    description = "The Jikes Parser Generator";
+  };
 }
diff --git a/pkgs/development/tools/parsing/ragel/default.nix b/pkgs/development/tools/parsing/ragel/default.nix
index 2dec606254b..247daacf161 100644
--- a/pkgs/development/tools/parsing/ragel/default.nix
+++ b/pkgs/development/tools/parsing/ragel/default.nix
@@ -1,4 +1,4 @@
-{composableDerivation, fetchurl, transfig, texLive}:
+{stdenv, composableDerivation, fetchurl, transfig, texLive}:
 
 let
   version = "6.3";
@@ -37,6 +37,6 @@ composableDerivation.composableDerivation {} {
   meta = {
     homepage = http://www.complang.org/ragel;
     description = "State machine compiler";
-    license = "GPL-2";
+    license = stdenv.lib.licenses.gpl2;
   };
 }
diff --git a/pkgs/development/tools/parsing/re2c/default.nix b/pkgs/development/tools/parsing/re2c/default.nix
index e603768b8cc..5ff4f8ec9db 100644
--- a/pkgs/development/tools/parsing/re2c/default.nix
+++ b/pkgs/development/tools/parsing/re2c/default.nix
@@ -1,13 +1,19 @@
 {stdenv, fetchurl }:
 
-stdenv.mkDerivation {
-  name = "re2c-0.13.5";
+stdenv.mkDerivation rec {
+  name = "re2c-${version}";
+  version = "0.13.7.4";
+
   src = fetchurl {
-    url = mirror://sourceforge/re2c/re2c/0.13.5/re2c-0.13.5.tar.gz;
-    sha256 = "1336c54b3cacjxg3grxdraq6a00yidr04z90605fhxglk89rbagk";
+    url    = "mirror://sourceforge/re2c/re2c/${version}/${name}.tar.gz";
+    sha256 = "0j42s2gpz0rgiadwyb7ksqgc7i02l0q2qnmiyaj5f1w5rfa2c7yy";
   };
 
   meta = {
     description = "Tool for writing very fast and very flexible scanners";
+    homepage    = "http://re2c.org";
+    license     = stdenv.lib.licenses.publicDomain;
+    platforms   = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/development/tools/phantomjs/default.nix b/pkgs/development/tools/phantomjs/default.nix
index 7eea3bedcef..6fc53595efb 100644
--- a/pkgs/development/tools/phantomjs/default.nix
+++ b/pkgs/development/tools/phantomjs/default.nix
@@ -1,9 +1,9 @@
-{ stdenv, fetchurl, freetype, fontconfig, openssl }:
+{ stdenv, fetchurl, freetype, fontconfig, openssl, unzip }:
 
-assert stdenv.lib.elem stdenv.system [ "i686-linux" "x86_64-linux" ];
+assert stdenv.lib.elem stdenv.system [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
 
 stdenv.mkDerivation rec {
-  name = "phantomjs-1.9.2";
+  name = "phantomjs-1.9.7";
 
   # I chose to use the binary build for now.
   # The source version is quite nasty to compile
@@ -12,16 +12,24 @@ stdenv.mkDerivation rec {
 
   src = if stdenv.system == "i686-linux" then
           fetchurl {
-            url = "http://phantomjs.googlecode.com/files/${name}-linux-i686.tar.bz2";
-            sha256 = "1nywb9xhcfjark6zfjlnrljc08r5185vv25vfcc65jzla8hy75qp";
+            url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-i686.tar.bz2";
+            sha256 = "1ffd5544wnkww5cgwsims4bk4bymvm6pm19p32nbhwabxqhbnj9a";
           }
-        else # x86_64-linux
-          fetchurl {
-            url = "http://phantomjs.googlecode.com/files/${name}-linux-x86_64.tar.bz2";
-            sha256 = "1xsjx4j6rwkq27y4iqdn0ai4yrq70a3g9309blywki0g976phccg";
-          };
+        else
+          if stdenv.system == "x86_64-linux" then
+            fetchurl {
+              url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-x86_64.tar.bz2";
+              sha256 = "06mhvj8rx298j0mrijw48zfm28hqgy81vdr1vv0jp4ncxbvijfs7";
+            }
+          else # x86_64-darwin
+            fetchurl {
+              url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-macosx.zip";
+              sha256 = "0vsagvx181gnypi6kgmxp4br6hnvd81vyy3cbz5pxccdys7iywvj";
+            };
+
+  buildInputs = if stdenv.isDarwin then [ unzip ] else [];
 
-  buildPhase = ''
+  buildPhase = if stdenv.isDarwin then "" else ''
     patchelf \
       --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
       --set-rpath "${freetype}/lib:${fontconfig}/lib:${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib:${openssl}/lib" \
@@ -55,6 +63,6 @@ stdenv.mkDerivation rec {
     license = stdenv.lib.licenses.bsd3;
 
     maintainers = [ stdenv.lib.maintainers.bluescreen303 ];
-    platforms = ["i686-linux" "x86_64-linux" ];
+    platforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" ];
   };
 }
diff --git a/pkgs/development/tools/profiling/oprofile/default.nix b/pkgs/development/tools/profiling/oprofile/default.nix
index c0056697743..e301fe8431a 100644
--- a/pkgs/development/tools/profiling/oprofile/default.nix
+++ b/pkgs/development/tools/profiling/oprofile/default.nix
@@ -6,11 +6,11 @@
 assert withGUI -> qt4 != null;
 
 stdenv.mkDerivation rec {
-  name = "oprofile-0.9.8";
+  name = "oprofile-0.9.9";
 
   src = fetchurl {
     url = "mirror://sourceforge/oprofile/${name}.tar.gz";
-    sha256 = "1g31lwgpacql6w5z1z2f31pgwzn14rgsbh7kmmdmsgm2l47r0idb";
+    sha256 = "15vm24jhw4xfd55pfw1rlpzfsh4bl1vyjsajs78bi9xbv8038lhy";
   };
 
   patchPhase = ''
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
       is profiled: hardware and software interrupt handlers, kernel
       modules, the kernel, shared libraries, and applications.
     '';
-    license = "GPLv2";
+    license = stdenv.lib.licenses.gpl2;
     homepage = http://oprofile.sourceforge.net/;
 
     platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/development/tools/profiling/sysprof/default.nix b/pkgs/development/tools/profiling/sysprof/default.nix
index b6750f88937..457a5d1dcaa 100644
--- a/pkgs/development/tools/profiling/sysprof/default.nix
+++ b/pkgs/development/tools/profiling/sysprof/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = http://sysprof.com/;
     description = "Sysprof, a system-wide profiler for Linux";
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     longDescription = ''
       Sysprof is a sampling CPU profiler for Linux that uses the perf_event_open
diff --git a/pkgs/development/tools/profiling/systemtap/default.nix b/pkgs/development/tools/profiling/systemtap/default.nix
index 293ff66f29d..66dda8f43ef 100644
--- a/pkgs/development/tools/profiling/systemtap/default.nix
+++ b/pkgs/development/tools/profiling/systemtap/default.nix
@@ -1,9 +1,9 @@
-{ fetchurl, stdenv, linux, elfutils, latex2html, xmlto, docbook_xml_dtd_412
+{ fetchurl, stdenv, elfutils, latex2html, xmlto, docbook_xml_dtd_412
 , libxml2, docbook_xsl, libxslt, texLive, texLiveExtra, ghostscript, pkgconfig
 , gtkmm, libglademm, boost, perl, sqlite }:
 
 stdenv.mkDerivation rec {
-  name = "systemtap-1.2-${linux.version}";
+  name = "systemtap-1.2";
 
   src = fetchurl {
     url = "http://sources.redhat.com/systemtap/ftp/releases/${name}.tar.gz";
@@ -65,9 +65,10 @@ stdenv.mkDerivation rec {
 
     homepage = http://sourceware.org/systemtap/;
 
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     maintainers = [ ];
     platforms = stdenv.lib.platforms.linux;
+    broken = true;
   };
 }
diff --git a/pkgs/development/tools/pydb/default.nix b/pkgs/development/tools/pydb/default.nix
index 23f0dea4453..baa816589ca 100644
--- a/pkgs/development/tools/pydb/default.nix
+++ b/pkgs/development/tools/pydb/default.nix
@@ -18,6 +18,6 @@ stdenv.mkDerivation {
   meta = { 
     description = "Python debugger with GDB-like commands and Emacs bindings";
     homepage = http://bashdb.sourceforge.net/pydb/;
-    license = "GPLv3";
+    license = stdenv.lib.licenses.gpl3;
   };
 }
diff --git a/pkgs/development/tools/quilt/default.nix b/pkgs/development/tools/quilt/default.nix
new file mode 100644
index 00000000000..7ac4f6d39b7
--- /dev/null
+++ b/pkgs/development/tools/quilt/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, pkgs}:
+
+with pkgs;
+
+stdenv.mkDerivation rec {
+  name = "quilt-0.63";
+
+  src = fetchurl {
+    url = "mirror://savannah/quilt/${name}.tar.gz";
+    sha256 = "2846788221aa8844c54f10239c7cbc5e88031859162bcc285449446c3cfffe52";
+  };
+
+  buildInputs = [ makeWrapper perl bash diffutils patch findutils diffstat ];
+
+  postInstall = ''
+    wrapProgram $out/bin/quilt --prefix PATH : \
+      ${perl}/bin:${bash}/bin:${diffstat}/bin:${diffutils}/bin:${findutils}/bin:${patch}/bin
+  '';
+
+  meta = {
+    homepage = http://savannah.nongnu.org/projects/quilt;
+    description = "Easily manage large numbers of patches";
+
+    longDescription = ''
+      Quilt allows you to easily manage large numbers of
+      patches by keeping track of the changes each patch
+      makes. Patches can be applied, un-applied, refreshed,
+      and more.
+    '';
+
+    license = "GPLv2+";
+  };
+}
diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix
index bccaa70ead7..30430671342 100644
--- a/pkgs/development/tools/selenium/chromedriver/default.nix
+++ b/pkgs/development/tools/selenium/chromedriver/default.nix
@@ -1,17 +1,17 @@
 { stdenv, fetchurl, cairo, fontconfig, freetype, gdk_pixbuf, glib
 , glibc, gtk, libX11, makeWrapper, nspr, nss, pango, unzip, gconf
-, libXrender, libXext
+, libXi, libXrender, libXext
 }:
 
 # note: there is a i686 version available as well
 assert stdenv.system == "x86_64-linux";
 
 stdenv.mkDerivation rec {
-  name = "chromedriver_linux64_2.0";
+  name = "chromedriver_linux64";
 
   src = fetchurl {
-    url = "http://chromedriver.googlecode.com/files/${name}.zip";
-    sha256 = "165dq5550fs6262qa2jnjvm9smwjvws2zkkz7z5v4ibfg2j3409m";
+    url = "http://chromedriver.storage.googleapis.com/2.10/${name}.zip";
+    sha256 = "1949lhrv4hrmgapvypsgwzyr75w7vpy7nkkkwjkjxn61dkwmx4jw";
   };
 
   buildInputs = [ unzip makeWrapper ];
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
     mv chromedriver $out/bin
     patchelf --set-interpreter ${glibc}/lib/ld-linux-x86-64.so.2 $out/bin/chromedriver
     wrapProgram "$out/bin/chromedriver" \
-      --prefix LD_LIBRARY_PATH : "$(cat ${stdenv.gcc}/nix-support/orig-gcc)/lib64:${cairo}/lib:${fontconfig}/lib:${freetype}/lib:${gdk_pixbuf}/lib:${glib}/lib:${gtk}/lib:${libX11}/lib:${nspr}/lib:${nss}/lib:${pango}/lib:${libXrender}/lib:${gconf}/lib:${libXext}/lib:\$LD_LIBRARY_PATH"
+      --prefix LD_LIBRARY_PATH : "$(cat ${stdenv.gcc}/nix-support/orig-gcc)/lib64:${cairo}/lib:${fontconfig}/lib:${freetype}/lib:${gdk_pixbuf}/lib:${glib}/lib:${gtk}/lib:${libX11}/lib:${nspr}/lib:${nss}/lib:${pango}/lib:${libXrender}/lib:${gconf}/lib:${libXext}/lib:${libXi}/lib:\$LD_LIBRARY_PATH"
   '';
 
   meta = with stdenv.lib; {
@@ -31,5 +31,6 @@ stdenv.mkDerivation rec {
     description = "A WebDriver server for running Selenium tests on Chrome";
     license = licenses.bsd3;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/tools/selenium/server/default.nix b/pkgs/development/tools/selenium/server/default.nix
new file mode 100644
index 00000000000..efb1e85c2d7
--- /dev/null
+++ b/pkgs/development/tools/selenium/server/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "selenium-server-standalone-${version}";
+  version = "2.39.0";
+
+  src = fetchurl {
+    url = "https://selenium.googlecode.com/files/${name}.jar";
+    sha256 = "11ixh5x5f9kia2va8wssd3n7y57dkv3snw6xvk85y4qhzg64b65f";
+  };
+
+  unpack = "";
+
+  buildCommand = ''
+    mkdir -p $out/share/lib/${name}
+    cp $src $out/share/lib/${name}/${name}.jar
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://code.google.com/p/selenium;
+    description = "Selenium Server for remote WebDriver.";
+    maintainers = [ maintainers.coconnor ];
+    platforms = platforms.all;
+    hydraPlatforms = [];
+    license = licenses.asl20;
+  };
+}
diff --git a/pkgs/development/tools/sigrok-cli/default.nix b/pkgs/development/tools/sigrok-cli/default.nix
new file mode 100644
index 00000000000..b2e6dea09e6
--- /dev/null
+++ b/pkgs/development/tools/sigrok-cli/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, pkgconfig, glib, libsigrok, libsigrokdecode }:
+
+stdenv.mkDerivation rec {
+  name = "sigrok-cli-0.5.0";
+
+  src = fetchurl {
+    url = "http://sigrok.org/download/source/sigrok-cli/${name}.tar.gz";
+    sha256 = "0g3jzspq9iwz2szzxil9ilim1and85qd605f4jbc04sva80hb8vk";
+  };
+
+  buildInputs = [ pkgconfig glib libsigrok libsigrokdecode ];
+
+  meta = with stdenv.lib; {
+    description = "Command-line frontend for the sigrok signal analysis software suite";
+    homepage = http://sigrok.org/;
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/pkgs/development/tools/slimerjs/default.nix b/pkgs/development/tools/slimerjs/default.nix
index 0fe10a0003a..9741b0930d2 100644
--- a/pkgs/development/tools/slimerjs/default.nix
+++ b/pkgs/development/tools/slimerjs/default.nix
@@ -3,12 +3,11 @@ let
   s = # Generated upstream information
   rec {
     baseName="slimerjs";
-    version="git-2013-10-31";
+    version="0.9.1";
     name="${baseName}-${version}";
-    hash="643a9d2f97f238bbd9debb17c010946d507a3b740079d9398939e7fdd70256b9";
-    url="https://github.com/laurentj/slimerjs";
-    rev="fdeb7364d3e29b47391ed0651176c1aedcb5277f";
-    sha256="643a9d2f97f238bbd9debb17c010946d507a3b740079d9398939e7fdd70256b9";
+    hash="1ss69z2794mv40nfa5bfjd8h78jzcjq5xm63hzay1iyvp5rjbl7k";
+    url="http://download.slimerjs.org/v0.9/0.9.1/slimerjs-0.9.1.zip";
+    sha256="1ss69z2794mv40nfa5bfjd8h78jzcjq5xm63hzay1iyvp5rjbl7k";
   };
   buildInputs = [
     unzip zip
@@ -17,12 +16,12 @@ in
 stdenv.mkDerivation {
   inherit (s) name version;
   inherit buildInputs;
-  # src = fetchurl {
-  #   inherit (s) url sha256;
-  # };
-  src = fetchgit {
-    inherit (s) url sha256 rev;
-  };
+   src = fetchurl {
+     inherit (s) url sha256;
+   };
+  #src = fetchgit {
+  #  inherit (s) url sha256 rev;
+  #};
   preConfigure = ''
     test -d src && cd src
     test -f omni.ja || zip omni.ja -r */
diff --git a/pkgs/development/tools/sqsh/default.nix b/pkgs/development/tools/sqsh/default.nix
new file mode 100644
index 00000000000..a0f7922b1aa
--- /dev/null
+++ b/pkgs/development/tools/sqsh/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, freetds, readline }:
+
+stdenv.mkDerivation rec {
+  version = "2.5.16.1";
+  name = "sqsh-${version}";
+
+  src = fetchurl {
+    url = "http://www.mirrorservice.org/sites/downloads.sourceforge.net/s/sq/sqsh/sqsh/sqsh-2.5/${name}.tgz";
+    sha256 = "1wi0hdmhk7l8nrz4j3kaa177mmxyklmzhj7sq1gj4q6fb8v1yr6n";
+  };
+
+  preConfigure =
+    ''
+    export SYBASE=${freetds}
+    '';
+
+  buildInputs = [ 
+    freetds 
+    readline
+  ];
+
+  meta = {
+    description = "SQSH is command line tool for querying Sybase/MSSQL databases";
+    longDescription = 
+      ''
+      Sqsh (pronounced skwish) is short for SQshelL (pronounced s-q-shell),
+      it is intended as a replacement for the venerable 'isql' program supplied
+      by Sybase.
+      '';
+    homepage = "http://www.cs.washington.edu/~rose/sqsh/sqsh.html";
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix
new file mode 100644
index 00000000000..072b8eeff5c
--- /dev/null
+++ b/pkgs/development/tools/vagrant/default.nix
@@ -0,0 +1,93 @@
+{ stdenv, fetchurl, dpkg, curl, libarchive, openssl, ruby, rubyLibs, libiconv
+, libxml2, libxslt }:
+
+assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";
+
+stdenv.mkDerivation rec {
+  name = "vagrant-1.6.3";
+
+  src =
+    if stdenv.system == "x86_64-linux" then
+      fetchurl {
+        url    = https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.3_x86_64.deb;
+        sha256 = "1gmdg92dw7afnvpji0wg4nzr7vhk8mrmcqk3hcrkwscby2f2bhqg";
+      }
+    else
+      fetchurl {
+        url    = https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.3_i686.deb;
+        sha256 = "1z26b6yghqgx8jbi2igf4kk4h6rzy869gli2vj7ayl7vbqdfvb60";
+      };
+
+  meta = with stdenv.lib; {
+    description = "A tool for building complete development environments";
+    homepage    = http://vagrantup.com;
+    license     = licenses.mit;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.linux;
+  };
+
+  unpackPhase = ''
+    ${dpkg}/bin/dpkg-deb -x ${src} .
+  '';
+
+  buildPhase = false;
+
+  installPhase = ''
+    sed -i "s|/opt|$out/opt|" usr/bin/vagrant
+
+    # overwrite embedded binaries
+
+    # curl: curl
+    rm opt/vagrant/embedded/bin/curl
+    ln -s ${curl}/bin/curl opt/vagrant/embedded/bin
+
+    # libarchive: bsdtar, bsdcpio
+    rm opt/vagrant/embedded/bin/{bsdtar,bsdcpio}
+    ln -s ${libarchive}/bin/bsdtar opt/vagrant/embedded/bin
+    ln -s ${libarchive}/bin/bsdcpio opt/vagrant/embedded/bin
+
+    # openssl: c_rehash, openssl
+    rm opt/vagrant/embedded/bin/{c_rehash,openssl}
+    ln -s ${openssl}/bin/c_rehash opt/vagrant/embedded/bin
+    ln -s ${openssl}/bin/openssl opt/vagrant/embedded/bin
+
+    # ruby: erb, gem, irb, rake, rdoc, ri, ruby, testrb
+    rm opt/vagrant/embedded/bin/{erb,gem,irb,rake,rdoc,ri,ruby,testrb}
+    ln -s ${ruby}/bin/erb opt/vagrant/embedded/bin
+    ln -s ${ruby}/bin/gem opt/vagrant/embedded/bin
+    ln -s ${ruby}/bin/irb opt/vagrant/embedded/bin
+    ln -s ${rubyLibs.rake}/bin/rake opt/vagrant/embedded/bin
+    ln -s ${ruby}/bin/rdoc opt/vagrant/embedded/bin
+    ln -s ${ruby}/bin/ri opt/vagrant/embedded/bin
+    ln -s ${ruby}/bin/ruby opt/vagrant/embedded/bin
+    ln -s ${ruby}/bin/testrb opt/vagrant/embedded/bin
+
+    # libiconv: iconv
+    rm opt/vagrant/embedded/bin/iconv
+    ln -s ${libiconv}/bin/iconv opt/vagrant/embedded/bin
+
+    # libxml: xml2-config, xmlcatalog, xmllint
+    rm opt/vagrant/embedded/bin/{xml2-config,xmlcatalog,xmllint}
+    ln -s ${libxml2}/bin/xml2-config opt/vagrant/embedded/bin
+    ln -s ${libxml2}/bin/xmlcatalog opt/vagrant/embedded/bin
+    ln -s ${libxml2}/bin/xmllint opt/vagrant/embedded/bin
+
+    # libxslt: xslt-config, xsltproc
+    rm opt/vagrant/embedded/bin/{xslt-config,xsltproc}
+    ln -s ${libxslt}/bin/xslt-config opt/vagrant/embedded/bin
+    ln -s ${libxslt}/bin/xsltproc opt/vagrant/embedded/bin
+
+    mkdir -p "$out"
+    cp -r opt "$out"
+    cp -r usr/bin "$out"
+  '';
+
+  preFixup = ''
+    # 'hide' the template file from shebang-patching
+    chmod -x $out/opt/vagrant/embedded/gems/gems/bundler-1.6.2/lib/bundler/templates/Executable
+  '';
+
+  postFixup = ''
+    chmod +x $out/opt/vagrant/embedded/gems/gems/bundler-1.6.2/lib/bundler/templates/Executable
+  '';
+}
diff --git a/pkgs/development/tools/watchman/default.nix b/pkgs/development/tools/watchman/default.nix
new file mode 100644
index 00000000000..6db164131f7
--- /dev/null
+++ b/pkgs/development/tools/watchman/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, lib, config, fetchFromGitHub, autoconf, automake, pcre
+, confFile ? config.watchman.confFile or null
+}:
+
+stdenv.mkDerivation rec {
+  name = "watchman-${version}";
+
+  version = "2.9.8";
+
+  src = fetchFromGitHub {
+    owner = "facebook";
+    repo = "watchman";
+    rev = "v${version}";
+    sha256 = "196d71ci7ki4p6xx49w55cqd0bqrx19nf79na3a91mrfa6f22sp6";
+  };
+
+  buildInputs = [ autoconf automake pcre ];
+
+  configureFlags = [
+      "--enable-lenient"
+      "--enable-conffile=${if confFile == null then "no" else confFile}"
+      "--with-pcre=yes"
+  ];
+
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
+  meta = with lib; {
+    description = "Watches files and takes action when they change";
+    homepage    = https://facebook.github.io/watchman;
+    maintainers = with maintainers; [ cstrahan ];
+    platforms   = with platforms; linux ++ darwin;
+    license     = licenses.asl20;
+  };
+}
diff --git a/pkgs/development/tools/yuicompressor/default.nix b/pkgs/development/tools/yuicompressor/default.nix
new file mode 100644
index 00000000000..1a5485af541
--- /dev/null
+++ b/pkgs/development/tools/yuicompressor/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "yuicompressor";
+  version = "2.4.8";
+  src = fetchurl {
+    url = "http://github.com/yui/yuicompressor/releases/download/v${version}/${name}-${version}.jar";
+    sha256 = "1qjxlak9hbl9zd3dl5ks0w4zx5z64wjsbk7ic73r1r45fasisdrh";
+  };
+
+  meta = {
+    description = "A JavaScript and CSS minifier";
+    maintainers = [ stdenv.lib.maintainers.jwiegley ];
+    platforms = stdenv.lib.platforms.all;
+    homepage = http://yui.github.io/yuicompressor/;
+    license = stdenv.lib.licenses.bsd3;
+  };
+
+  buildCommand = ''
+    mkdir -p $out/lib
+    ln -s $src $out/lib/yuicompressor.jar
+  '';
+}