summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/audio/ardour/default.nix41
-rw-r--r--pkgs/applications/audio/caps/default.nix29
-rw-r--r--pkgs/applications/audio/drumkv1/default.nix21
-rw-r--r--pkgs/applications/audio/jack-oscrolloscope/default.nix26
-rw-r--r--pkgs/applications/audio/jack-rack/default.nix23
-rw-r--r--pkgs/applications/audio/jalv/default.nix29
-rw-r--r--pkgs/applications/audio/mopidy/default.nix44
-rw-r--r--pkgs/applications/audio/mopidy/git.nix44
-rw-r--r--pkgs/applications/audio/samplv1/default.nix21
-rw-r--r--pkgs/applications/audio/spotify/default.nix55
-rw-r--r--pkgs/applications/audio/synthv1/default.nix21
-rw-r--r--pkgs/applications/editors/emacs-24/builder.sh2
-rw-r--r--pkgs/applications/editors/emacs-24/default.nix6
-rw-r--r--pkgs/applications/graphics/mypaint/default.nix35
-rw-r--r--pkgs/applications/graphics/panotools/default.nix3
-rw-r--r--pkgs/applications/misc/mysql-workbench/default.nix19
-rw-r--r--pkgs/applications/misc/surf/default.nix16
-rw-r--r--pkgs/applications/misc/xmobar/add-freeration-variable.patch58
-rw-r--r--pkgs/applications/misc/xmobar/default.nix1
-rw-r--r--pkgs/applications/misc/zathura/builder.sh12
-rw-r--r--pkgs/applications/misc/zathura/core/default.nix11
-rw-r--r--pkgs/applications/misc/zathura/default.nix10
-rw-r--r--pkgs/applications/misc/zathura/icon.xpm120
-rw-r--r--pkgs/applications/networking/browsers/chromium/default.nix33
-rw-r--r--pkgs/applications/networking/browsers/chromium/pulse_audio_fix.patch11
-rw-r--r--pkgs/applications/networking/browsers/chromium/sources.nix18
-rw-r--r--pkgs/applications/networking/browsers/firefox/19.0.nix16
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix11
-rw-r--r--pkgs/applications/networking/browsers/rekonq/default.nix10
-rw-r--r--pkgs/applications/networking/browsers/vimprobable2/default.nix25
-rw-r--r--pkgs/applications/networking/irc/bip/bip-0.8.8-yyparse.patch11
-rw-r--r--pkgs/applications/networking/irc/bip/default.nix6
-rw-r--r--pkgs/applications/networking/msmtp/default.nix21
-rw-r--r--pkgs/applications/networking/p2p/transmission/default.nix17
-rw-r--r--pkgs/applications/networking/sniffers/wireshark/default.nix14
-rw-r--r--pkgs/applications/office/koffice/default.nix3
-rw-r--r--pkgs/applications/science/logic/tptp/default.nix2
-rw-r--r--pkgs/applications/version-management/git-and-tools/default.nix17
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-annex/default.nix61
-rw-r--r--pkgs/applications/version-management/git-and-tools/git/default.nix3
-rw-r--r--pkgs/applications/version-management/git-and-tools/github-backup/default.nix25
-rw-r--r--pkgs/applications/video/makemkv/builder.sh38
-rw-r--r--pkgs/applications/video/makemkv/default.nix39
-rw-r--r--pkgs/applications/video/mkvtoolnix/default.nix7
-rw-r--r--pkgs/applications/video/mplayer/default.nix5
-rw-r--r--pkgs/applications/video/xbmc/default.nix10
-rw-r--r--pkgs/applications/virtualization/virtualbox/build_fix_3.9.0.patch22
-rw-r--r--pkgs/applications/virtualization/virtualbox/default.nix13
-rw-r--r--pkgs/applications/virtualization/virtualbox/guest-additions/default.nix4
-rw-r--r--pkgs/applications/virtualization/virtualbox/strict_types.patch68
-rw-r--r--pkgs/applications/window-managers/fvwm/default.nix26
-rw-r--r--pkgs/build-support/cabal/default.nix11
-rw-r--r--pkgs/build-support/fetchurl/mirrors.nix14
-rw-r--r--pkgs/build-support/release/debian-build.nix2
-rw-r--r--pkgs/build-support/release/nix-build.nix2
-rw-r--r--pkgs/build-support/release/rpm-build.nix6
-rw-r--r--pkgs/build-support/release/source-tarball.nix22
-rwxr-xr-xpkgs/build-support/upstream-updater/urls-from-page.sh2
-rw-r--r--pkgs/build-support/vm/default.nix12
-rw-r--r--pkgs/data/documentation/man-pages/default.nix6
-rw-r--r--pkgs/desktops/xfce-4.8/applications/mousepad.nix20
-rw-r--r--pkgs/desktops/xfce-4.8/applications/ristretto.nix24
-rw-r--r--pkgs/desktops/xfce-4.8/applications/terminal.nix25
-rw-r--r--pkgs/desktops/xfce-4.8/applications/xfce4-notifyd.nix18
-rw-r--r--pkgs/desktops/xfce-4.8/applications/xfce4-taskmanager.nix18
-rw-r--r--pkgs/desktops/xfce-4.8/core/exo.nix19
-rw-r--r--pkgs/desktops/xfce-4.8/core/libxfce4ui.nix24
-rw-r--r--pkgs/desktops/xfce-4.8/core/thunar.nix27
-rw-r--r--pkgs/desktops/xfce-4.8/core/xfce4-panel.nix29
-rw-r--r--pkgs/desktops/xfce-4.8/core/xfce4-session.nix24
-rw-r--r--pkgs/desktops/xfce-4.8/core/xfce4-settings.nix26
-rw-r--r--pkgs/desktops/xfce-4.8/core/xfconf.nix20
-rw-r--r--pkgs/desktops/xfce-4.8/core/xfdesktop.nix26
-rw-r--r--pkgs/desktops/xfce-4.8/core/xfwm4.nix27
-rw-r--r--pkgs/desktops/xfce-4.8/default.nix94
-rw-r--r--pkgs/desktops/xfce-4.8/panel-plugins/xfce4-cpufreq-plugin.nix18
-rw-r--r--pkgs/desktops/xfce/applications/gigolo.nix (renamed from pkgs/desktops/xfce-4.8/applications/gigolo.nix)17
-rw-r--r--pkgs/desktops/xfce/applications/mousepad.nix25
-rw-r--r--pkgs/desktops/xfce/applications/ristretto.nix28
-rw-r--r--pkgs/desktops/xfce/applications/terminal.nix23
-rw-r--r--pkgs/desktops/xfce/applications/xfce4-mixer.nix (renamed from pkgs/desktops/xfce-4.8/applications/xfce4-mixer.nix)20
-rw-r--r--pkgs/desktops/xfce/applications/xfce4-notifyd.nix28
-rw-r--r--pkgs/desktops/xfce/applications/xfce4-taskmanager.nix21
-rw-r--r--pkgs/desktops/xfce/art/xfce4-icon-theme.nix (renamed from pkgs/desktops/xfce-4.8/art/xfce4-icon-theme.nix)11
-rw-r--r--pkgs/desktops/xfce/core/exo.nix23
-rw-r--r--pkgs/desktops/xfce/core/garcon.nix (renamed from pkgs/desktops/xfce-4.8/core/garcon.nix)11
-rw-r--r--pkgs/desktops/xfce/core/gtk-xfce-engine.nix (renamed from pkgs/desktops/xfce-4.8/core/gtk-xfce-engine.nix)15
-rw-r--r--pkgs/desktops/xfce/core/libxfce4ui.nix (renamed from pkgs/desktops/xfce-4.8/core/libxfcegui4.nix)15
-rw-r--r--pkgs/desktops/xfce/core/libxfce4util.nix (renamed from pkgs/desktops/xfce-4.8/core/libxfce4util.nix)11
-rw-r--r--pkgs/desktops/xfce/core/libxfcegui4.nix35
-rw-r--r--pkgs/desktops/xfce/core/thunar-volman.nix (renamed from pkgs/desktops/xfce-4.8/core/thunar-volman.nix)14
-rw-r--r--pkgs/desktops/xfce/core/thunar.nix35
-rw-r--r--pkgs/desktops/xfce/core/tumbler.nix21
-rw-r--r--pkgs/desktops/xfce/core/xfce-utils.nix (renamed from pkgs/desktops/xfce-4.8/core/xfce-utils.nix)16
-rw-r--r--pkgs/desktops/xfce/core/xfce4-appfinder.nix (renamed from pkgs/desktops/xfce-4.8/core/xfce4-appfinder.nix)13
-rw-r--r--pkgs/desktops/xfce/core/xfce4-panel-datadir.patch (renamed from pkgs/desktops/xfce-4.8/core/xfce4-panel-datadir.patch)0
-rw-r--r--pkgs/desktops/xfce/core/xfce4-panel.nix35
-rw-r--r--pkgs/desktops/xfce/core/xfce4-power-manager.nix (renamed from pkgs/desktops/xfce-4.8/applications/xfce4-power-manager.nix)12
-rw-r--r--pkgs/desktops/xfce/core/xfce4-session.nix33
-rw-r--r--pkgs/desktops/xfce/core/xfce4-settings.nix31
-rw-r--r--pkgs/desktops/xfce/core/xfconf.nix23
-rw-r--r--pkgs/desktops/xfce/core/xfdesktop.nix30
-rw-r--r--pkgs/desktops/xfce/core/xfwm4.nix31
-rw-r--r--pkgs/desktops/xfce/default.nix76
-rw-r--r--pkgs/desktops/xfce/panel-plugins/xfce4-cpufreq-plugin.nix22
-rw-r--r--pkgs/desktops/xfce/panel-plugins/xfce4-systemload-plugin.nix (renamed from pkgs/desktops/xfce-4.8/panel-plugins/xfce4-systemload-plugin.nix)13
-rw-r--r--pkgs/desktops/xfce/support/gvfs.nix (renamed from pkgs/desktops/xfce-4.8/support/gvfs.nix)4
-rw-r--r--pkgs/desktops/xfce/support/libgdu-only.patch (renamed from pkgs/desktops/xfce-4.8/support/libgdu-only.patch)0
-rw-r--r--pkgs/desktops/xfce/support/libgdu.nix (renamed from pkgs/desktops/xfce-4.8/support/libgdu.nix)0
-rwxr-xr-xpkgs/development/compilers/ghc/ghc-get-packages.sh2
-rw-r--r--pkgs/development/compilers/ghc/head.nix4
-rw-r--r--pkgs/development/compilers/ghc/with-packages.nix125
-rw-r--r--pkgs/development/compilers/idris/default.nix4
-rw-r--r--pkgs/development/compilers/jhc/default.nix11
-rw-r--r--pkgs/development/compilers/sbcl/default.nix11
-rw-r--r--pkgs/development/compilers/scala/default.nix1
-rw-r--r--pkgs/development/compilers/sdcc/default.nix32
-rw-r--r--pkgs/development/interpreters/php/5.3.nix43
-rw-r--r--pkgs/development/interpreters/python/docs/2.6-html.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.6-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.6-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.6-text.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.7-html.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.7-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.7-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/2.7-text.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.0-html.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.0-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.0-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.0-text.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.1-html.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.1-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.1-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.1-text.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.2-html.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.2-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.2-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.2-text.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.3-html.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.3-pdf-a4.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.3-pdf-letter.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/3.3-text.nix18
-rw-r--r--pkgs/development/interpreters/python/docs/default.nix89
-rwxr-xr-xpkgs/development/interpreters/python/docs/generate.sh59
-rw-r--r--pkgs/development/interpreters/python/docs/template.nix18
-rw-r--r--pkgs/development/interpreters/ruby/fix-gem-nix-versions.patch35
-rw-r--r--pkgs/development/interpreters/ruby/generated.nix390
-rw-r--r--pkgs/development/interpreters/ruby/patches.nix11
-rw-r--r--pkgs/development/interpreters/ruby/ruby-2.0.nix57
-rw-r--r--pkgs/development/libraries/apache-activemq/default.nix31
-rw-r--r--pkgs/development/libraries/boost/1.53.nix2
-rw-r--r--pkgs/development/libraries/bullet/default.nix19
-rw-r--r--pkgs/development/libraries/cairo/1.12.2.nix85
-rw-r--r--pkgs/development/libraries/cairo/default.nix3
-rw-r--r--pkgs/development/libraries/cyrus-sasl/default.nix15
-rw-r--r--pkgs/development/libraries/cyrus-sasl/missing-size_t.patch13
-rw-r--r--pkgs/development/libraries/ffmpeg/1.0.nix85
-rw-r--r--pkgs/development/libraries/ffmpeg/1.1.nix2
-rw-r--r--pkgs/development/libraries/gamin/deadlock.patch68
-rw-r--r--pkgs/development/libraries/gamin/default.nix2
-rw-r--r--pkgs/development/libraries/glibc/2.17/common.nix9
-rw-r--r--pkgs/development/libraries/glibc/2.17/glibc-rh739743.patch55
-rw-r--r--pkgs/development/libraries/glibc/2.17/info.nix2
-rw-r--r--pkgs/development/libraries/gmp/5.0.5.nix7
-rw-r--r--pkgs/development/libraries/gsl/default.nix4
-rw-r--r--pkgs/development/libraries/gsl/disable-fma.patch32
-rw-r--r--pkgs/development/libraries/haskell/DAV/default.nix5
-rw-r--r--pkgs/development/libraries/haskell/NumInstances/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/OpenAL/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/QuickCheck/2.6.nix15
-rw-r--r--pkgs/development/libraries/haskell/Safe/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/basic-prelude/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/bifunctors/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/binary/default.nix9
-rw-r--r--pkgs/development/libraries/haskell/blaze-html/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/blaze-markup/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/citeproc-hs/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/classy-prelude/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/cmdargs/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/conduit/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/constraints/default.nix15
-rw-r--r--pkgs/development/libraries/haskell/cuda/default.nix8
-rw-r--r--pkgs/development/libraries/haskell/data-default/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/diagrams/core.nix5
-rw-r--r--pkgs/development/libraries/haskell/digestive-functors-heist/default.nix12
-rw-r--r--pkgs/development/libraries/haskell/distributive/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/doctest/default.nix1
-rw-r--r--pkgs/development/libraries/haskell/flexible-defaults/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/ghc-mod/default.nix14
-rw-r--r--pkgs/development/libraries/haskell/ghc-vis/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/github/default.nix25
-rw-r--r--pkgs/development/libraries/haskell/gitit/default.nix5
-rw-r--r--pkgs/development/libraries/haskell/hakyll/default.nix9
-rw-r--r--pkgs/development/libraries/haskell/happstack/happstack-server.nix4
-rw-r--r--pkgs/development/libraries/haskell/haskell-src-meta/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/heist/default.nix5
-rw-r--r--pkgs/development/libraries/haskell/highlighting-kate/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/hint/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/hp2any-core/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/hp2any-graph/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/http-conduit/default.nix34
-rw-r--r--pkgs/development/libraries/haskell/iproute/default.nix8
-rw-r--r--pkgs/development/libraries/haskell/liblastfm/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/monad-control/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/monad-logger/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/multiarg/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/numbers/default.nix7
-rw-r--r--pkgs/development/libraries/haskell/pandoc/default.nix23
-rw-r--r--pkgs/development/libraries/haskell/persistent-sqlite/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/persistent-template/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/publicsuffixlist/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/punycode/default.nix1
-rw-r--r--pkgs/development/libraries/haskell/resourcet/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/shake/default.nix21
-rw-r--r--pkgs/development/libraries/haskell/shakespeare-js/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/shelly/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/smallcheck/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/stylish-haskell/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/syb/0.4.0.nix15
-rw-r--r--pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix1
-rw-r--r--pkgs/development/libraries/haskell/testpack/default.nix5
-rw-r--r--pkgs/development/libraries/haskell/th-extras/default.nix6
-rw-r--r--pkgs/development/libraries/haskell/threads/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/time-compat/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/uu-parsinglib/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/uulib/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/void/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/wai-extra/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/wl-pprint-extras/default.nix14
-rw-r--r--pkgs/development/libraries/haskell/wl-pprint-terminfo/default.nix18
-rw-r--r--pkgs/development/libraries/haskell/wl-pprint/default.nix12
-rw-r--r--pkgs/development/libraries/haskell/xdot/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/xml-conduit/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/yaml/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/yesod-json/default.nix11
-rw-r--r--pkgs/development/libraries/haskell/yesod-test/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/yesod/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/yst/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/zip-archive/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/zlib/0.5.4.1.nix14
-rw-r--r--pkgs/development/libraries/jbig2dec/default.nix12
-rw-r--r--pkgs/development/libraries/libchop/default.nix3
-rw-r--r--pkgs/development/libraries/libchop/gets-undeclared.patch71
-rw-r--r--pkgs/development/libraries/libee/default.nix16
-rw-r--r--pkgs/development/libraries/libestr/default.nix8
-rw-r--r--pkgs/development/libraries/libmcrypt/default.nix9
-rw-r--r--pkgs/development/libraries/libnotify/default.nix31
-rw-r--r--pkgs/development/libraries/librdf/default.nix28
-rw-r--r--pkgs/development/libraries/librdf/raptor2.nix6
-rw-r--r--pkgs/development/libraries/librdf/rasqal.nix8
-rw-r--r--pkgs/development/libraries/librdf/redland.nix4
-rw-r--r--pkgs/development/libraries/libsoup/default.nix16
-rw-r--r--pkgs/development/libraries/libunique/1.1.6-G_CONST_RETURN.patch143
-rw-r--r--pkgs/development/libraries/libunique/1.1.6-compiler-warnings.patch50
-rw-r--r--pkgs/development/libraries/libunique/1.1.6-fix-test.patch26
-rw-r--r--pkgs/development/libraries/libunique/1.1.6-include-terminator.patch37
-rw-r--r--pkgs/development/libraries/libunique/default.nix31
-rw-r--r--pkgs/development/libraries/mpc/default.nix2
-rw-r--r--pkgs/development/libraries/nss/default.nix24
-rw-r--r--pkgs/development/libraries/nss/nss-3.14.1-gentoo-fixups-r1.patch (renamed from pkgs/development/libraries/nss/nss-3.12.5-gentoo-fixups.diff)62
-rw-r--r--pkgs/development/libraries/nss/sync-up-with-upstream-softokn-changes.patch406
-rw-r--r--pkgs/development/libraries/opencascade/oce.nix26
-rw-r--r--pkgs/development/libraries/openmpi/default.nix11
-rw-r--r--pkgs/development/libraries/pango/1.30.x.nix4
-rw-r--r--pkgs/development/libraries/ppl/default.nix2
-rw-r--r--pkgs/development/libraries/sodium/default.nix28
-rw-r--r--pkgs/development/libraries/sodium/default.upstream1
-rw-r--r--pkgs/development/libraries/sword/default.nix2
-rw-r--r--pkgs/development/libraries/sword/gcc47.patch35
-rw-r--r--pkgs/development/libraries/tinyxml/2.6.2.nix4
-rw-r--r--pkgs/development/libraries/ustr/default.nix5
-rw-r--r--pkgs/development/libraries/ustr/va_args.patch23
-rw-r--r--pkgs/development/libraries/webkit/default.nix45
-rw-r--r--pkgs/development/libraries/webkit/gtk2.nix53
-rw-r--r--pkgs/development/libraries/webkit/src-for-gtk2.nix11
-rw-r--r--pkgs/development/mobile/androidenv/build-app.nix3
-rw-r--r--pkgs/development/mobile/titaniumenv/build-app.nix5
-rw-r--r--pkgs/development/mobile/titaniumenv/examples/default.nix24
-rw-r--r--pkgs/development/mobile/xcodeenv/build-app.nix7
-rw-r--r--pkgs/development/mobile/xcodeenv/xcodewrapper.nix5
-rw-r--r--pkgs/development/perl-modules/catalyst-plugin-static-simple-etag.patch37
-rw-r--r--pkgs/development/python-modules/dbus/default.nix14
-rw-r--r--pkgs/development/python-modules/pycrypto/2.5.nix29
-rw-r--r--pkgs/development/python-modules/pygobject/default.nix6
-rwxr-xr-xpkgs/development/tools/build-managers/cmake/setup-hook.sh2
-rw-r--r--pkgs/development/tools/haskell/cabal2nix/default.nix4
-rw-r--r--pkgs/development/tools/haskell/packunused/default.nix16
-rw-r--r--pkgs/development/tools/misc/ctags/default.nix27
-rw-r--r--pkgs/development/tools/misc/elfutils/default.nix12
-rw-r--r--pkgs/development/tools/misc/gob2/default.nix9
-rw-r--r--pkgs/development/tools/misc/lsof/default.nix6
-rw-r--r--pkgs/development/tools/misc/texinfo/5.1.nix (renamed from pkgs/development/tools/misc/texinfo/5.0.nix)4
-rw-r--r--pkgs/development/tools/ocaml/opam/default.nix60
-rw-r--r--pkgs/development/tools/parsing/alex/3.0.5.nix (renamed from pkgs/development/tools/parsing/alex/3.0.4.nix)8
-rw-r--r--pkgs/development/tools/selenium/chromedriver/default.nix37
-rw-r--r--pkgs/development/web/nodejs/default.nix24
-rw-r--r--pkgs/games/asc/default.nix4
-rw-r--r--pkgs/games/eduke32/default.nix10
-rw-r--r--pkgs/games/unvanquished/default.nix4
-rw-r--r--pkgs/games/vdrift/default.nix12
-rw-r--r--pkgs/games/xboard/default.nix13
-rw-r--r--pkgs/lib/attrsets.nix13
-rw-r--r--pkgs/lib/maintainers.nix1
-rw-r--r--pkgs/lib/meta.nix2
-rw-r--r--pkgs/misc/emulators/wine/default.nix5
-rw-r--r--pkgs/os-specific/linux/bbswitch/default.nix13
-rw-r--r--pkgs/os-specific/linux/checkpolicy/default.nix13
-rw-r--r--pkgs/os-specific/linux/cifs-utils/default.nix2
-rw-r--r--pkgs/os-specific/linux/cifs-utils/find-systemd-ask-password-via-path.patch22
-rw-r--r--pkgs/os-specific/linux/firmware/bcm43xx/default.nix4
-rw-r--r--pkgs/os-specific/linux/firmware/iwlwifi-4965-ucode/version-2.nix7
-rw-r--r--pkgs/os-specific/linux/firmware/iwlwifi-5000-ucode/default.nix5
-rw-r--r--pkgs/os-specific/linux/firmware/rtl8168e-2/default.nix3
-rw-r--r--pkgs/os-specific/linux/hostapd/default.nix3
-rw-r--r--pkgs/os-specific/linux/kernel/generic.nix6
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.0.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.2.nix7
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.4.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.7.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.8.nix5
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.9.nix280
-rw-r--r--pkgs/os-specific/linux/kernel/linux.upstream.template13
-rw-r--r--pkgs/os-specific/linux/kernel/manual-config.nix44
-rw-r--r--pkgs/os-specific/linux/libcap-ng/default.nix22
-rw-r--r--pkgs/os-specific/linux/libselinux/default.nix31
-rw-r--r--pkgs/os-specific/linux/libselinux/fPIC.patch13
-rw-r--r--pkgs/os-specific/linux/libsemanage/default.nix18
-rw-r--r--pkgs/os-specific/linux/libsepol/default.nix19
-rw-r--r--pkgs/os-specific/linux/policycoreutils/default.nix36
-rw-r--r--pkgs/os-specific/linux/qemu-kvm/default.nix34
-rw-r--r--pkgs/os-specific/linux/sepolgen/default.nix22
-rw-r--r--pkgs/os-specific/linux/xf86-input-wacom/default.nix4
-rw-r--r--pkgs/os-specific/linux/xf86-video-nested/default.nix4
-rw-r--r--pkgs/servers/amqp/rabbitmq-server/default.nix7
-rw-r--r--pkgs/servers/http/apache-httpd/2.4.nix4
-rw-r--r--pkgs/servers/search/elasticsearch/default.nix21
-rw-r--r--pkgs/servers/search/elasticsearch/es-home.patch20
-rw-r--r--pkgs/servers/sql/oracle-xe/default.nix83
-rw-r--r--pkgs/servers/x11/xorg/default.nix6
-rw-r--r--pkgs/servers/x11/xorg/overrides.nix5
-rw-r--r--pkgs/stdenv/generic/default.nix98
-rw-r--r--pkgs/stdenv/linux/default.nix8
-rw-r--r--pkgs/tools/X11/virtualgl/default.nix10
-rw-r--r--pkgs/tools/X11/xchainkeys/default.nix18
-rw-r--r--pkgs/tools/archivers/zpaq/default.nix51
-rw-r--r--pkgs/tools/archivers/zpaq/default.upstream3
-rw-r--r--pkgs/tools/bluetooth/kbluetooth/default.nix4
-rw-r--r--pkgs/tools/compression/lrzip/default.nix14
-rw-r--r--pkgs/tools/compression/lrzip/default.upstream8
-rw-r--r--pkgs/tools/compression/lzip/default.nix10
-rw-r--r--pkgs/tools/filesystems/grive/default.nix10
-rw-r--r--pkgs/tools/graphics/graphviz/default.nix2
-rw-r--r--pkgs/tools/graphics/netpbm/default.nix13
-rw-r--r--pkgs/tools/graphics/zbar/default.nix2
-rw-r--r--pkgs/tools/misc/mktorrent/default.nix27
-rw-r--r--pkgs/tools/misc/recutils/default.nix2
-rw-r--r--pkgs/tools/misc/recutils/glibc.patch29
-rw-r--r--pkgs/tools/misc/tmux/default.nix19
-rw-r--r--pkgs/tools/networking/iftop/default.nix4
-rw-r--r--pkgs/tools/networking/p2p/amule/default.nix8
-rw-r--r--pkgs/tools/networking/p2p/amule/gcc47.patch21
-rwxr-xr-xpkgs/tools/networking/snx/snx_install.shbin965717 -> 0 bytes
-rw-r--r--pkgs/tools/networking/wicd/default.nix43
-rw-r--r--pkgs/tools/networking/wicd/no-optimization.patch12
-rw-r--r--pkgs/tools/networking/wicd/no-trans.patch15
-rw-r--r--pkgs/tools/networking/wicd/no-var-install.patch38
-rw-r--r--pkgs/tools/package-management/checkinstall/default.nix4
-rw-r--r--pkgs/tools/package-management/checkinstall/glibc-check.patch2
-rw-r--r--pkgs/tools/package-management/checkinstall/use-old-memcpy.patch12
-rw-r--r--pkgs/tools/package-management/nix/default.nix4
-rw-r--r--pkgs/tools/security/mkpasswd/default.nix28
-rw-r--r--pkgs/tools/security/tor/default.nix9
-rw-r--r--pkgs/tools/system/idle3tools/default.nix22
-rw-r--r--pkgs/tools/system/rsyslog/default.nix22
-rw-r--r--pkgs/tools/system/smartmontools/default.nix4
-rw-r--r--pkgs/tools/text/recode/default.nix51
-rw-r--r--pkgs/tools/text/recode/recode-3.6-as-if.patch19
-rw-r--r--pkgs/tools/text/recode/recode-3.6-gettextfix.diff23
-rw-r--r--pkgs/top-level/all-packages.nix324
-rw-r--r--pkgs/top-level/haskell-defaults.nix18
-rw-r--r--pkgs/top-level/haskell-packages.nix51
-rw-r--r--pkgs/top-level/node-packages.nix265
-rw-r--r--pkgs/top-level/perl-packages.nix169
-rw-r--r--pkgs/top-level/python-packages.nix116
-rw-r--r--pkgs/top-level/release-python.nix3
-rw-r--r--pkgs/top-level/release-small.nix1
-rw-r--r--pkgs/top-level/release.nix33
388 files changed, 6749 insertions, 1998 deletions
diff --git a/pkgs/applications/audio/ardour/default.nix b/pkgs/applications/audio/ardour/default.nix
index 58ed4c61f4b..3ed650d4ae7 100644
--- a/pkgs/applications/audio/ardour/default.nix
+++ b/pkgs/applications/audio/ardour/default.nix
@@ -1,49 +1,42 @@
-{ stdenv, fetchsvn, scons, boost, pkgconfig, fftw, librdf_raptor
+{ stdenv, fetchurl, scons, boost, pkgconfig, fftw, librdf_raptor2
 , librdf_rasqal, jackaudio, flac, libsamplerate, alsaLib, libxml2
+, lilv, lv2, serd, sord, sratom, suil # these are probably optional
 , libxslt, libsndfile, libsigcxx, libusb, cairomm, glib, pango
-, gtk, glibmm, gtkmm, libgnomecanvas,  liblo, aubio
-, fftwSinglePrec, libmad, automake, autoconf, libtool, liblrdf }:
+, gtk, glibmm, gtkmm, libgnomecanvas, libgnomecanvasmm, liblo, aubio
+, fftwSinglePrec, libmad, automake, autoconf, libtool, liblrdf, curl }:
 
 stdenv.mkDerivation rec {
   name = "ardour-${version}";
-  version = "2.8.12";
+  version = "2.8.16";
 
-  # svn is the source to get official releases from their site?
-  # alternative: wget  --data-urlencode 'key=7c4b2e1df903aae5ff5cc4077cda801e' http://ardour.org/downloader
-  # but hash is changing ?
-
-  # TODO: see if this is also true when using a tag (~goibhniu)
-
-  # This version does not run it exits with the following error:
-  # raptor_new_uri_for_rdf_concept called with Raptor V1 world object
-  # raptor_general.c:240:raptor_init: fatal error: raptor_init() failedAborted
-  src = fetchsvn {
-    url = "http://subversion.ardour.org/svn/ardour2/tags/${version}";
-    sha256 = "0d4y8bv12kb0yd2srvxn5388sa4cl5d5rk381saj9f3jgpiciyky";
+  src = fetchurl {
+    url = "mirror://gentoo/distfiles/${name}.tar.bz2";
+    sha256 = "0h2y0x4yznalllja53anjil2gmgcb26f39zshc4gl1d1kc8k5vip";
   };
 
-  patchPhase = ''
-    sed -e "s#/usr/bin/which#type -P#" -i libs/glibmm2/autogen.sh
+  postPatch = ''
+    #sed -e "s#/usr/bin/which#type -P#" -i libs/glibmm2/autogen.sh
     echo '#include "ardour/svn_revision.h"' > libs/ardour/svn_revision.cc
     echo -e 'namespace ARDOUR {\n extern const char* svn_revision = "2.8.12";\n }\n' >> libs/ardour/svn_revision.cc
   '';
 
   buildInputs = [
-    scons boost pkgconfig fftw librdf_raptor librdf_rasqal jackaudio
+    scons boost pkgconfig fftw librdf_raptor2 librdf_rasqal jackaudio
     flac libsamplerate alsaLib libxml2 libxslt libsndfile libsigcxx
-    libusb cairomm glib pango gtk glibmm gtkmm libgnomecanvas liblrdf
-    liblo aubio fftwSinglePrec libmad autoconf automake libtool
+    #lilv lv2 serd sord sratom suil
+    libusb cairomm glib pango gtk glibmm gtkmm libgnomecanvas libgnomecanvasmm liblrdf
+    liblo aubio fftwSinglePrec libmad autoconf automake libtool curl
   ];
 
   buildPhase = ''
     mkdir -p $out
     export CXX=g++
-    scons PREFIX=$out install
+    scons PREFIX=$out SYSLIBS=1 install
   '';
-  
+
   installPhase = ":";
 
-  meta = { 
+  meta = {
     description = "Multi-track hard disk recording software";
     longDescription = ''
       Broken: use ardour3-svn instead
diff --git a/pkgs/applications/audio/caps/default.nix b/pkgs/applications/audio/caps/default.nix
new file mode 100644
index 00000000000..81fb77c1c9a
--- /dev/null
+++ b/pkgs/applications/audio/caps/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl }:
+stdenv.mkDerivation rec {
+  name = "caps-${version}";
+  version = "0.9.7";
+  src = fetchurl {
+    url = "http://www.quitte.de/dsp/caps_${version}.tar.bz2";
+    sha256 = "0ks98r3j404s9h88x50lj5lj4l64ijj29fz5i08iyq8jrb7r0zm0";
+  };
+  configurePhase = ''
+    echo "PREFIX = $out" > defines.make
+  '';
+
+  meta = {
+    description = "A selection of LADSPA plugins implementing classic effects";
+    longDescription = ''
+      The C* Audio Plugin Suite is a selection of classic effects,
+      unique filters and signal generators.  The digital guitarist
+      finds in CAPS a range of processors recreating key aspects of
+      the formation of tone in traditional electronic instrument
+      amplification.  Beyond sound quality, central design
+      considerations are latency-free realtime operation, modesty of
+      resource demands and meaningful control interfaces.
+    '';
+    homepage = http://www.quitte.de/dsp/caps.html;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.astsmtl ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/drumkv1/default.nix b/pkgs/applications/audio/drumkv1/default.nix
new file mode 100644
index 00000000000..7fdd04ce96b
--- /dev/null
+++ b/pkgs/applications/audio/drumkv1/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, jackaudio, libsndfile, lv2, qt4 }:
+
+stdenv.mkDerivation rec {
+  name = "drumkv1-${version}";
+  version = "0.3.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/drumkv1/${name}.tar.gz";
+    sha256 = "0bafg06iavri9dmg7hpz554kpqf1iv9crcdq46y4n4wyyxd7kajl";
+  };
+
+  buildInputs = [ jackaudio libsndfile lv2 qt4 ];
+
+  meta = with stdenv.lib; {
+    description = "An old-school drum-kit sampler synthesizer with stereo fx";
+    homepage = http://drumkv1.sourceforge.net/;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
\ No newline at end of file
diff --git a/pkgs/applications/audio/jack-oscrolloscope/default.nix b/pkgs/applications/audio/jack-oscrolloscope/default.nix
new file mode 100644
index 00000000000..dbceb0a336c
--- /dev/null
+++ b/pkgs/applications/audio/jack-oscrolloscope/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, SDL, jackaudio, mesa, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "jack_oscrolloscope-${version}";
+  version = "0.7";
+
+  src = fetchurl {
+    url = "http://das.nasophon.de/download/${name}.tar.gz";
+    sha256 = "1pl55in0sj7h5r06n1v91im7d18pplvhbjhjm1fdl39zwnyxiash";
+  };
+
+  buildInputs = [ SDL jackaudio mesa pkgconfig ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv jack_oscrolloscope $out/bin/
+  '';
+
+  meta = with stdenv.lib; { 
+    description = "A simple waveform viewer for JACK";
+    homepage = http://das.nasophon.de/jack_oscrolloscope;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/jack-rack/default.nix b/pkgs/applications/audio/jack-rack/default.nix
new file mode 100644
index 00000000000..1d1128e663d
--- /dev/null
+++ b/pkgs/applications/audio/jack-rack/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pkgconfig, jackaudio, ladspaH, gtk, alsaLib, libxml2, librdf }:
+stdenv.mkDerivation rec {
+  name = "jack-rack-1.4.7";
+  src = fetchurl {
+    url = "mirror://sourceforge/jack-rack/${name}.tar.bz2";
+    sha256 = "1lmibx9gicagcpcisacj6qhq6i08lkl5x8szysjqvbgpxl9qg045";
+  };
+  buildInputs = [ pkgconfig jackaudio ladspaH gtk alsaLib libxml2 librdf ];
+
+  meta = {
+    description = ''An effects "rack" for the JACK low latency audio API'';
+    longDescription = ''
+      JACK Rack is an effects "rack" for the JACK low latency audio
+      API. The rack can be filled with LADSPA effects plugins and can
+      be controlled using the ALSA sequencer. It's phat; it turns your
+      computer into an effects box.
+    '';
+    homepage = http://jack-rack.sourceforge.net/;
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.astsmtl ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/jalv/default.nix b/pkgs/applications/audio/jalv/default.nix
new file mode 100644
index 00000000000..5655c7d832b
--- /dev/null
+++ b/pkgs/applications/audio/jalv/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, gtk, jackaudio, lilv, lv2, pkgconfig, python
+, serd, sord , sratom, suil }:
+
+stdenv.mkDerivation  rec {
+  name = "jalv-${version}";
+  version = "1.4.0";
+
+  src = fetchurl {
+    url = "http://download.drobilla.net/${name}.tar.bz2";
+    sha256 = "1hq968fhiz86428krqhjl3vlw71bigc9bsfcv97zgvsjh0fh6qa0";
+  };
+
+  buildInputs = [
+    gtk jackaudio lilv lv2 pkgconfig python serd sord sratom suil
+  ];
+
+  configurePhase = "python waf configure --prefix=$out";
+
+  buildPhase = "python waf";
+
+  installPhase = "python waf install";
+
+  meta = with stdenv.lib; {
+    description = "A simple but fully featured LV2 host for Jack";
+    homepage = http://drobilla.net/software/jalv;
+    license = licenses.isc;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/default.nix b/pkgs/applications/audio/mopidy/default.nix
new file mode 100644
index 00000000000..d285c4b0e23
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchgit, pythonPackages, pygobject, gst_python
+, gst_plugins_good, gst_plugins_base
+}:
+
+pythonPackages.buildPythonPackage rec {
+  name = "mopidy-${version}";
+
+  version = "0.11.1";
+
+  src = fetchgit {
+    url = "https://github.com/mopidy/mopidy.git";
+    rev = "refs/tags/v${version}";
+    sha256 = "123p9hsnlgwvrw4vzlxjf5f43rqzqa3ynbqha8pyi6r0q3ln7qjn";
+  };
+
+  propagatedBuildInputs = with pythonPackages; [
+   gst_python pygobject pykka pyspotify pylast cherrypy ws4py
+  ];
+
+  # python zip complains about old timestamps
+  preConfigure = ''
+    find -print0 | xargs -0 touch
+  '';
+
+  # There are no tests
+  doCheck = false;
+
+  postInstall = ''
+    for p in $out/bin/mopidy $out/bin/mopidy-scan; do
+      wrapProgram $p \
+        --prefix GST_PLUGIN_PATH : ${gst_plugins_good}/lib/gstreamer-0.10 \
+        --prefix GST_PLUGIN_PATH : ${gst_plugins_base}/lib/gstreamer-0.10
+    done
+  '';
+
+  meta = {
+    homepage = http://www.mopidy.com/;
+    description = ''
+      A music server which can play music from Spotify and from your
+      local hard drive.
+    '';
+    maintainers = [ stdenv.lib.maintainers.rickynils ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/git.nix b/pkgs/applications/audio/mopidy/git.nix
new file mode 100644
index 00000000000..2b5e1627ac6
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/git.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchgit, pythonPackages, pygobject, gst_python
+, gst_plugins_good, gst_plugins_base
+}:
+
+pythonPackages.buildPythonPackage rec {
+  name = "mopidy-${version}";
+
+  version = "git-20130226";
+
+  src = fetchgit {
+    url = "https://github.com/mopidy/mopidy.git";
+    rev = "86a7c2d7519680c6b9130795d35c4654958f4c04";
+    sha256 = "00fxcfkpl19nslv4f4bspzw0kvjjp6hhcwag7rknmb8scfinqfac";
+  };
+
+  propagatedBuildInputs = with pythonPackages; [
+   gst_python pygobject pykka pyspotify pylast cherrypy ws4py
+  ];
+
+  # python zip complains about old timestamps
+  preConfigure = ''
+    find -print0 | xargs -0 touch
+  '';
+
+  # There are no tests
+  doCheck = false;
+
+  postInstall = ''
+    for p in $out/bin/mopidy $out/bin/mopidy-scan; do
+      wrapProgram $p \
+        --prefix GST_PLUGIN_PATH : ${gst_plugins_good}/lib/gstreamer-0.10 \
+        --prefix GST_PLUGIN_PATH : ${gst_plugins_base}/lib/gstreamer-0.10
+    done
+  '';
+
+  meta = {
+    homepage = http://www.mopidy.com/;
+    description = ''
+      A music server which can play music from Spotify and from your
+      local hard drive.
+    '';
+    maintainers = [ stdenv.lib.maintainers.rickynils ];
+  };
+}
diff --git a/pkgs/applications/audio/samplv1/default.nix b/pkgs/applications/audio/samplv1/default.nix
new file mode 100644
index 00000000000..584b23b6a01
--- /dev/null
+++ b/pkgs/applications/audio/samplv1/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, jackaudio, libsndfile, lv2, qt4 }:
+
+stdenv.mkDerivation rec {
+  name = "samplv1-${version}";
+  version = "0.3.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/samplv1/${name}.tar.gz";
+    sha256 = "1j6q3ywbdsyhskc60p7k8ph058ylrrmjmri3q1wr2d2akcaqvb7m";
+  };
+
+  buildInputs = [ jackaudio libsndfile lv2 qt4 ];
+
+  meta = with stdenv.lib; {
+    description = "An old-school all-digital polyphonic sampler synthesizer with stereo fx";
+    homepage = http://samplv1.sourceforge.net/;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
\ No newline at end of file
diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix
index a5c7918e4b6..110d222c238 100644
--- a/pkgs/applications/audio/spotify/default.nix
+++ b/pkgs/applications/audio/spotify/default.nix
@@ -1,52 +1,79 @@
-{ fetchurl, stdenv, dpkg, xlibs, qt4, alsaLib, makeWrapper, openssl }:
+{ fetchurl, stdenv, dpkg, xlibs, qt4, alsaLib, makeWrapper, openssl, freetype, glib, pango, cairo, atk, gdk_pixbuf, gtk, cups, nspr, nss, libpng12, GConf, libgcrypt, chromium, sqlite, gst_plugins_base, gstreamer }:
 
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
 
-let version = "0.8.3.278"; in
+let 
+  version = "0.8.8.323"; 
+  qt4webkit = 
+    if stdenv.system == "i686-linux" then
+      fetchurl {
+        name = "libqtwebkit4_2.2_i386.deb";
+        url = http://mirrors.us.kernel.org/ubuntu/pool/main/q/qtwebkit-source/libqtwebkit4_2.2~2011week36-0ubuntu1_i386.deb;
+        sha256 = "0hi6cwx2b2cwa4nv5phqqw526lc8p9x7kjkcza9x47ny3npw2924";
+      }
+    else 
+      fetchurl {
+        name = "libqtwebkit4_2.2_amd64.deb";
+        url = http://ie.archive.ubuntu.com/ubuntu/pool/main/q/qtwebkit-source/libqtwebkit4_2.2~2011week36-0ubuntu1_amd64.deb;
+        sha256 = "0bvy6qz9y19ck391z8c049v07y4vdyvgykpxi7x1nvn078p1imiw";
+      };
+in
 
 stdenv.mkDerivation {
   name = "spotify-${version}";
 
   src =
-    if stdenv.system == "i686-linux" then 
+    if stdenv.system == "i686-linux" then
       fetchurl {
-        url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.g21c7566.632-1_i386.deb";
-        sha256 = "7f587585365498c5182bd7f3beafaf511d883102f5cece66cf84f4f94077765b";
+        url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.gd143501.250-1_i386.deb";
+        sha256 = "13q803qlvq16yrr7f95izp9mqqdb8kpcsyrb5gc5i2pya68ra906";
       }
-    else if stdenv.system == "x86_64-linux" then 
+    else if stdenv.system == "x86_64-linux" then
       fetchurl {
-        url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.g21c7566.632-1_amd64.deb";
-        sha256 = "a37a13b1c1a8088a811054c732d85b9d6ccf0bd92ad4da75bfee6d70dc344b5e";
+        url = "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}.gd143501.250-1_amd64.deb";
+        sha256 = "0ny3z499wks1dhrd3qq4d6cp0zd33198z9vak8ffgm5x24sdpghf";
       }
     else throw "Spotify not supported on this platform.";
 
   buildInputs = [ dpkg makeWrapper ];
 
   unpackPhase = "true";
-  
+
   installPhase =
     ''
       mkdir -p $out
       dpkg-deb -x $src $out
-      mv $out/usr/* $out/
-      rmdir $out/usr
+      mv $out/opt/spotify/* $out/
+      rm -rf $out/usr $out/opt
 
       # Work around Spotify referring to a specific minor version of
       # OpenSSL.
       mkdir $out/lib
       ln -s ${openssl}/lib/libssl.so $out/lib/libssl.so.0.9.8
       ln -s ${openssl}/lib/libcrypto.so $out/lib/libcrypto.so.0.9.8
+      ln -s ${nss}/lib/libnss3.so $out/lib/libnss3.so.1d
+      ln -s ${nss}/lib/libnssutil3.so $out/lib/libnssutil3.so.1d
+      ln -s ${nss}/lib/libsmime3.so $out/lib/libsmime3.so.1d
+      ln -s ${nspr}/lib/libnspr4.so $out/lib/libnspr4.so.0d
+      ln -s ${nspr}/lib/libplc4.so $out/lib/libplc4.so.0d
+
+      mkdir -p $out/bin
 
+      ln -s $out/spotify-client/spotify $out/bin/spotify
       patchelf \
         --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-        --set-rpath ${stdenv.lib.makeLibraryPath [ xlibs.libXScrnSaver xlibs.libX11 qt4 alsaLib openssl stdenv.gcc.gcc ]}:${stdenv.gcc.gcc}/lib64:$out/lib \
-        $out/bin/spotify
+        --set-rpath $out/lib:$out/spotify-client:${stdenv.lib.makeLibraryPath [ xlibs.libXScrnSaver xlibs.libX11 qt4 alsaLib stdenv.gcc.gcc freetype glib pango cairo atk gdk_pixbuf gtk GConf cups sqlite]}:${stdenv.gcc.gcc}/lib64 \
+        $out/spotify-client/spotify
+
+      dpkg-deb -x ${qt4webkit} ./
+      mkdir -p $out/lib/
+      cp -v usr/lib/*/* $out/lib/
 
       preload=$out/libexec/spotify/libpreload.so
       mkdir -p $out/libexec/spotify
       gcc -shared ${./preload.c} -o $preload -ldl -DOUT=\"$out\" -fPIC
 
-      wrapProgram $out/bin/spotify --set LD_PRELOAD $preload
+      wrapProgram $out/bin/spotify --set LD_PRELOAD $preload --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ GConf libpng12 cups libgcrypt sqlite gst_plugins_base gstreamer]}:$out/lib"
     ''; # */
 
   dontStrip = true;
diff --git a/pkgs/applications/audio/synthv1/default.nix b/pkgs/applications/audio/synthv1/default.nix
new file mode 100644
index 00000000000..aadce32dda4
--- /dev/null
+++ b/pkgs/applications/audio/synthv1/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, qt4, jackaudio, lv2 }:
+
+stdenv.mkDerivation rec {
+  name = "synthv1-${version}";
+  version = "0.3.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/synthv1/${name}.tar.gz";
+    sha256 = "1230yf49qfw540yvp5n7sh6mf3k8590pzwc5mragd3nd6k6apgw9";
+  };
+
+  buildInputs = [ qt4 jackaudio lv2 ];
+
+  meta = with stdenv.lib; {
+    description = "An old-school 4-oscillator subtractive polyphonic synthesizer with stereo fx";
+    homepage = http://synthv1.sourceforge.net/;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
\ No newline at end of file
diff --git a/pkgs/applications/editors/emacs-24/builder.sh b/pkgs/applications/editors/emacs-24/builder.sh
index d04e7a4fdd3..c472d2b1a64 100644
--- a/pkgs/applications/editors/emacs-24/builder.sh
+++ b/pkgs/applications/editors/emacs-24/builder.sh
@@ -29,6 +29,4 @@ preConfigure() {
     done
 }
 
-preBuild="make bootstrap"
-
 genericBuild
diff --git a/pkgs/applications/editors/emacs-24/default.nix b/pkgs/applications/editors/emacs-24/default.nix
index 82238a55d1c..a781cb37346 100644
--- a/pkgs/applications/editors/emacs-24/default.nix
+++ b/pkgs/applications/editors/emacs-24/default.nix
@@ -9,13 +9,13 @@ assert (libXft != null) -> libpng != null;	# probably a bug
 assert stdenv.isDarwin -> libXaw != null;	# fails to link otherwise
 
 stdenv.mkDerivation rec {
-  name = "emacs-24.2";
+  name = "emacs-24.3";
 
   builder = ./builder.sh;
 
   src = fetchurl {
-    url = "mirror://gnu/emacs/${name}.tar.bz2";
-    sha256 = "13wbjfjmz13qpjwssy44nw2230lllmkkgjsy0rqfm6am2cf87n3k";
+    url = "mirror://gnu/emacs/${name}.tar.xz";
+    sha256 = "1385qzs3bsa52s5rcncbrkxlydkw0ajzrvfxgv8rws5fx512kakh";
   };
 
   buildInputs =
diff --git a/pkgs/applications/graphics/mypaint/default.nix b/pkgs/applications/graphics/mypaint/default.nix
new file mode 100644
index 00000000000..a59498b8f14
--- /dev/null
+++ b/pkgs/applications/graphics/mypaint/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, gettext, glib, gtk, json_c, lcms2, libpng
+, makeWrapper, pkgconfig, pygtk, python, pythonPackages, scons, swig
+}:
+
+stdenv.mkDerivation rec {
+  name = "mypaint-${version}";
+  version = "1.1.0";
+
+  src = fetchurl {
+    url = "http://download.gna.org/mypaint/${name}.tar.bz2";
+    sha256 = "0f7848hr65h909c0jkcx616flc0r4qh53g3kd1cgs2nr1pjmf3bq";
+  };
+
+  buildInputs = [ 
+    gettext glib gtk json_c lcms2 libpng makeWrapper pkgconfig pygtk
+    python scons swig
+  ];
+ 
+  propagatedBuildInputs = [ pythonPackages.numpy ];
+
+  buildPhase = "scons prefix=$out";
+
+  installPhase = ''
+    scons prefix=$out install
+    wrapProgram $out/bin/mypaint --prefix PYTHONPATH : $PYTHONPATH
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A graphics application for digital painters";
+    homepage = http://mypaint.intilinux.com;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/pkgs/applications/graphics/panotools/default.nix b/pkgs/applications/graphics/panotools/default.nix
index e71537f108a..17e1b2e8b14 100644
--- a/pkgs/applications/graphics/panotools/default.nix
+++ b/pkgs/applications/graphics/panotools/default.nix
@@ -10,7 +10,8 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ perl libjpeg libpng libtiff ];
 
-  doCheck = true;
+  # one of the tests succeeds on my machine but fails on Hydra (no idea why)
+  #doCheck = true;
 
   meta = {
     homepage = http://panotools.sourceforge.net/;
diff --git a/pkgs/applications/misc/mysql-workbench/default.nix b/pkgs/applications/misc/mysql-workbench/default.nix
index 6bbc287e6ee..c2f80570673 100644
--- a/pkgs/applications/misc/mysql-workbench/default.nix
+++ b/pkgs/applications/misc/mysql-workbench/default.nix
@@ -1,30 +1,35 @@
-{ stdenv, fetchurl, makeWrapper, boost, file, gettext
+{ stdenv, fetchurl, makeWrapper, autoconf, automake, boost, file, gettext
 , glib, glibc, libgnome_keyring, gnome_keyring, gtk, gtkmm, intltool
 , libctemplate, libglade
+, libiodbc
 , libgnome, libsigcxx, libtool, libuuid, libxml2, libzip, lua, mesa, mysql
 , pango, paramiko, pcre, pexpect, pkgconfig, pycrypto, python, sqlite
 }:
 
 stdenv.mkDerivation rec {
   pname = "mysql-workbench";
-  version = "5.2.39";
+  version = "5.2.47";
   name = "${pname}-${version}";
 
   src = fetchurl {
-    url = "http://mirror.services.wisc.edu/mysql/Downloads/MySQLGUITools/mysql-workbench-gpl-${version}-src.tar.gz";
-    sha256 = "0e4e14f1b39dca2b65f924381d82b406dc25a530fbd25631b4cd05bddc4ab5bd";
+    url = "http://mirror.cogentco.com/pub/mysql/MySQLGUITools/mysql-workbench-gpl-${version}-src.tar.gz";
+    sha256 = "1343fn3msdxqfpxw0kgm0mdx5r7g9ra1cpc8p2xhl7kz2pmqp4p6";
   };
 
-  buildInputs = [ boost file gettext glib glibc libgnome_keyring gtk gtkmm intltool
-    libctemplate libglade libgnome libsigcxx libtool libuuid libxml2 libzip lua makeWrapper mesa
+  buildInputs = [ autoconf automake boost file gettext glib glibc libgnome_keyring gtk gtkmm intltool
+    libctemplate libglade libgnome libiodbc libsigcxx libtool libuuid libxml2 libzip lua makeWrapper mesa
     mysql paramiko pcre pexpect pkgconfig pycrypto python sqlite ];
 
   preConfigure = ''
     substituteInPlace $(pwd)/frontend/linux/workbench/mysql-workbench.in --replace "catchsegv" "${glibc}/bin/catchsegv"
   '';
 
+  postConfigure = ''
+    autoreconf -fi
+  '';
+
   postInstall = ''
-    wrapProgram "$out/bin/mysql-workbench-bin" \
+    wrapProgram "$out/bin/mysql-workbench" \
       --prefix LD_LIBRARY_PATH : "${python}/lib" \
       --prefix LD_LIBRARY_PATH : "$(cat ${stdenv.gcc}/nix-support/orig-gcc)/lib64" \
       --prefix PATH : "${gnome_keyring}/bin" \
diff --git a/pkgs/applications/misc/surf/default.nix b/pkgs/applications/misc/surf/default.nix
index 61d2e6a65bd..d6083da5ce4 100644
--- a/pkgs/applications/misc/surf/default.nix
+++ b/pkgs/applications/misc/surf/default.nix
@@ -1,15 +1,15 @@
-{stdenv, fetchurl, gtk, webkit, pkgconfig, glib, libsoup, patches ? null}:
+{stdenv, fetchurl, makeWrapper, gtk, webkit, pkgconfig, glib, glib_networking, libsoup, gsettings_desktop_schemas, patches ? null}:
 
 stdenv.mkDerivation rec {
   name = "surf-${version}";
-  version="0.5";
+  version="0.6";
 
   src = fetchurl {
     url = "http://dl.suckless.org/surf/surf-${version}.tar.gz";
-    sha256 = "19qfkwdk6p5hcwnnplscp1kmypz74mga7x6iqy6w3g18s221f2mx";
+    sha256 = "01b8hq8z2wd7ssym5bypx2b15mrs1lhgkrcgxf700kswxvxcrhgx";
   };
 
-  buildInputs = [ gtk webkit pkgconfig glib libsoup ];
+  buildInputs = [ gtk makeWrapper webkit pkgconfig glib libsoup ];
 
   # Allow users set their own list of patches
   inherit patches;
@@ -19,8 +19,14 @@ stdenv.mkDerivation rec {
 # `-lX11' to make sure libX11's store path is in the RPATH
   NIX_LDFLAGS = "-lX11";
   preConfigure = [ ''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk'' ];
+  installPhase = ''
+    make PREFIX=/ DESTDIR=$out install
+    wrapProgram "$out/bin/surf" \
+      --prefix GIO_EXTRA_MODULES : ${glib_networking}/lib/gio/modules \
+      --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share"
+  '';
 
-  meta = { 
+  meta = {
       description = "surf is a simple web browser based on WebKit/GTK+. It is able to display websites and follow links. It supports the XEmbed protocol which makes it possible to embed it in another application. Furthermore, one can point surf to another URI by setting its XProperties.";
       homepage = http://surf.suckless.org;
       license = "MIT";
diff --git a/pkgs/applications/misc/xmobar/add-freeration-variable.patch b/pkgs/applications/misc/xmobar/add-freeration-variable.patch
new file mode 100644
index 00000000000..a8c10e1a30d
--- /dev/null
+++ b/pkgs/applications/misc/xmobar/add-freeration-variable.patch
@@ -0,0 +1,58 @@
+diff --git a/readme.md b/readme.md
+index f4f07e8..de679c7 100644
+--- a/readme.md
++++ b/readme.md
+@@ -645,7 +645,7 @@ something like:
+ - Args: default monitor arguments
+ - Variables that can be used with the `-t`/`--template` argument:
+              `total`, `free`, `buffer`, `cache`, `rest`, `used`,
+-             `usedratio`, `usedbar`, `freebar`
++             `usedratio`, `usedbar`, `freeratio`, `freebar`
+ - Default template: `Mem: <usedratio>% (<cache>M)`
+ 
+ ### `Swap Args RefreshRate`
+diff --git a/src/Plugins/Monitors/Mem.hs b/src/Plugins/Monitors/Mem.hs
+index 5c55ee2..3cf46c7 100644
+--- a/src/Plugins/Monitors/Mem.hs
++++ b/src/Plugins/Monitors/Mem.hs
+@@ -19,8 +19,8 @@ import Plugins.Monitors.Common
+ memConfig :: IO MConfig
+ memConfig = mkMConfig
+        "Mem: <usedratio>% (<cache>M)" -- template
+-       ["usedbar", "freebar", "usedratio", "total",
+-        "free", "buffer", "cache", "rest", "used"]  -- available replacements
++       ["usedbar", "freebar", "usedratio", "freeratio", "total",
++        "free", "buffer", "cache", "rest", "used"] -- available replacements
+ 
+ fileMEM :: IO String
+ fileMEM = readFile "/proc/meminfo"
+@@ -33,7 +33,8 @@ parseMEM =
+            rest = free + buffer + cache
+            used = total - rest
+            usedratio = used / total
+-       return [usedratio, total, free, buffer, cache, rest, used]
++           freeratio = free / total
++       return [usedratio, freeratio, total, free, buffer, cache, rest, used, freeratio]
+ 
+ totalMem :: IO Float
+ totalMem = fmap ((*1024) . (!!1)) parseMEM
+@@ -42,15 +43,16 @@ usedMem :: IO Float
+ usedMem = fmap ((*1024) . (!!6)) parseMEM
+ 
+ formatMem :: [Float] -> Monitor [String]
+-formatMem (r:xs) =
++formatMem (r:fr:xs) =
+     do let f = showDigits 0
+            rr = 100 * r
+        ub <- showPercentBar rr r
+        fb <- showPercentBar (100 - rr) (1 - r)
+        rs <- showPercentWithColors r
++       fs <- showPercentWithColors fr
+        s <- mapM (showWithColors f) xs
+-       return (ub:fb:rs:s)
+-formatMem _ = return $ replicate 9 "N/A"
++       return (ub:fb:rs:fs:s)
++formatMem _ = return $ replicate 10 "N/A"
+ 
+ runMem :: [String] -> Monitor String
+ runMem _ =
diff --git a/pkgs/applications/misc/xmobar/default.nix b/pkgs/applications/misc/xmobar/default.nix
index 0ef9acbcef4..c9d3183e793 100644
--- a/pkgs/applications/misc/xmobar/default.nix
+++ b/pkgs/applications/misc/xmobar/default.nix
@@ -13,6 +13,7 @@ cabal.mkDerivation (self: {
   ];
   extraLibraries = [ libXrandr wirelesstools ];
   configureFlags = "-fwith_xft -fwith_iwlib";
+  patches = [ ./add-freeration-variable.patch ];
   meta = {
     homepage = "http://projects.haskell.org/xmobar/";
     description = "A Minimalistic Text Based Status Bar";
diff --git a/pkgs/applications/misc/zathura/builder.sh b/pkgs/applications/misc/zathura/builder.sh
index 9ca45b2cc99..149481367b4 100644
--- a/pkgs/applications/misc/zathura/builder.sh
+++ b/pkgs/applications/misc/zathura/builder.sh
@@ -1,11 +1,21 @@
 source $stdenv/setup
 
 mkdir -pv $out/bin/
+mkdir -pv $out/share/
+mkdir -pv $out/share/applications/
+mkdir -pv $out/share/pixmaps/
 
 cat > $out/bin/zathura <<EOF
 #!/bin/sh
-exec $zathura --plugins-dir=$plugins_path "\$@"
+exec $zathura_core/bin/zathura --plugins-dir=$plugins_path "\$@"
 EOF
 
+cp -rv $zathura_core/share/man $out/share
+cp -rv $zathura_core/share/locale $out/share
+cp -rv $icon $out/share/pixmaps/pwmt.xpm
+
+cat $zathura_core/share/applications/zathura.desktop > $out/share/applications/zathura.desktop
+echo "Icon=pwmt" >> $out/share/applications/zathura.desktop
+
 chmod 755 $out/bin/zathura
 
diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix
index f56becf4512..a3726fd460d 100644
--- a/pkgs/applications/misc/zathura/core/default.nix
+++ b/pkgs/applications/misc/zathura/core/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, gtk, girara, gettext }:
+{ stdenv, fetchurl, pkgconfig, gtk, girara, gettext, docutils }:
 
 stdenv.mkDerivation rec {
 
@@ -13,7 +13,14 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ pkgconfig gtk girara gettext ];
 
-  makeFlags = "PREFIX=$(out)";
+  # Bug in zathura build system: we should remove empty manfiles in order them
+  # to be compiled properly
+  preBuild = ''
+    rm zathura.1
+    rm zathurarc.5
+  '';
+
+  makeFlags = [ "PREFIX=$(out)" "RSTTOMAN=${docutils}/bin/rst2man.py" "VERBOSE=1" ];
 
   meta = {
     homepage = http://pwmt.org/projects/zathura/;
diff --git a/pkgs/applications/misc/zathura/default.nix b/pkgs/applications/misc/zathura/default.nix
index b5e0092975c..8bdc7865832 100644
--- a/pkgs/applications/misc/zathura/default.nix
+++ b/pkgs/applications/misc/zathura/default.nix
@@ -1,4 +1,4 @@
-{ callPackage, pkgs }:
+{ callPackage, pkgs, fetchurl }:
 
 rec {
   inherit (pkgs) stdenv;
@@ -11,7 +11,9 @@ rec {
 
   zathura_ps = callPackage ./ps { };
 
-  zathuraWrapper = stdenv.mkDerivation rec {
+  zathuraWrapper = stdenv.mkDerivation {
+
+    inherit zathura_core;
 
     name = "zathura-${zathura_core.version}";
 
@@ -21,7 +23,7 @@ rec {
       zathura_ps
     ];
 
-    zathura = "${zathura_core}/bin/zathura";
+    icon = ./icon.xpm;
 
     builder = ./builder.sh;
 
@@ -36,7 +38,7 @@ rec {
       '';
       license = stdenv.lib.licenses.zlib;
       platforms = stdenv.lib.platforms.linux;
-      maintainers = [ stdenv.lib.maintainers.garbas ];
+      maintainers = [ stdenv.lib.maintainers.garbas stdenv.lib.maintainers.smironov ];
     };
   };
 }
diff --git a/pkgs/applications/misc/zathura/icon.xpm b/pkgs/applications/misc/zathura/icon.xpm
new file mode 100644
index 00000000000..a863c5ddb09
--- /dev/null
+++ b/pkgs/applications/misc/zathura/icon.xpm
@@ -0,0 +1,120 @@
+/* XPM */
+static char *freeimage[] = {
+/* width height num_colors chars_per_pixel */
+"16 16 96 2",
+/* colors */
+"   c #1e1e1e",
+" . c #222222",
+" X c #212121",
+" o c #535353",
+" O c #a4a4a4",
+" + c #202020",
+" @ c #252525",
+" # c #3c3c3c",
+" $ c #292929",
+" % c #979797",
+" & c #cccccc",
+" * c #303030",
+" = c #1f1f1f",
+" - c #494949",
+" ; c #dddddd",
+" : c #696969",
+" > c #232323",
+" , c #262626",
+" < c #adadad",
+" 1 c #bbbbbb",
+" 2 c #1d1d1d",
+" 3 c #1c1c1c",
+" 4 c #5e5e5e",
+" 5 c #e8e8e8",
+" 6 c #9c9c9c",
+" 7 c #242424",
+" 8 c #b1b1b1",
+" 9 c #b3b3b3",
+" 0 c #090909",
+" q c #161616",
+" w c #131313",
+" e c #4d4d4d",
+" r c #dedede",
+" t c #afafaf",
+" y c #282828",
+" u c #393939",
+" i c #c4c4c4",
+" p c #dcdcdc",
+" a c #9a9a9a",
+" s c #a2a2a2",
+" d c #ababab",
+" f c #313131",
+" g c #a7a7a7",
+" h c #e4e4e4",
+" j c #f2f2f2",
+" k c #eaeaea",
+" l c #e2e2e2",
+" z c #f0f0f0",
+" x c #d5d5d5",
+" c c #737373",
+" v c #323232",
+" b c #808080",
+" n c #7a7a7a",
+" m c #d3d3d3",
+" M c #e5e5e5",
+" N c #8a8a8a",
+" B c #cbcbcb",
+" V c #b5b5b5",
+" C c #b9b9b9",
+" Z c #272727",
+" A c #b4b4b4",
+" S c #bababa",
+" D c #2d2d2d",
+" F c #414141",
+" G c #444444",
+" H c #f4f4f4",
+" J c #838383",
+" K c #cfcfcf",
+" L c #fafafa",
+" P c #efefef",
+" I c #e3e3e3",
+" U c #8d8d8d",
+" Y c #656565",
+" T c #ffffff",
+" R c #fbfbfb",
+" E c #e9e9e9",
+" W c #bdbdbd",
+" Q c #e1e1e1",
+" ! c #dfdfdf",
+" ~ c #646464",
+" ^ c #3a3a3a",
+" / c #a1a1a1",
+" ( c #999999",
+" ) c #c0c0c0",
+" _ c #3b3b3b",
+" ` c #acacac",
+" ' c #050505",
+" ] c #151515",
+" [ c #1b1b1b",
+" { c #1a1a1a",
+" } c #b2b2b2",
+" | c #a5a5a5",
+".  c #c5c5c5",
+".. c #a6a6a6",
+".X c #bfbfbf",
+".o c #747474",
+/* pixels */
+"                                ",
+"   . . . X X X X . o O + X . .  ",
+"   . . X @ # $ . @ % & * = . .  ",
+"   . .   - ; : > , < 1 2 X . .  ",
+"   . . 3 4 5 6 7 7 8 9 0 q q 3  ",
+"   . + w e r t y u i p a s d 4  ",
+"   X f g h j k p l z z x g c v  ",
+"   X f b n m M N c B V 3 , > X  ",
+"   X X   w V C $ Z A S + $ , .  ",
+"   D F G u S H 1 J K L P I U @  ",
+"   Y T T T R E & W Q ! d g ~ 7  ",
+"   ^ / 6 ( ; ) _ 2 ` 8 ' ] [ X  ",
+"   + > 7 { A } 7 @ |.  $ + . .  ",
+"   X X X ].. 8 Z 7 n.X + X . .  ",
+"   . . . { n.o 7 . @ y X X . .  ",
+"                                "
+};
+
diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index 4f12b0d2f50..019ba1792f3 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -13,13 +13,11 @@
 , gcc, bison, gperf
 , glib, gtk, dbus_glib
 , libXScrnSaver, libXcursor, mesa
+, protobuf
 
-# dependencies for v25
+# dependencies for v25 only
 , libvpx
 
-# dependencies for >= v25
-, protobuf
-
 # dependencies for >= v26
 , speechd, libXdamage
 
@@ -59,7 +57,7 @@ let
     use_system_libexpat = true;
     use_system_libexif = true;
     use_system_libjpeg = true;
-    use_system_libpng = !post24;
+    use_system_libpng = false; # PNG dlopen() version conflict
     use_system_libusb = true;
     use_system_libxml = true;
     use_system_speex = true;
@@ -76,7 +74,7 @@ let
     use_system_skia = false;
     use_system_sqlite = false; # http://crbug.com/22208
     use_system_v8 = false;
-  } // optionalAttrs (post24 && !post25) {
+  } // optionalAttrs pre26 {
     use_system_libvpx = true;
     use_system_protobuf = true;
   };
@@ -89,14 +87,8 @@ let
     libusb1 libexif
   ];
 
-  post23 = !versionOlder sourceInfo.version "24.0.0.0";
-  post24 = !versionOlder sourceInfo.version "25.0.0.0";
-  post25 = !versionOlder sourceInfo.version "26.0.0.0";
-  only24 = post23 && !post24;
-  only25 = post24 && !post25;
-
-  maybeFixPulseAudioBuild = optional (only24 && pulseSupport)
-    ./pulse_audio_fix.patch;
+  pre26 = versionOlder sourceInfo.version "26.0.0.0";
+  post25 = !pre26;
 
 in stdenv.mkDerivation rec {
   name = "${packageName}-${version}";
@@ -119,13 +111,13 @@ in stdenv.mkDerivation rec {
     krb5
     glib gtk dbus_glib
     libXScrnSaver libXcursor mesa
+    pciutils protobuf
   ] ++ optional gnomeKeyringSupport libgnome_keyring
     ++ optionals gnomeSupport [ gconf libgcrypt ]
     ++ optional enableSELinux libselinux
     ++ optional cupsSupport libgcrypt
     ++ optional pulseSupport pulseaudio
-    ++ optionals post24 [ pciutils protobuf ]
-    ++ optional only25 libvpx
+    ++ optional pre26 libvpx
     ++ optionals post25 [ speechd libXdamage ];
 
   opensslPatches = optional useOpenSSL openssl.patches;
@@ -134,14 +126,13 @@ in stdenv.mkDerivation rec {
 
   patches = optional cupsSupport ./cups_allow_deprecated.patch
          ++ optional pulseSupport ./pulseaudio_array_bounds.patch
-         ++ maybeFixPulseAudioBuild
          ++ optional post25 ./clone_detached.patch
          ++ [ ./glibc-2.16-use-siginfo_t.patch ];
 
-  postPatch = optionalString useOpenSSL ''
+  postPatch = ''
+    sed -i -r -e 's/-f(stack-protector)(-all)?/-fno-\1/' build/common.gypi
+  '' + optionalString useOpenSSL ''
     cat $opensslPatches | patch -p1 -d third_party/openssl/openssl
-  '' + optionalString post24 ''
-    sed -i -r -e "s/-f(stack-protector)(-all)?/-fno-\1/" build/common.gypi
   '' + optionalString post25 ''
     sed -i -e 's|/usr/bin/gcc|gcc|' \
       third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp
@@ -224,6 +215,4 @@ in stdenv.mkDerivation rec {
     license = licenses.bsd3;
     platforms = platforms.linux;
   };
-} // optionalAttrs only25 {
-  NIX_CFLAGS_COMPILE = "-fno-stack-protector";
 }
diff --git a/pkgs/applications/networking/browsers/chromium/pulse_audio_fix.patch b/pkgs/applications/networking/browsers/chromium/pulse_audio_fix.patch
deleted file mode 100644
index 01ff89a9a63..00000000000
--- a/pkgs/applications/networking/browsers/chromium/pulse_audio_fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- chromium-build/media/audio/pulse/pulse_output.cc.orig	2012-10-26 09:44:38.509209905 -0700
-+++ chromium-build/media/audio/pulse/pulse_output.cc	2012-10-26 09:45:32.178819603 -0700
-@@ -86,7 +86,7 @@
- 
-   // All channel maps have the same size array of channel positions.
-   for (unsigned int channel = 0; channel != CHANNELS_MAX; ++channel) {
--    int channel_position = kChannelOrderings[channel_layout][channel];
-+    int channel_position = ChannelOrder(channel_layout, static_cast<Channels>(channel));
-     if (channel_position > -1) {
-       channel_map.map[channel_position] = ChromiumToPAChannelPosition(
-           static_cast<Channels>(channel));
diff --git a/pkgs/applications/networking/browsers/chromium/sources.nix b/pkgs/applications/networking/browsers/chromium/sources.nix
index da3de4c968d..a14b10fcfde 100644
--- a/pkgs/applications/networking/browsers/chromium/sources.nix
+++ b/pkgs/applications/networking/browsers/chromium/sources.nix
@@ -1,18 +1,18 @@
 # This file is autogenerated from update.sh in the same directory.
 {
   dev = {
-    version = "26.0.1410.10";
-    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-26.0.1410.10.tar.xz";
-    sha256 = "1s5c69j0g2nanapvq3fmkc5iv7s53x2q5d8fxgdzd7c5c8pzlbby";
+    version = "26.0.1410.28";
+    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-26.0.1410.28.tar.xz";
+    sha256 = "1g32xyh06xsqkli0g83flqr1qvx2yxb7vaqshf9wcyqgkyzvy7il";
   };
   beta = {
-    version = "25.0.1364.84";
-    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-25.0.1364.84.tar.bz2";
-    sha256 = "1p5k7vpk4v2m5yhhdkplq4iq4mm1vv297m9sp7max1sjbngwq6m5";
+    version = "26.0.1410.28";
+    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-26.0.1410.28.tar.xz";
+    sha256 = "1g32xyh06xsqkli0g83flqr1qvx2yxb7vaqshf9wcyqgkyzvy7il";
   };
   stable = {
-    version = "24.0.1312.70";
-    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-24.0.1312.70.tar.bz2";
-    sha256 = "01z2xdfrlw2iynh9ink3d7hddldh2krgx3w9qnq9nq9z54vwwzfq";
+    version = "25.0.1364.152";
+    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-25.0.1364.152.tar.bz2";
+    sha256 = "1v8zpqk3q21d5hars1clss75n187hlg4zxbr68jj1ysmqclzbni8";
   };
 }
diff --git a/pkgs/applications/networking/browsers/firefox/19.0.nix b/pkgs/applications/networking/browsers/firefox/19.0.nix
index a46143066c1..7a65635849e 100644
--- a/pkgs/applications/networking/browsers/firefox/19.0.nix
+++ b/pkgs/applications/networking/browsers/firefox/19.0.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, pkgconfig, gtk, pango, perl, python, zip, libIDL
 , libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs
-, freetype, fontconfig, file, alsaLib, nspr, libnotify
+, freetype, fontconfig, file, alsaLib, nspr, nss, libnotify
 , yasm, mesa, sqlite, unzip, makeWrapper, pysqlite
 
 , # If you want the resulting program to call itself "Firefox" instead
@@ -15,9 +15,9 @@ assert stdenv.gcc ? libc && stdenv.gcc.libc != null;
 
 rec {
 
-  firefoxVersion = "19.0";
+  firefoxVersion = "19.0.2";
 
-  xulVersion = "19.0"; # this attribute is used by other packages
+  xulVersion = "19.0.2"; # this attribute is used by other packages
 
 
   src = fetchurl {
@@ -27,7 +27,7 @@ rec {
         # Fall back to this url for versions not available at releases.mozilla.org.
         "ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${firefoxVersion}/source/firefox-${firefoxVersion}.source.tar.bz2"
     ];
-    sha1 = "816d64e8c9432349cd208fd181d210c54f985351";
+    sha1 = "d108d356225379a86d69a4906c706289135f6342";
   };
 
   commonConfigureFlags =
@@ -39,9 +39,9 @@ rec {
       "--with-system-zlib"
       "--with-system-bz2"
       "--with-system-nspr"
-      # "--with-system-nss" # Too old in nixpkgs
+      "--with-system-nss"
       # "--with-system-png" # <-- "--with-system-png won't work because the system's libpng doesn't have APNG support"
-      # "--enable-system-cairo" # disabled for the moment because our Cairo is too old
+      # "--enable-system-cairo" # <-- doesn't build
       "--enable-system-sqlite"
       "--disable-crashreporter"
       "--disable-tests"
@@ -60,7 +60,7 @@ rec {
       [ pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2
         python dbus dbus_glib pango freetype fontconfig xlibs.libXi
         xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt file
-        alsaLib nspr libnotify xlibs.pixman yasm mesa
+        alsaLib nspr nss libnotify xlibs.pixman yasm mesa
         xlibs.libXScrnSaver xlibs.scrnsaverproto pysqlite
         xlibs.libXext xlibs.xextproto sqlite unzip makeWrapper
       ];
@@ -125,7 +125,7 @@ rec {
 
     buildInputs =
       [ pkgconfig gtk perl zip libIDL libjpeg zlib cairo bzip2 python
-        dbus dbus_glib pango freetype fontconfig alsaLib nspr libnotify
+        dbus dbus_glib pango freetype fontconfig alsaLib nspr nss libnotify
         xlibs.pixman yasm mesa sqlite file unzip pysqlite
       ];
 
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
index 202dfe2b02e..10faa983cc1 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
@@ -19,6 +19,7 @@
 , cairo
 , atk
 , gdk_pixbuf
+, nss
 , debug ? false
 
 /* you have to add ~/mm.cfg :
@@ -43,9 +44,9 @@ let
         throw "no x86_64 debugging version available"
       else rec {
         # -> http://labs.adobe.com/downloads/flashplayer10.html
-        version = "11.2.202.262";
+        version = "11.2.202.273";
         url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.x86_64.tar.gz";
-        sha256 = "1bfr7ajpqkah4kshhqkmi2c15mm962absrq9ks7gfsfaircp387j";
+        sha256 = "0c15nszgg7zsv00n2qxha5zf8hmyf8i6byvhalnh5x46mr0rkbv9";
       }
     else if stdenv.system == "i686-linux" then
       if debug then {
@@ -54,9 +55,9 @@ let
         url = http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_plugin_debug.i386.tar.gz;
         sha256 = "1z3649lv9sh7jnwl8d90a293nkaswagj2ynhsr4xmwiy7c0jz2lk";
       } else rec {
-        version = "11.2.202.262";
+        version = "11.2.202.273";
         url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.i386.tar.gz";
-        sha256 = "0fhslr46apa6qfzdhagmjb8vbl741ryh6j14qy2271nl2q687jsx";
+        sha256 = "1gb14xv7gbq57qg1hxmrnryaw6xgmkg54ql5hr7q6szplj65wvmd";
       }
     else throw "Flash Player is not supported on this platform";
 
@@ -78,7 +79,7 @@ stdenv.mkDerivation {
   rpath = stdenv.lib.makeLibraryPath
     [ zlib alsaLib curl nspr fontconfig freetype expat libX11
       libXext libXrender libXcursor libXt gtk glib pango atk cairo gdk_pixbuf
-      libvdpau
+      libvdpau nss
     ];
 
   buildPhase = ":";
diff --git a/pkgs/applications/networking/browsers/rekonq/default.nix b/pkgs/applications/networking/browsers/rekonq/default.nix
index fe573559961..c8542ad7a52 100644
--- a/pkgs/applications/networking/browsers/rekonq/default.nix
+++ b/pkgs/applications/networking/browsers/rekonq/default.nix
@@ -1,14 +1,16 @@
-{ stdenv, fetchurl, kdelibs, gettext, pkgconfig, shared_desktop_ontologies, qca2, qoauth }:
+{ stdenv, fetchurl, kde4, gettext, pkgconfig, shared_desktop_ontologies, qca2, qoauth }:
+
+assert builtins.compareVersions "4.8.3" kde4.release != 1; # https://bugs.kde.org/show_bug.cgi?id=306077
 
 stdenv.mkDerivation rec {
-  name = "rekonq-1.1";
+  name = "rekonq-1.70"; # >=1.80 need kde >=4.9.0
 
   src = fetchurl {
     url = "mirror://sourceforge/rekonq/${name}.tar.bz2";
-    sha256 = "1bs733mwyfb7bxnial8n49b82ip04sark2mxwlq7ixxsbgq7972l";
+    sha256 = "05zqm329vajsn32l5b5nlbw92gl3irdcx8kifr4y921i9bkzigad";
   };
 
-  buildInputs = [ kdelibs qca2 qoauth ];
+  buildInputs = [ kde4.kdelibs qca2 qoauth ];
 
   nativeBuildInputs = [ gettext pkgconfig shared_desktop_ontologies ];
 
diff --git a/pkgs/applications/networking/browsers/vimprobable2/default.nix b/pkgs/applications/networking/browsers/vimprobable2/default.nix
index 46081cac3a7..ee8e4b8434a 100644
--- a/pkgs/applications/networking/browsers/vimprobable2/default.nix
+++ b/pkgs/applications/networking/browsers/vimprobable2/default.nix
@@ -1,17 +1,26 @@
-{ stdenv, fetchurl, makeWrapper, glib_networking, gtk, libsoup, libX11, perl,
-  pkgconfig, webkit }:
+{ stdenv, fetchurl, makeWrapper, glib, glib_networking, gtk, libsoup, libX11, perl,
+  pkgconfig, webkit, gsettings_desktop_schemas }:
 
-stdenv.mkDerivation {
-  name = "vimprobable2-1.2.0";
+stdenv.mkDerivation rec {
+  version = "1.2.1";
+  name = "vimprobable2-${version}";
   src = fetchurl {
-    url = "mirror://sourceforge/vimprobable/vimprobable2_1.2.0.tar.bz2";
-    sha256 = "0fjakrmz1syjwgx01j2icpdv69jgvfl2nlxbj8zxfr8mw0h2wg1f";
+    url = "mirror://sourceforge/vimprobable/vimprobable2_${version}.tar.bz2";
+    sha256 = "19zx1k3s2gnhzzd2wpyqsk151w9p52ifl64xaz9a6qkgvrxlli8p";
   };
+
+  # Nixos default ca bundle
+  patchPhase = ''
+    sed -i s,/etc/ssl/certs/ca-certificates.crt,/etc/ca-bundle.crt, config.h
+  '';
+
   buildInputs = [ makeWrapper gtk libsoup libX11 perl pkgconfig webkit ];
+
   installPhase = ''
     make PREFIX=/ DESTDIR=$out install
-    wrapProgram "$out/bin/vimprobable2" --prefix GIO_EXTRA_MODULES : \
-      ${glib_networking}/lib/gio/modules
+    wrapProgram "$out/bin/vimprobable2" \
+      --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
+      --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share"
   '';
 
   meta = {
diff --git a/pkgs/applications/networking/irc/bip/bip-0.8.8-yyparse.patch b/pkgs/applications/networking/irc/bip/bip-0.8.8-yyparse.patch
new file mode 100644
index 00000000000..5d48fc99a0d
--- /dev/null
+++ b/pkgs/applications/networking/irc/bip/bip-0.8.8-yyparse.patch
@@ -0,0 +1,11 @@
+--- bip-0.8.8/src/lex.l.orig
++++ bip-0.8.8/src/lex.l
+@@ -16,7 +16,7 @@
+ int linec;
+ #include "util.h"
+ extern list_t *root_list;
+-void yyparse(void);
++int yyparse(void);
+ void free_conf(list_t*);
+ int conf_error;
+ typedef struct bip bip_t;
diff --git a/pkgs/applications/networking/irc/bip/default.nix b/pkgs/applications/networking/irc/bip/default.nix
index eaee36b9711..89fdf0d8df8 100644
--- a/pkgs/applications/networking/irc/bip/default.nix
+++ b/pkgs/applications/networking/irc/bip/default.nix
@@ -36,6 +36,10 @@ in stdenv.mkDerivation {
     }
   ];
 
+  postPatch = ''
+    patch -p1 < ${./bip-0.8.8-yyparse.patch}
+  '';
+
   configureFlags = [ "--disable-pie" ];
 
   buildInputs = [ bison flex autoconf automake openssl ];
@@ -45,4 +49,4 @@ in stdenv.mkDerivation {
     homepage = http://bip.milkypond.org/;
     license = stdenv.lib.licenses.gpl2;
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/applications/networking/msmtp/default.nix b/pkgs/applications/networking/msmtp/default.nix
index 098d06bd077..bf0ca68177b 100644
--- a/pkgs/applications/networking/msmtp/default.nix
+++ b/pkgs/applications/networking/msmtp/default.nix
@@ -1,17 +1,18 @@
-{stdenv, fetchurl, openssl}:
-stdenv.mkDerivation {
-  name = "msmtp-1.4.21";
+{ stdenv, fetchurl, openssl, pkgconfig, gnutls, gsasl, libidn }:
+stdenv.mkDerivation rec {
+  name = "msmtp-1.4.30";
 
   src = fetchurl {
-    url = mirror://sourceforge/msmtp/msmtp-1.4.21.tar.bz2;
-    sha256 = "1yjgy56n02qs25728psg296amhbdkxq2pv1q3l484f3r9pjrpcrg";
+    url = "mirror://sourceforge/msmtp/${name}.tar.bz2";
+    sha256 = "11lq82byx9xyfkf4nrcfjjfv5k8gk3bf8zlw0kml1qrndqlvjlpi";
   };
 
-  buildInputs = [ openssl ];
+  buildInputs = [ openssl pkgconfig gnutls gsasl libidn ];
 
-  meta = { 
+  meta = {
       description = "a MUA";
-      homepage = http://msmtp.sourceforge.net/;
-      license = "GPL";
-    }; 
+      homepage = "http://msmtp.sourceforge.net/";
+      license = stdenv.lib.licenses.gpl3;
+      maintainers = [ stdenv.lib.maintainers.garbas ];
+    };
 }
diff --git a/pkgs/applications/networking/p2p/transmission/default.nix b/pkgs/applications/networking/p2p/transmission/default.nix
index 0a86e140347..c59fddf6364 100644
--- a/pkgs/applications/networking/p2p/transmission/default.nix
+++ b/pkgs/applications/networking/p2p/transmission/default.nix
@@ -1,20 +1,23 @@
-{ stdenv, fetchurl, pkgconfig, openssl, curl, intltool, libevent, gtkClient ? true, gtk }:
+{ stdenv, fetchurl, pkgconfig, openssl, curl, intltool, libevent,
+  file, inotifyTools, gtk ? null }:
 
 stdenv.mkDerivation rec {
-  name = "transmission-2.52";
+  name = "transmission-2.60"; # transmission >= 2.61 requires gtk3
 
   src = fetchurl {
     url = "http://download.transmissionbt.com/files/${name}.tar.xz";
-    sha256 = "05sfq5h3731xc9a1k5r1q4gbs9yk0dr229asfxjjgg0lw1xzppdw";
+    sha256 = "1ramdliyy8j7qqpkxg643lda11ynxwfhq6qcs31fr3h9x72l0rg4";
   };
 
-  buildInputs = [ pkgconfig openssl curl intltool libevent ] ++
-                stdenv.lib.optional gtkClient gtk;
+  buildInputs = [ pkgconfig openssl curl intltool libevent
+                  file inotifyTools gtk ];
 
-  configureFlags = if gtkClient then "--enable-gtk" else "--disable-gtk";
+  preConfigure = ''
+    sed -i -e 's|/usr/bin/file|${file}/bin/file|g' configure
+  '';
 
   postInstall = ''
-    rm $out/share/icons/hicolor/icon-theme.cache
+    rm -f $out/share/icons/hicolor/icon-theme.cache
   '';
 
   meta = {
diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix
index a5f0ddea28f..173453f7b5e 100644
--- a/pkgs/applications/networking/sniffers/wireshark/default.nix
+++ b/pkgs/applications/networking/sniffers/wireshark/default.nix
@@ -3,20 +3,20 @@
 , heimdal, python, lynx, lua5
 }:
 
-let
-  version = "1.8.3";
-in
+let version = "1.8.5"; in
+
 stdenv.mkDerivation {
   name = "wireshark-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/wireshark/wireshark-${version}.tar.bz2";
-    sha256 = "1crg59kkxb7lw1wpfg52hd4l00hq56pyg7f40c7sgqmm0vsmza43";
+    sha256 = "0wp33qa5yvi60b08iiz55wflhr1vwd7680sbwx2kqjlp2s17kr6l";
   };
 
-  buildInputs = [perl pkgconfig gtk libpcap flex bison gnutls libgcrypt
-    glib zlib libxml2 libxslt adns geoip heimdal python lynx lua5
-  ];
+  buildInputs =
+    [ perl pkgconfig gtk libpcap flex bison gnutls libgcrypt
+      glib zlib libxml2 libxslt adns geoip heimdal python lynx lua5
+    ];
 
   configureFlags = "--disable-usr-local --with-ssl --enable-threads --enable-packet-editor";
 
diff --git a/pkgs/applications/office/koffice/default.nix b/pkgs/applications/office/koffice/default.nix
index 784b6007035..773b755e9b2 100644
--- a/pkgs/applications/office/koffice/default.nix
+++ b/pkgs/applications/office/koffice/default.nix
@@ -38,6 +38,7 @@ stdenv.mkDerivation rec {
     license = "GPL";
     homepage = http://www.koffice.org;
     maintainers = with stdenv.lib.maintainers; [ sander urkud ];
-    inherit (kdelibs.meta) platforms;
+    # doesn't build, seems dead and superseded by calligra
+    #inherit (kdelibs.meta) platforms;
   };
 }
diff --git a/pkgs/applications/science/logic/tptp/default.nix b/pkgs/applications/science/logic/tptp/default.nix
index 87a32006713..5c8cb720324 100644
--- a/pkgs/applications/science/logic/tptp/default.nix
+++ b/pkgs/applications/science/logic/tptp/default.nix
@@ -14,7 +14,7 @@ let
     version="5.4.0";
     name="${baseName}-${version}";
     url="http://www.cs.miami.edu/~tptp/TPTP/Distribution/TPTP-v${version}.tgz";
-    hash="0nyq2kkiphwgj3hczc7zglzqjj6hxxsh6zcygpy4yhxh9a9rpkg1";
+    hash="0rvrmh3vw4bk7mj29bx1pi76g2bsqyc13gsnpa1cbjs5pzyhm780";
   };
 in
 rec {
diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix
index b7bf00f07dd..066da4bff4a 100644
--- a/pkgs/applications/version-management/git-and-tools/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/default.nix
@@ -43,13 +43,16 @@ rec {
   });
 
   gitAnnex = lib.makeOverridable (import ./git-annex) {
-    inherit stdenv fetchurl perl coreutils git libuuid rsync findutils curl ikiwiki which openssh;
-    inherit (haskellPackages) ghc bloomfilter dataenc editDistance hinotify hS3 hslogger HTTP
-      blazeBuilder blazeHtml caseInsensitive IfElse json liftedBase MissingH monadControl mtl
-      network pcreLight SHA stm utf8String networkInfo dbus clientsession cryptoApi dataDefault
-      extensibleExceptions filepath hamlet httpTypes networkMulticast text time transformers
-      transformersBase wai waiLogger warp yesod yesodDefault yesodStatic testpack QuickCheck
-      SafeSemaphore networkProtocolXmpp async dns DAV uuid Glob;
+    inherit stdenv fetchurl perl which ikiwiki curl bup git gnupg1 lsof openssh rsync;
+    inherit (haskellPackages) ghc aeson async blazeBuilder bloomfilter
+      caseInsensitive clientsession cryptoApi dataDefault dataenc DAV dbus dns
+      editDistance extensibleExceptions filepath gnutls hamlet hinotify hS3
+      hslogger httpConduit httpTypes HUnit IfElse json liftedBase MissingH
+      monadControl mtl network networkInfo networkMulticast networkProtocolXmpp
+      QuickCheck random regexCompat SafeSemaphore SHA stm text time
+      transformers transformersBase utf8String uuid wai waiLogger warp
+      xmlConduit xmlTypes yesod yesodDefault yesodForm yesodStatic testpack
+      cabalInstall;
   };
 
   qgit = import ./qgit {
diff --git a/pkgs/applications/version-management/git-and-tools/git-annex/default.nix b/pkgs/applications/version-management/git-and-tools/git-annex/default.nix
index 3d11b484173..4ea0a5df8c1 100644
--- a/pkgs/applications/version-management/git-and-tools/git-annex/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git-annex/default.nix
@@ -1,49 +1,50 @@
-{ stdenv, ghc, fetchurl, perl, coreutils, git, libuuid, rsync
-, findutils, curl, ikiwiki, which, openssh
-, blazeBuilder, blazeHtml, bloomfilter, caseInsensitive
-, clientsession, cryptoApi, dataDefault, dataenc, dbus
-, editDistance, extensibleExceptions, filepath, hamlet, hinotify
-, hS3, hslogger, HTTP, httpTypes, IfElse, json, liftedBase
-, MissingH, monadControl, mtl, network, networkInfo
-, networkMulticast, pcreLight, QuickCheck, SHA, stm, text, time
-, transformers, transformersBase, utf8String, wai, waiLogger, warp
-, yesod, yesodDefault, yesodStatic, testpack, SafeSemaphore
-, networkProtocolXmpp, async, dns, DAV, uuid, Glob
+{ stdenv, fetchurl, perl, which, ikiwiki, ghc, aeson, async, blazeBuilder
+, bloomfilter, bup, caseInsensitive, clientsession, cryptoApi, curl, dataDefault
+, dataenc, DAV, dbus, dns, editDistance, extensibleExceptions, filepath, git
+, gnupg1, gnutls, hamlet, hinotify, hS3, hslogger, httpConduit, httpTypes, HUnit
+, IfElse, json, liftedBase, lsof, MissingH, monadControl, mtl, network
+, networkInfo, networkMulticast, networkProtocolXmpp, openssh, QuickCheck
+, random, regexCompat, rsync, SafeSemaphore, SHA, stm, text, time, transformers
+, transformersBase, utf8String, uuid, wai, waiLogger, warp, xmlConduit, xmlTypes
+, yesod, yesodDefault, yesodForm, yesodStatic, testpack
+, cabalInstall		# TODO: remove this build input at the next update
 }:
 
 let
-  version = "3.20130216";
+  version = "4.20130227";
 in
 stdenv.mkDerivation {
   name = "git-annex-${version}";
 
   src = fetchurl {
     url = "http://git.kitenet.net/?p=git-annex.git;a=snapshot;sf=tgz;h=${version}";
-    sha256 = "1zbxkv9kkfyr8haml0wih1fi2xi6qazwzcxjyv8q65fa80ksskbr";
+    sha256 = "1zw5kzb08zz43ahbhrazjpq9zn73l3kwnqilp464frf7fg7rwan6";
     name = "git-annex-${version}.tar.gz";
   };
 
-  buildInputs = [ ghc git libuuid rsync findutils curl ikiwiki which
-    openssh blazeBuilder blazeHtml bloomfilter caseInsensitive
-    clientsession cryptoApi dataDefault dataenc dbus editDistance
-    extensibleExceptions filepath hamlet hinotify hS3 hslogger HTTP
-    httpTypes IfElse json liftedBase MissingH monadControl mtl network
-    networkInfo networkMulticast pcreLight QuickCheck SHA stm text time
-    transformers transformersBase utf8String wai waiLogger warp yesod
-    yesodDefault yesodStatic testpack SafeSemaphore networkProtocolXmpp
-    async dns DAV uuid Glob ];
+  buildInputs = [ ghc aeson async blazeBuilder bloomfilter bup ikiwiki
+    caseInsensitive clientsession cryptoApi curl dataDefault dataenc DAV dbus
+    dns editDistance extensibleExceptions filepath git gnupg1 gnutls hamlet
+    hinotify hS3 hslogger httpConduit httpTypes HUnit IfElse json liftedBase
+    lsof MissingH monadControl mtl network networkInfo networkMulticast
+    networkProtocolXmpp openssh QuickCheck random regexCompat rsync
+    SafeSemaphore SHA stm text time transformers transformersBase utf8String
+    uuid wai waiLogger warp xmlConduit xmlTypes yesod yesodDefault yesodForm
+    yesodStatic which perl testpack cabalInstall ];
 
-  checkTarget = "test";
-  doCheck = true;
-
-  preConfigure = ''
+  configurePhase = ''
     makeFlagsArray=( PREFIX=$out )
-    sed -i -e 's|#!/usr/bin/perl|#!${perl}/bin/perl|' Build/mdwn2man
-    sed -i -e 's|"cp |"${coreutils}/bin/cp |' -e 's|"rm -f |"${coreutils}/bin/rm -f |' test.hs
-    # Remove this patch after the next update!
-    sed -i -e '9i #define WITH_OLD_URI' Utility/Url.hs
+    patchShebangs .
+
+    # cabal-install wants to store stuff in $HOME
+    mkdir ../tmp
+    export HOME=$PWD/../tmp
+
+    cabal configure -f-fast -ftestsuite -f-android -fproduction -fdns -fxmpp -fpairing -fwebapp -fassistant -fdbus -finotify -fwebdav -fs3
   '';
 
+  checkPhase = "./git-annex test";
+
   meta = {
     homepage = "http://git-annex.branchable.com/";
     description = "Manage files with git without checking them into git";
diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix
index 62880424b59..19e131d3743 100644
--- a/pkgs/applications/version-management/git-and-tools/git/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git/default.nix
@@ -31,6 +31,9 @@ stdenv.mkDerivation {
          docbook_xsl docbook_xml_dtd_45 libxslt ]
     ++ stdenv.lib.optionals guiSupport [tcl tk];
 
+  # required to support pthread_cancel()
+  NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
+
   makeFlags = "prefix=\${out} PERL_PATH=${perl}/bin/perl SHELL_PATH=${stdenv.shell} "
       + (if pythonSupport then "PYTHON_PATH=${python}/bin/python" else "NO_PYTHON=1")
       + (if stdenv.isSunOS then " INSTALL=install NO_INET_NTOP= NO_INET_PTON=" else "");
diff --git a/pkgs/applications/version-management/git-and-tools/github-backup/default.nix b/pkgs/applications/version-management/git-and-tools/github-backup/default.nix
new file mode 100644
index 00000000000..6897ef003ad
--- /dev/null
+++ b/pkgs/applications/version-management/git-and-tools/github-backup/default.nix
@@ -0,0 +1,25 @@
+{ cabal, fetchurl, extensibleExceptions, filepath, github, hslogger, IfElse
+, MissingH, mtl, network, prettyShow
+}:
+
+cabal.mkDerivation (self: {
+  pname = "github-backup";
+  version = "1.20120314";
+  src = fetchurl {
+    url = "https://github.com/joeyh/github-backup/archive/1.20120314.tar.gz";
+    sha256 = "0rmgkylsnxbry02g5bxq5af03azgydfz6dzyvqzbhnkwavhqdlqy";
+    name = "github-backup-${self.pname}.tar.gz";
+  };
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [
+    extensibleExceptions filepath github hslogger IfElse MissingH mtl
+    network prettyShow
+  ];
+  meta = {
+    homepage = "https://github.com/joeyh/github-backup";
+    description = "backs up everything github knows about a repository, to the repository";
+    license = "GPL";
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/applications/video/makemkv/builder.sh b/pkgs/applications/video/makemkv/builder.sh
new file mode 100644
index 00000000000..0e1898a4556
--- /dev/null
+++ b/pkgs/applications/video/makemkv/builder.sh
@@ -0,0 +1,38 @@
+source $stdenv/setup
+set -x
+
+lib=" \
+  makemkv-oss-${ver}/out/libdriveio.so.0 \
+  makemkv-oss-${ver}/out/libmakemkv.so.1 \
+  "
+
+bin=" \
+  makemkv-oss-${ver}/out/makemkv \
+  makemkv-bin-${ver}/bin/amd64/makemkvcon \
+  "
+
+tar xzf ${src_bin}
+tar xzf ${src_oss}
+
+(
+  cd makemkv-oss-${ver}
+  make -f makefile.linux
+)
+
+chmod +x ${bin}
+
+libPath="${libPath}:${out}/lib" # XXX: der. This should be in the nix file?
+
+for i in ${bin} ; do
+  patchelf \
+    --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+    --set-rpath $libPath \
+    ${i}
+done 
+
+ensureDir $out/bin
+ensureDir $out/lib
+ensureDir $out/share/MakeMKV
+cp ${lib} ${out}/lib
+cp ${bin} ${out}/bin
+cp makemkv-bin-${ver}/src/share/* $out/share/MakeMKV
diff --git a/pkgs/applications/video/makemkv/default.nix b/pkgs/applications/video/makemkv/default.nix
new file mode 100644
index 00000000000..43482bd9762
--- /dev/null
+++ b/pkgs/applications/video/makemkv/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl
+, openssl, qt4, mesa, zlib
+}:
+
+stdenv.mkDerivation rec {
+  name = "makemkv-${ver}";
+  ver = "1.8.0";
+  builder = ./builder.sh;
+
+  src_bin = fetchurl {
+    url = "http://www.makemkv.com/download/makemkv-bin-${ver}.tar.gz";
+    sha256 = "1f465rdv5ibnh5hnfmvmlid0yyzkansjw8l1mi5qd3bc6ca4k30c";
+  };
+
+  src_oss = fetchurl { 
+    url = "http://www.makemkv.com/download/makemkv-oss-${ver}.tar.gz";
+    sha256 = "0kj1mpkzz2cvi0ibdgdzfwbh9k2jfj3ra5m3hd7iyc5ng21v4sk3";
+  };
+
+  buildInputs = [openssl qt4 mesa zlib];
+
+  libPath = stdenv.lib.makeLibraryPath [stdenv.gcc.gcc openssl mesa qt4 zlib ] 
+          + ":" + stdenv.gcc.gcc + "/lib64";
+
+  meta = {
+    description = "convert blu-ray and dvd to mkv";
+    longDescription = ''
+      makemkv is a one-click QT application that transcodes an encrypted
+      blu-ray or DVD disc into a more portable set of mkv files, preserving
+      subtitles, chapter marks, all video and audio tracks.
+
+      Program is time-limited -- it will stop functioning after 60 days. You
+      can always download the latest version from makemkv.com that will reset the
+      expiration date.
+    '';
+    license = "unfree";
+    homepage = http://makemkv.com;
+  };
+}
diff --git a/pkgs/applications/video/mkvtoolnix/default.nix b/pkgs/applications/video/mkvtoolnix/default.nix
index 1dc58607de0..c2563b5e298 100644
--- a/pkgs/applications/video/mkvtoolnix/default.nix
+++ b/pkgs/applications/video/mkvtoolnix/default.nix
@@ -16,11 +16,11 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "mkvtoolnix-5.9.0";
+  name = "mkvtoolnix-6.1.0";
 
   src = fetchurl {
-    url = "http://www.bunkus.org/videotools/mkvtoolnix/sources/${name}.tar.bz2";
-    sha256 = "1qdxzi72w5p77brlpp7y7llsgzlvl4p8fk1kzg934cqw6cqza4yr";
+    url = "http://www.bunkus.org/videotools/mkvtoolnix/sources/${name}.tar.xz";
+    sha256 = "01k5al3886cyi97kynx5hf98z5p7mb8vd2m057gbp1k10zblcb9x";
   };
 
   buildInputs = [ libmatroska flac libvorbis file boost lzo xdg_utils expat wxGTK zlib ruby gettext pkgconfig curl ];
@@ -39,4 +39,3 @@ stdenv.mkDerivation rec {
     homepage = http://www.bunkus.org/videotools/mkvtoolnix/;
   };
 }
-
diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix
index 0c22379c577..d86b81be756 100644
--- a/pkgs/applications/video/mplayer/default.nix
+++ b/pkgs/applications/video/mplayer/default.nix
@@ -152,6 +152,8 @@ stdenv.mkDerivation rec {
 
   NIX_LDFLAGS = stdenv.lib.optionalString x11Support "-lX11 -lXext";
 
+  installTargets = [ "install" ] ++ stdenv.lib.optional x11Support "install-gui";
+
   enableParallelBuilding = true;
 
   # Provide a reasonable standard font.  Maybe we should symlink here.
@@ -159,6 +161,9 @@ stdenv.mkDerivation rec {
     ''
       mkdir -p $out/share/mplayer
       cp ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mplayer/subfont.ttf
+      if test -f $out/share/applications/mplayer.desktop ; then
+        echo "NoDisplay=True" >> $out/share/applications/mplayer.desktop
+      fi
     '';
 
   crossAttrs = {
diff --git a/pkgs/applications/video/xbmc/default.nix b/pkgs/applications/video/xbmc/default.nix
index 96423a52369..0588f580cc2 100644
--- a/pkgs/applications/video/xbmc/default.nix
+++ b/pkgs/applications/video/xbmc/default.nix
@@ -2,7 +2,7 @@
 , pkgconfig, cmake, gnumake, yasm, python
 , boost
 , gettext, pcre, yajl, fribidi
-, openssl, gperf
+, openssl, gperf, tinyxml2, taglib, libssh, swig, jre
 , libX11, xproto, inputproto
 , libXt, libXmu, libXext, xextproto
 , libXinerama, libXrandr, randrproto
@@ -30,11 +30,11 @@ assert sambaSupport -> samba != null;
 assert vdpauSupport -> libvdpau != null && ffmpeg.vdpauSupport;
 
 stdenv.mkDerivation rec {
-    name = "xbmc-11.0";
+    name = "xbmc-12.0";
 
     src = fetchurl {
       url = "http://mirrors.xbmc.org/releases/source/${name}.tar.gz";
-      sha256 = "1fe5d310c16138f26e2b13bc545604e95f48ace6c8636f23e77da402cd7b0b19";
+      sha256 = "0vy1a38gfbp9vhbjvwqm11sd76gl3s9q0h7gwpsks85m2k88q0ak";
     };
 
     buildInputs = [
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
       pkgconfig cmake gnumake yasm python
       boost
       gettext pcre yajl fribidi
-      openssl gperf
+      openssl gperf tinyxml2 taglib libssh swig jre
       libX11 xproto inputproto
       libXt libXmu libXext xextproto
       libXinerama libXrandr randrproto
@@ -86,5 +86,7 @@ stdenv.mkDerivation rec {
       homepage = http://xbmc.org/;
       description = "XBMC Media Center";
       license = "GPLv2";
+      platforms = stdenv.lib.platforms.linux; 
+      maintainers = [ stdenv.lib.maintainers.iElectric ];
     };
 }
diff --git a/pkgs/applications/virtualization/virtualbox/build_fix_3.9.0.patch b/pkgs/applications/virtualization/virtualbox/build_fix_3.9.0.patch
new file mode 100644
index 00000000000..2c3cdebacde
--- /dev/null
+++ b/pkgs/applications/virtualization/virtualbox/build_fix_3.9.0.patch
@@ -0,0 +1,22 @@
+commit d725168153e3dc5a383b12e0bf9af9b6244ad3eb
+Author: vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>
+Date:   Thu Feb 28 13:46:12 2013 +0000
+
+    Linux 3.9.0 rc0 compile fix
+
+    git-svn-id: http://www.virtualbox.org/svn/vbox/trunk@44867 cfe28804-0f27-0410-a406-dd0f0b0b656f
+
+diff --git a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+index ec9b502..7a208d1 100644
+--- a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
++++ b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+@@ -90,6 +90,9 @@
+ #include <linux/slab.h>
+ #include <linux/time.h>
+ #include <linux/sched.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
++# include <linux/sched/rt.h>
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 7)
+ # include <linux/jiffies.h>
+ #endif
diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix
index ea98d1ce7a9..bf19ecd99ca 100644
--- a/pkgs/applications/virtualization/virtualbox/default.nix
+++ b/pkgs/applications/virtualization/virtualbox/default.nix
@@ -11,8 +11,8 @@ with stdenv.lib;
 
 let
 
-  version = "4.2.6";
-  extpackRevision = "82870";
+  version = "4.2.8";
+  extpackRevision = "83876";
 
   forEachModule = action: ''
     for mod in \
@@ -35,7 +35,7 @@ let
     name = "Oracle_VM_VirtualBox_Extension_Pack-${version}-${extpackRevision}"
          + ".vbox-extpack";
     # Has to be base16 because it's used as an input to VBoxExtPackHelperApp!
-    sha256 = "f0113688a76efa0426c27c5541c78506b18637025c35aa682ecc6eeed5d56582";
+    sha256 = "fa579416f382b58c4e93d3740d076ceba728e28d987e51aced5865a46cb9111c";
     url = "https://www.virtualbox.org/wiki/Downloads";
   };
 
@@ -44,7 +44,7 @@ in stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2";
-    sha256 = "54526091bc2aa66b88ca878dd9ecc4466f96d607db2f6678a9d673ecf6646ae3";
+    sha256 = "f336af12244db74e6564dc22e438bbcba70f994aaf0d117fdf70caca9fab1b78";
   };
 
   buildInputs =
@@ -54,6 +54,11 @@ in stdenv.mkDerivation {
     ++ optional javaBindings jdk
     ++ optional pythonBindings python;
 
+  patches = [
+    ./strict_types.patch
+    ./build_fix_3.9.0.patch
+  ];
+
   prePatch = ''
     set -x
     MODULES_BUILD_DIR=`echo ${kernel}/lib/modules/*/build`
diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix
index 7a79a73c6b9..f648cb3c737 100644
--- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix
+++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix
@@ -2,14 +2,14 @@
 , libX11, libXt, libXext, libXmu, libXcomposite, libXfixes, libXrandr, libXcursor
 , dbus }:
 
-let version = "4.2.6"; in
+let version = "4.2.8"; in
 
 stdenv.mkDerivation {
   name = "VirtualBox-GuestAdditions-${version}-${kernel.version}";
 
   src = fetchurl {
     url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso";
-    sha256 = "1lry4hjjk8p69km1bi3mpmyarlnxz9izs2c0s8pq5rjzv1bd7bxr";
+    sha256 = "04a5402d8dcdefc83ffb2785351ddc57758781a3759137974469189392ae4ad5";
   };
 
   KERN_DIR = "${kernel}/lib/modules/*/build";
diff --git a/pkgs/applications/virtualization/virtualbox/strict_types.patch b/pkgs/applications/virtualization/virtualbox/strict_types.patch
new file mode 100644
index 00000000000..18ccc77f9b1
--- /dev/null
+++ b/pkgs/applications/virtualization/virtualbox/strict_types.patch
@@ -0,0 +1,68 @@
+diff --git a/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c b/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
+index 9cc124c..d86da0c 100644
+--- a/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
++++ b/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
+@@ -253,7 +253,11 @@ static struct platform_device gPlatformDevice =
+ DECLINLINE(RTUID) vboxdrvLinuxUid(void)
+ {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
++# ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
++    return from_kuid(current_user_ns(), current_uid());
++# else
+     return current->cred->uid;
++# endif
+ #else
+     return current->uid;
+ #endif
+@@ -262,7 +266,11 @@ DECLINLINE(RTUID) vboxdrvLinuxUid(void)
+ DECLINLINE(RTGID) vboxdrvLinuxGid(void)
+ {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
++# ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
++    return from_kgid(current_user_ns(), current_gid());
++# else
+     return current->cred->gid;
++# endif
+ #else
+     return current->gid;
+ #endif
+@@ -271,7 +279,11 @@ DECLINLINE(RTGID) vboxdrvLinuxGid(void)
+ DECLINLINE(RTUID) vboxdrvLinuxEuid(void)
+ {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
++# ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
++    return from_kuid(current_user_ns(), current_euid());
++# else
+     return current->cred->euid;
++# endif
+ #else
+     return current->euid;
+ #endif
+diff --git a/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c b/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
+index 575f739..8909e79 100644
+--- a/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
++++ b/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
+@@ -429,7 +429,11 @@ int vboxPciOsDevDetachHostDriver(PVBOXRAWPCIINS pIns)
+         if (!pNewCreds)
+                 goto done;
+ 
++# ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
++        pNewCreds->fsuid = GLOBAL_ROOT_UID;;
++# else
+         pNewCreds->fsuid = 0;
++# endif
+         pOldCreds = override_creds(pNewCreds);
+ #endif
+ 
+@@ -539,7 +543,11 @@ int vboxPciOsDevReattachHostDriver(PVBOXRAWPCIINS pIns)
+         if (!pNewCreds)
+             goto done;
+ 
++# ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
++        pNewCreds->fsuid = GLOBAL_ROOT_UID;;
++# else
+         pNewCreds->fsuid = 0;
++# endif
+         pOldCreds = override_creds(pNewCreds);
+ #endif
+         RTStrPrintf(szFileBuf, cMaxBuf,
diff --git a/pkgs/applications/window-managers/fvwm/default.nix b/pkgs/applications/window-managers/fvwm/default.nix
new file mode 100644
index 00000000000..33acd000270
--- /dev/null
+++ b/pkgs/applications/window-managers/fvwm/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, pkgconfig
+, cairo, fontconfig, freetype, libXft, libXcursor, libXinerama
+, libXpm, librsvg, libpng, fribidi, perl
+}:
+
+stdenv.mkDerivation rec {
+  name = "fvwm-2.6.5";
+
+  src = fetchurl {
+    url = "ftp://ftp.fvwm.org/pub/fvwm/version-2/${name}.tar.bz2";
+    sha256 = "1ks8igvmzm0m0sra05k8xzc8vkqy3gv1qskl6davw1irqnarjm11";
+  };
+
+  buildInputs = [
+    pkgconfig cairo fontconfig freetype
+    libXft libXcursor libXinerama libXpm
+    librsvg libpng fribidi perl
+  ];
+
+  meta = {
+    homepage = "http://fvwm.org";
+    description = "A multiple large virtual desktop window manager";
+    license = "GPLv2+";
+  };
+}
+
diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix
index 334b7e6f2c2..2eedd315830 100644
--- a/pkgs/build-support/cabal/default.nix
+++ b/pkgs/build-support/cabal/default.nix
@@ -88,17 +88,16 @@
             jailbreak = false;
 
             # pass the '--enable-split-objs' flag to cabal in the configure stage
-            enableSplitObjs = true;
+            enableSplitObjs = !stdenv.isDarwin;         # http://hackage.haskell.org/trac/ghc/ticket/4013
 
             # pass the '--enable-tests' flag to cabal in the configure stage
             # and run any regression test suites the package might have
-            doCheck = true;
+            doCheck = stdenv.lib.versionOlder "7" ghc.ghcVersion;
 
             extraConfigureFlags = [
               (stdenv.lib.enableFeature enableLibraryProfiling "library-profiling")
               (stdenv.lib.enableFeature self.enableSplitObjs "split-objs")
-              (stdenv.lib.enableFeature self.doCheck "tests")
-            ];
+            ] ++ stdenv.lib.optional (stdenv.lib.versionOlder "7" ghc.ghcVersion) (stdenv.lib.enableFeature self.doCheck "tests");
 
             # compiles Setup and configures
             configurePhase = ''
@@ -122,7 +121,7 @@
               done
 
               echo "configure flags: $extraConfigureFlags $configureFlags"
-              ./Setup configure --verbose --prefix="$out" $extraConfigureFlags $configureFlags
+              ./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' --libsubdir='$pkgid' $extraConfigureFlags $configureFlags
 
               eval "$postConfigure"
             '';
@@ -157,7 +156,7 @@
 
               ensureDir $out/bin # necessary to get it added to PATH
 
-              local confDir=$out/lib/ghc-pkgs/ghc-${ghc.ghc.version}
+              local confDir=$out/lib/ghc-${ghc.ghc.version}/package.conf.d
               local installedPkgConf=$confDir/${self.fname}.installedconf
               local pkgConf=$confDir/${self.fname}.conf
               ensureDir $confDir
diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix
index 23404e6da5d..9d9aa344f42 100644
--- a/pkgs/build-support/fetchurl/mirrors.nix
+++ b/pkgs/build-support/fetchurl/mirrors.nix
@@ -223,6 +223,20 @@ rec {
     ftp://ftp.nara.wide.ad.jp/pub/X11/GNOME/
   ];
 
+  xfce = [
+    http://archive.xfce.org/
+    http://mirror.netcologne.de/xfce/
+    http://archive.se.xfce.org/xfce/
+    http://archive.be.xfce.org/xfce/
+    http://mirror.perldude.de/archive.xfce.org/
+    http://archive.be2.xfce.org/
+    http://ftp.udc.es/xfce/
+    http://archive.al-us.xfce.org/
+    http://mirror.yongbok.net/X11/xfce-mirror/
+    http://mirrors.tummy.com/pub/archive.xfce.org/
+    http://xfce.mirror.uber.com.au/
+  ];
+
   # X.org.
   xorg = [
     http://xorg.freedesktop.org/releases/
diff --git a/pkgs/build-support/release/debian-build.nix b/pkgs/build-support/release/debian-build.nix
index feb15267f59..ba7be86a6c1 100644
--- a/pkgs/build-support/release/debian-build.nix
+++ b/pkgs/build-support/release/debian-build.nix
@@ -83,7 +83,7 @@ vmTools.runInLinuxImage (stdenv.mkDerivation (
     ''; # */
 
     meta = (if args ? meta then args.meta else {}) // {
-      description = "Build of a Deb package on ${diskImage.fullName} (${diskImage.name})";
+      description = "Deb package for ${diskImage.fullName}";
     };
   }
 
diff --git a/pkgs/build-support/release/nix-build.nix b/pkgs/build-support/release/nix-build.nix
index 84dd2986750..5e4f5dd9ee8 100644
--- a/pkgs/build-support/release/nix-build.nix
+++ b/pkgs/build-support/release/nix-build.nix
@@ -111,7 +111,7 @@ stdenv.mkDerivation (
       (stdenv.lib.optional doCoverageAnalysis "coverageReportPhase") ++ ["finalPhase"];
 
     meta = (if args ? meta then args.meta else {}) // {
-      description = if doCoverageAnalysis then "Coverage analysis" else "Native Nix build on ${stdenv.system}";
+      description = if doCoverageAnalysis then "Coverage analysis" else "Nix package for ${stdenv.system}";
     };
 
   }
diff --git a/pkgs/build-support/release/rpm-build.nix b/pkgs/build-support/release/rpm-build.nix
index 708b62302d5..9a1c7eeee62 100644
--- a/pkgs/build-support/release/rpm-build.nix
+++ b/pkgs/build-support/release/rpm-build.nix
@@ -33,21 +33,21 @@ vmTools.buildRPM (
       rpm -Up ''${rpms[*]} --excludepath /nix/store
 
       eval "$postRPMInstall"
-      
+
       echo "uninstalling ''${rpmNames[*]}..."
       rpm -e ''${rpmNames[*]} --nodeps
 
       for i in $out/rpms/*/*.src.rpm; do
         echo "file srpm $i" >> $out/nix-support/hydra-build-products
       done
-      
+
       for rpmdir in $extraRPMs ; do
         echo "file rpm-extra $(ls $rpmdir/rpms/*/*.rpm | grep -v 'src\.rpm' | sort | head -1)" >> $out/nix-support/hydra-build-products
       done
     ''; # */
 
     meta = (if args ? meta then args.meta else {}) // {
-      description = "Build of an RPM package on ${diskImage.fullName} (${diskImage.name})";
+      description = "RPM package for ${diskImage.fullName}";
     };
   }
 
diff --git a/pkgs/build-support/release/source-tarball.nix b/pkgs/build-support/release/source-tarball.nix
index 887bfb3125c..b50077975c1 100644
--- a/pkgs/build-support/release/source-tarball.nix
+++ b/pkgs/build-support/release/source-tarball.nix
@@ -6,23 +6,15 @@
 , buildInputs ? []
 , name ? "source-tarball"
 , version ? "0"
-, versionSuffix ? 
+, versionSuffix ?
     if officialRelease
     then ""
     else "pre${toString (src.rev or src.revCount or "")}"
 , src, stdenv, autoconf, automake, libtool
+, # By default, provide all the GNU Build System as input.
+  bootstrapBuildInputs ? [ autoconf automake libtool ]
 , ... } @ args:
 
-let
-
-  # By default, provide all the GNU Build System as input.
-  bootstrapBuildInputs =
-    if (args ? bootstrapBuildInputs)
-    then args.bootstrapBuildInputs
-    else [ autoconf automake libtool ];
-
-in
-
 stdenv.mkDerivation (
 
   # First, attributes that can be overriden by the caller (via args):
@@ -82,17 +74,17 @@ stdenv.mkDerivation (
   }
 
   # Then, the caller-supplied attributes.
-  // args // 
+  // args //
 
   # And finally, our own stuff.
   {
     name = name + "-" + version + versionSuffix;
 
     buildInputs = buildInputs ++ bootstrapBuildInputs;
-    
+
     preUnpack = ''
       mkdir -p $out/nix-support
-    '';  
+    '';
 
     postUnpack = ''
       # Set all source files to the current date.  This is because Nix
@@ -126,7 +118,7 @@ stdenv.mkDerivation (
     };
 
     meta = (if args ? meta then args.meta else {}) // {
-      description = "Build of a source distribution from a checkout";
+      description = "Source distribution";
 
       # Tarball builds are generally important, so give them a high
       # default priority.
diff --git a/pkgs/build-support/upstream-updater/urls-from-page.sh b/pkgs/build-support/upstream-updater/urls-from-page.sh
index f1ddf0bfd88..3c494114e91 100755
--- a/pkgs/build-support/upstream-updater/urls-from-page.sh
+++ b/pkgs/build-support/upstream-updater/urls-from-page.sh
@@ -9,6 +9,6 @@ relpath="${path#$server}"
  
 echo "URL: $url" >&2
 
-curl -L -k "$url" | sed -re 's/^/-/;s/[hH][rR][eE][fF]="([^"]*)"/\n+\1\n-/g' | \
+curl -L -k "$url" | sed -re 's/^/-/;s/[hH][rR][eE][fF]=("([^"]*)"|([^" <>&]+)[ <>&])/\n+\2\3\n-/g' | \
   sed -e '/^-/d; s/^[+]//; /^#/d;'"s/^\\//$protocol:\\/\\/$server\\//g" | \
   sed -re 's`^[^:]*$`'"$protocol://$basepath/&\`"
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix
index 9d9bdb2033e..1251866252c 100644
--- a/pkgs/build-support/vm/default.nix
+++ b/pkgs/build-support/vm/default.nix
@@ -1367,22 +1367,22 @@ rec {
     };
 
     debian60i386 = {
-      name = "debian-6.0.6-squeeze-i386";
-      fullName = "Debian 6.0.6 Squeeze (i386)";
+      name = "debian-6.0.7-squeeze-i386";
+      fullName = "Debian 6.0.7 Squeeze (i386)";
       packagesList = fetchurl {
         url = mirror://debian/dists/squeeze/main/binary-i386/Packages.bz2;
-        sha256 = "18c0473jacd877nkky1x21dkmp4992d8qra6wj07sq0yz5gdc9c4";
+        sha256 = "a770f26b5fce1a16460b68f135dfe97f4f4a9894b538ece0104a508c83ec65d5";
       };
       urlPrefix = mirror://debian;
       packages = commonDebianPackages;
     };
 
     debian60x86_64 = {
-      name = "debian-6.0.6-squeeze-amd64";
-      fullName = "Debian 6.0.6 Squeeze (amd64)";
+      name = "debian-6.0.7-squeeze-amd64";
+      fullName = "Debian 6.0.7 Squeeze (amd64)";
       packagesList = fetchurl {
         url = mirror://debian/dists/squeeze/main/binary-amd64/Packages.bz2;
-        sha256 = "1n1h3pz6axcaraxq8gfzq0jywlpdrqand1dnd4q79dy6cl788bi2";
+        sha256 = "b2bb561bde59ac67e07c70aa7c86a33f237436e6891796a93c6ed6ffb032080e";
       };
       urlPrefix = mirror://debian;
       packages = commonDebianPackages;
diff --git a/pkgs/data/documentation/man-pages/default.nix b/pkgs/data/documentation/man-pages/default.nix
index d00ca6c869f..032a59e5c50 100644
--- a/pkgs/data/documentation/man-pages/default.nix
+++ b/pkgs/data/documentation/man-pages/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "man-pages-3.45";
+  name = "man-pages-3.48";
 
   src = fetchurl {
-    url = "mirror://kernel/linux/docs/man-pages/Archive/${name}.tar.xz";
-    sha256 = "1lwqrp79xcyhnjlyg1n0imz5wc88lpgv909xxz8bdgbk7c1mky0h";
+    url = "mirror://kernel/linux/docs/man-pages/${name}.tar.xz";
+    sha256 = "6944cc3ad5131abab01c6703e63672b2e44be52737cdb1144f6ddaebb7f7d682";
   };
 
   preBuild =
diff --git a/pkgs/desktops/xfce-4.8/applications/mousepad.nix b/pkgs/desktops/xfce-4.8/applications/mousepad.nix
deleted file mode 100644
index 395a5c9f084..00000000000
--- a/pkgs/desktops/xfce-4.8/applications/mousepad.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, intltool, libxfce4util, libxfcegui4, gtk }:
-
-stdenv.mkDerivation rec {
-  name = "mousepad-0.2.16";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/apps/mousepad/0.2/${name}.tar.bz2";
-    sha1 = "4e63033e0a71578f3ec9a0d2e6a505efd0424ef9";
-  };
-
-  buildInputs = [ pkgconfig intltool libxfce4util libxfcegui4 gtk ];
-
-  meta = {
-    homepage = http://www.xfce.org/projects/mousepad/;
-    description = "A simple text editor for Xfce";
-    license = "GPLv2+";
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.eelco ];
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/applications/ristretto.nix b/pkgs/desktops/xfce-4.8/applications/ristretto.nix
deleted file mode 100644
index ce90891bb0b..00000000000
--- a/pkgs/desktops/xfce-4.8/applications/ristretto.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, intltool, libexif, gtk, thunar
-, exo, dbus_glib, libxfce4util, libxfce4ui, xfconf }:
-
-stdenv.mkDerivation rec {
-  name = "ristretto-0.2.3";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/apps/ristretto/0.2/${name}.tar.bz2";
-    sha1 = "5a34b865cb9013b67467b0e8d51970f0a1e977d1";
-  };
-
-  buildInputs =
-    [ pkgconfig intltool libexif gtk dbus_glib libxfce4util
-      libxfce4ui xfconf
-    ];
-
-  meta = {
-    homepage = http://goodies.xfce.org/projects/applications/ristretto;
-    description = "A fast and lightweight picture-viewer for the Xfce desktop environment";
-    license = "GPLv2+";
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.eelco ];
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/applications/terminal.nix b/pkgs/desktops/xfce-4.8/applications/terminal.nix
deleted file mode 100644
index f03a940679a..00000000000
--- a/pkgs/desktops/xfce-4.8/applications/terminal.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ stdenv, fetchurl
-, pkgconfig, ncurses
-, intltool, vte
-, exo, libxfce4util
-, gtk
-}:
-
-stdenv.mkDerivation {
-  name = "xfce-terminal-0.4.8";
-
-  src = fetchurl {
-    url = http://archive.xfce.org/src/apps/xfce4-terminal/0.4/Terminal-0.4.8.tar.bz2;
-    sha1 = "2f12c3a0fffad18976d47e531d404ee308cb2f05";
-  };
-
-  buildInputs = [ pkgconfig intltool exo gtk vte libxfce4util ncurses ];
-
-  meta = {
-    homepage = http://www.xfce.org/projects/terminal;
-    description = "A modern terminal emulator primarily for the Xfce desktop environment";
-    license = "GPLv2+";
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.eelco ];
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/applications/xfce4-notifyd.nix b/pkgs/desktops/xfce-4.8/applications/xfce4-notifyd.nix
deleted file mode 100644
index 598e6eb414d..00000000000
--- a/pkgs/desktops/xfce-4.8/applications/xfce4-notifyd.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ stdenv, fetchurl, intltool, pkgconfig, gtk, xfce }:
-
-stdenv.mkDerivation rec {
-  name = "xfce4-notifyd-0.2.2";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/apps/xfce4-notifyd/0.2/${name}.tar.bz2";
-    sha256 = "0s4ilc36sl5k5mg5727rmqims1l3dy5pwg6dk93wyjqnqbgnhvmn";
-  };
-
-  buildInputs = [ intltool pkgconfig gtk xfce.libxfce4util xfce.libxfce4ui xfce.xfconf ];
-
-  meta = {
-    homepage = http://goodies.xfce.org/projects/applications/xfce4-notifyd;
-    description = "The Xfce Notify Daemon";
-    platforms = stdenv.lib.platforms.linux;
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/applications/xfce4-taskmanager.nix b/pkgs/desktops/xfce-4.8/applications/xfce4-taskmanager.nix
deleted file mode 100644
index cffaa6bfe09..00000000000
--- a/pkgs/desktops/xfce-4.8/applications/xfce4-taskmanager.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ stdenv, fetchurl, intltool, pkgconfig, gtk }:
-
-stdenv.mkDerivation rec {
-  name = "xfce4-taskmanager-1.0.0";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/apps/xfce4-taskmanager/1.0/${name}.tar.bz2";
-    sha256 = "1vm9gw7j4ngjlpdhnwdf7ifx6xrrn21011almx2vwidhk2f9zvy0";
-  };
-
-  buildInputs = [ intltool pkgconfig gtk ];
-
-  meta = {
-    homepage = http://goodies.xfce.org/projects/applications/xfce4-taskmanager;
-    description = "Easy to use task manager for XFCE";
-    platforms = stdenv.lib.platforms.linux;
-  };
-}
\ No newline at end of file
diff --git a/pkgs/desktops/xfce-4.8/core/exo.nix b/pkgs/desktops/xfce-4.8/core/exo.nix
deleted file mode 100644
index 468132a2a81..00000000000
--- a/pkgs/desktops/xfce-4.8/core/exo.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, intltool, URI, glib, gtk, libxfce4util }:
-
-stdenv.mkDerivation rec {
-  name = "exo-0.6.2";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/exo/0.6/${name}.tar.bz2";
-    sha1 = "2486f12c814630068665e22cdf417f0f0f05dab1";
-  };
-
-  buildInputs =
-    [ pkgconfig intltool URI glib gtk libxfce4util ];
-
-  meta = {
-    homepage = http://www.xfce.org/projects/exo;
-    description = "Application library for the Xfce desktop environment";
-    license = "GPLv2+";
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/core/libxfce4ui.nix b/pkgs/desktops/xfce-4.8/core/libxfce4ui.nix
deleted file mode 100644
index 76c285ae599..00000000000
--- a/pkgs/desktops/xfce-4.8/core/libxfce4ui.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, xfconf
-, libstartup_notification }:
-
-stdenv.mkDerivation rec {
-  name = "libxfce4ui-4.8.1";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/libxfce4ui/4.8/${name}.tar.bz2";
-    sha1 = "408645581e589135aa03d2e9b84f4eede68596b2";
-  };
-
-  buildInputs =
-    [ pkgconfig intltool gtk libxfce4util xfconf
-      libstartup_notification
-    ];
-
-  enableParallelBuilding = true;
-
-  meta = {
-    homepage = http://www.xfce.org/;
-    description = "Basic GUI library for Xfce";
-    license = "LGPLv2+";
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/core/thunar.nix b/pkgs/desktops/xfce-4.8/core/thunar.nix
deleted file mode 100644
index 07fd734a1f2..00000000000
--- a/pkgs/desktops/xfce-4.8/core/thunar.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, intltool, exo, gtk, libxfce4util, libxfce4ui
-, dbus_glib, libstartup_notification, xfconf, xfce4panel, udev, libnotify }:
-
-stdenv.mkDerivation rec {
-  version = "1.2.3";
-  name = "thunar-${version}";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/thunar/1.2/Thunar-${version}.tar.bz2";
-    sha1 = "a05d0e14515d70c5ad94cca881822a707d366863";
-  };
-
-  buildInputs =
-    [ pkgconfig intltool gtk exo libxfce4util libxfce4ui
-      dbus_glib libstartup_notification xfconf xfce4panel udev libnotify
-    ];
-
-  enableParallelBuilding = true;
-
-  meta = {
-    homepage = http://thunar.xfce.org/;
-    description = "Xfce file manager";
-    license = "GPLv2+";
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.eelco ];
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/core/xfce4-panel.nix b/pkgs/desktops/xfce-4.8/core/xfce4-panel.nix
deleted file mode 100644
index e14d1acf33d..00000000000
--- a/pkgs/desktops/xfce-4.8/core/xfce4-panel.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, garcon
-, libxfce4ui, xfconf, libwnck, exo }:
-
-stdenv.mkDerivation rec {
-  name = "xfce4-panel-4.8.6";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/xfce4-panel/4.8/${name}.tar.bz2";
-    sha1 = "332fc968332e6271e1bb65d6de8de2524b0440ec";
-  };
-
-  patches = [ ./xfce4-panel-datadir.patch ];
-  patchFlags = "-p1";
-
-  buildInputs =
-    [ pkgconfig intltool gtk libxfce4util garcon libxfce4ui xfconf
-      exo libwnck
-    ];
-
-  enableParallelBuilding = true;
-
-  meta = {
-    homepage = http://www.xfce.org/;
-    description = "Xfce panel";
-    license = "GPLv2+";
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.eelco ];
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/core/xfce4-session.nix b/pkgs/desktops/xfce-4.8/core/xfce4-session.nix
deleted file mode 100644
index 0e0f1a86939..00000000000
--- a/pkgs/desktops/xfce-4.8/core/xfce4-session.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, libxfce4ui
-, libwnck, dbus_glib, xfconf, xorg, xfce4panel }:
-
-stdenv.mkDerivation rec {
-  name = "xfce4-session-4.8.2";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/xfce4-session/4.8/${name}.tar.bz2";
-    sha1 = "636c2983552861a959225e554898675152a4d812";
-  };
-
-  buildInputs =
-    [ pkgconfig intltool gtk libxfce4util libxfce4ui libwnck dbus_glib
-      xfconf xorg.iceauth xfce4panel
-    ];
-
-  meta = {
-    homepage = http://www.xfce.org/;
-    description = "Session manager for Xfce";
-    license = "GPLv2+";
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.eelco ];
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/core/xfce4-settings.nix b/pkgs/desktops/xfce-4.8/core/xfce4-settings.nix
deleted file mode 100644
index dc6e8e555b2..00000000000
--- a/pkgs/desktops/xfce-4.8/core/xfce4-settings.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, intltool, exo, gtk, libxfce4util, libxfce4ui
-, xfconf, xorg, libnotify, libxklavier }:
-
-stdenv.mkDerivation rec {
-  name = "xfce4-settings-4.8.3";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/xfce4-settings/4.8/${name}.tar.bz2";
-    sha1 = "98431633ba3ec2a4a10182bc7266904d9256949b";
-  };
-
-  buildInputs =
-    [ pkgconfig intltool exo gtk libxfce4util libxfce4ui
-      xfconf libnotify xorg.libXcursor libxklavier
-    ];
-
-  configureFlags = "--enable-pluggable-dialogs --enable-sound-settings";
-
-  meta = {
-    homepage = http://www.xfce.org/;
-    description = "Settings manager for Xfce";
-    license = "GPLv2+";
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.eelco ];
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/core/xfconf.nix b/pkgs/desktops/xfce-4.8/core/xfconf.nix
deleted file mode 100644
index e0c61d3a1f5..00000000000
--- a/pkgs/desktops/xfce-4.8/core/xfconf.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, intltool, glib, libxfce4util, dbus_glib }:
-
-stdenv.mkDerivation rec {
-  name = "xfconf-4.8.1";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/xfconf/4.8/${name}.tar.bz2";
-    sha1 = "aeab124f7c548e387b37a5476e594ef559515533";
-  };
-
-  buildInputs = [ pkgconfig intltool glib libxfce4util ];
-
-  propagatedBuildInputs = [ dbus_glib ];
-
-  meta = {
-    homepage = http://www.xfce.org/;
-    description = "Simple client-server configuration storage and query system for Xfce";
-    license = "GPLv2";
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/core/xfdesktop.nix b/pkgs/desktops/xfce-4.8/core/xfdesktop.nix
deleted file mode 100644
index 45c82f1ec02..00000000000
--- a/pkgs/desktops/xfce-4.8/core/xfdesktop.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, intltool, gtk, dbus_glib, libxfce4util
-, libxfce4ui, libwnck, xfconf, garcon, libnotify, exo }:
-
-stdenv.mkDerivation rec {
-  name = "xfdesktop-4.8.3";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/xfdesktop/4.8/${name}.tar.bz2";
-    sha1 = "b3af72a69627f860f22b37d021efd81e4e37eb55";
-  };
-
-  buildInputs =
-    [ pkgconfig intltool gtk dbus_glib libxfce4util libxfce4ui libwnck xfconf
-      garcon libnotify exo
-    ];
-
-  enableParallelBuilding = true;
-
-  meta = {
-    homepage = http://www.xfce.org/;
-    description = "Xfce desktop manager";
-    license = "GPLv2+";
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.eelco ];
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/core/xfwm4.nix b/pkgs/desktops/xfce-4.8/core/xfwm4.nix
deleted file mode 100644
index c0f89784bfb..00000000000
--- a/pkgs/desktops/xfce-4.8/core/xfwm4.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, gtk, intltool, libxfce4util
-, libxfce4ui, xfconf, libwnck, libstartup_notification, xorg }:
-
-stdenv.mkDerivation rec {
-  name = "xfwm4-4.8.3";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/xfwm4/4.8/${name}.tar.bz2";
-    sha1 = "6d27deca383e0c2fba0cede0bbe0e9aee18e9257";
-  };
-
-  buildInputs =
-    [ pkgconfig intltool gtk libxfce4util libxfce4ui xfconf
-      libwnck libstartup_notification
-      xorg.libXcomposite xorg.libXfixes xorg.libXdamage
-    ];
-
-  enableParallelBuilding = true;
-
-  meta = {
-    homepage = http://www.xfce.org/;
-    description = "Window manager for Xfce";
-    license = "GPLv2+";
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.eelco ];
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/default.nix b/pkgs/desktops/xfce-4.8/default.nix
deleted file mode 100644
index bfe7fddd738..00000000000
--- a/pkgs/desktops/xfce-4.8/default.nix
+++ /dev/null
@@ -1,94 +0,0 @@
-{ callPackage, pkgs }:
-
-rec {
-  inherit (pkgs) gtk glib;
-
-  #### SUPPORT
-
-  # The useful bits from ‘gnome-disk-utility’.
-  libgdu = callPackage ./support/libgdu.nix { };  
-
-  # Gvfs is required by Thunar for the trash feature and for volume
-  # mounting.  Should use the one from Gnome, but I don't want to mess
-  # with the Gnome packages (or pull in a zillion Gnome dependencies).
-  gvfs = callPackage ./support/gvfs.nix { };
-
-  
-  #### CORE
-
-  libxfce4util = callPackage ./core/libxfce4util.nix { };
-
-  exo = callPackage ./core/exo.nix {
-    inherit (pkgs.perlPackages) URI;
-  };
-
-  xfconf = callPackage ./core/xfconf.nix { };
-  
-  libxfcegui4 = callPackage ./core/libxfcegui4.nix {
-    inherit (pkgs.gnome) libglade;
-  };
-
-  libxfce4ui = callPackage ./core/libxfce4ui.nix { };
-
-  xfwm4 = callPackage ./core/xfwm4.nix {
-    inherit (pkgs.gnome) libwnck;
-  };
-
-  xfceutils = callPackage ./core/xfce-utils.nix { };
-
-  garcon = callPackage ./core/garcon.nix { };
-
-  xfce4panel = callPackage ./core/xfce4-panel.nix {
-    inherit (pkgs.gnome) libwnck;
-  };
-
-  xfce4session = callPackage ./core/xfce4-session.nix {
-    inherit (pkgs.gnome) libwnck;
-  };
-
-  xfce4settings = callPackage ./core/xfce4-settings.nix { };
-
-  xfdesktop = callPackage ./core/xfdesktop.nix {
-    inherit (pkgs.gnome) libwnck;
-  };
-
-  thunar = callPackage ./core/thunar.nix { };
-
-  thunar_volman = callPackage ./core/thunar-volman.nix { };
-
-  gtk_xfce_engine = callPackage ./core/gtk-xfce-engine.nix { };
-
-  xfce4_appfinder = callPackage ./core/xfce4-appfinder.nix { };
-
-
-  #### APPLICATIONS
-  
-  terminal = callPackage ./applications/terminal.nix {
-    inherit (pkgs.gnome) vte;
-  };
-
-  gigolo = callPackage ./applications/gigolo.nix { };
-
-  mousepad = callPackage ./applications/mousepad.nix { };
-
-  ristretto = callPackage ./applications/ristretto.nix { };
-
-  xfce4_notifyd = callPackage ./applications/xfce4-notifyd.nix { };
-
-  xfce4_power_manager = callPackage ./applications/xfce4-power-manager.nix { };
-
-  xfce4mixer = callPackage ./applications/xfce4-mixer.nix { };
-
-  xfce4_taskmanager = callPackage ./applications/xfce4-taskmanager.nix { };
-
-  
-  #### ART
-
-  xfce4icontheme = callPackage ./art/xfce4-icon-theme.nix { };
-
-  #### PANEL PLUGINS
-  
-  xfce4_systemload_plugin = callPackage ./panel-plugins/xfce4-systemload-plugin.nix {};
-  xfce4_cpufreq_plugin = callPackage ./panel-plugins/xfce4-cpufreq-plugin.nix {};
-  
-}
diff --git a/pkgs/desktops/xfce-4.8/panel-plugins/xfce4-cpufreq-plugin.nix b/pkgs/desktops/xfce-4.8/panel-plugins/xfce4-cpufreq-plugin.nix
deleted file mode 100644
index c3f34219464..00000000000
--- a/pkgs/desktops/xfce-4.8/panel-plugins/xfce4-cpufreq-plugin.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4panel, libxfce4ui, libxfcegui4, xfconf, gtk}:
-
-stdenv.mkDerivation rec {
-  name = "xfce4-cpufreq-plugin-1.0.0";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/panel-plugins/xfce4-cpufreq-plugin/1.0/${name}.tar.bz2";
-    sha256 = "0q2lj8a25iq9w3dynh6qvsmh19y1v7i82g46yza6gvw7fjcrmcz1";
-  };
-
-  buildInputs = [ pkgconfig intltool libxfce4util libxfce4ui xfce4panel libxfcegui4 xfconf gtk ];
-
-  meta = {
-    homepage = http://www.xfce.org/;
-    description = "CPU Freq load panel plugin for Xfce";
-    platforms = stdenv.lib.platforms.linux;
-  };
-}
diff --git a/pkgs/desktops/xfce-4.8/applications/gigolo.nix b/pkgs/desktops/xfce/applications/gigolo.nix
index 5215697bbca..b54ea8cc623 100644
--- a/pkgs/desktops/xfce-4.8/applications/gigolo.nix
+++ b/pkgs/desktops/xfce/applications/gigolo.nix
@@ -1,12 +1,15 @@
-{ stdenv, fetchurl, python, gettext, intltool, pkgconfig, gtk, gvfs}:
+{ stdenv, fetchurl, python, gettext, intltool, pkgconfig, gtk, gvfs }:
 
 stdenv.mkDerivation rec {
-  name = "gigolo-0.4.1";
-  
+  p_name  = "gigolo";
+  ver_maj = "0.4";
+  ver_min = "1";
+
   src = fetchurl {
-    url = "http://archive.xfce.org/src/apps/gigolo/0.4/${name}.tar.bz2";
+    url = "mirror://xfce/src/apps/${p_name}/${ver_maj}/${name}.tar.bz2";
     sha256 = "1y8p9bbv1a4qgbxl4vn6zbag3gb7gl8qj75cmhgrrw9zrvqbbww2";
   };
+  name = "${p_name}-${ver_maj}.${ver_min}";
 
   buildInputs = [ python gettext intltool gtk pkgconfig gvfs];
 
@@ -15,8 +18,8 @@ stdenv.mkDerivation rec {
   '';
 
   meta = {
-    homepage = http://goodies.xfce.org/projects/applications/gigolo;
-    description = "Gigolo is a frontend to easily manage connections to remote filesystems";
+    homepage = "http://goodies.xfce.org/projects/applications/${p_name}";
+    description = "A frontend to easily manage connections to remote filesystems";
     platforms = stdenv.lib.platforms.linux;
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/desktops/xfce/applications/mousepad.nix b/pkgs/desktops/xfce/applications/mousepad.nix
new file mode 100644
index 00000000000..9bc9634469c
--- /dev/null
+++ b/pkgs/desktops/xfce/applications/mousepad.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, pkgconfig, intltool, libxfce4util, libxfcegui4
+, gtk, gtksourceview, dbus, dbus_glib }:
+
+stdenv.mkDerivation rec {
+  p_name  = "mousepad";
+  ver_maj = "0.3";
+  ver_min = "0";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/apps/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0v84zwhjv2xynvisn5vmp7dbxfj4l4258m82ks7hn3adk437bwhh";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  buildInputs = [
+    pkgconfig intltool libxfce4util libxfcegui4
+    gtk gtksourceview dbus dbus_glib
+  ];
+
+  meta = {
+    homepage = http://www.xfce.org/;
+    description = "A simple text editor for Xfce";
+    license = "GPLv2+";
+  };
+}
diff --git a/pkgs/desktops/xfce/applications/ristretto.nix b/pkgs/desktops/xfce/applications/ristretto.nix
new file mode 100644
index 00000000000..a42e882710a
--- /dev/null
+++ b/pkgs/desktops/xfce/applications/ristretto.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, pkgconfig, intltool, libexif, gtk
+, exo, dbus_glib, libxfce4util, libxfce4ui, xfconf }:
+
+stdenv.mkDerivation rec {
+  p_name  = "ristretto";
+  ver_maj = "0.6";
+  ver_min = "3";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/apps/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0y9d8w1plwp4vmxs44y8k8x15i0k0xln89k6jndhv6lf57g1cs1b";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  buildInputs =
+    [ pkgconfig intltool libexif gtk dbus_glib exo libxfce4util
+      libxfce4ui xfconf
+    ];
+  preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
+
+  meta = {
+    homepage = "http://goodies.xfce.org/projects/applications/${p_name}";
+    description = "A fast and lightweight picture-viewer for the Xfce desktop environment";
+    license = "GPLv2+";
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+  };
+}
diff --git a/pkgs/desktops/xfce/applications/terminal.nix b/pkgs/desktops/xfce/applications/terminal.nix
new file mode 100644
index 00000000000..0a61e027356
--- /dev/null
+++ b/pkgs/desktops/xfce/applications/terminal.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pkgconfig, intltool, ncurses, gtk, vte, dbus_glib
+, exo, libxfce4util, libxfce4ui
+}:
+
+stdenv.mkDerivation rec {
+  p_name  = "xfce4-terminal";
+  ver_maj = "0.6";
+  ver_min = "1";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/apps/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1j6lpkq952mrl5p24y88f89wn9g0namvywhma639xxsswlkn8d31";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  buildInputs = [ pkgconfig intltool exo gtk vte libxfce4util ncurses dbus_glib libxfce4ui ];
+
+  meta = {
+    homepage = http://www.xfce.org/projects/terminal;
+    description = "A modern terminal emulator primarily for the Xfce desktop environment";
+    license = "GPLv2+";
+  };
+}
diff --git a/pkgs/desktops/xfce-4.8/applications/xfce4-mixer.nix b/pkgs/desktops/xfce/applications/xfce4-mixer.nix
index 2f1ab8a8e93..972442dc56b 100644
--- a/pkgs/desktops/xfce-4.8/applications/xfce4-mixer.nix
+++ b/pkgs/desktops/xfce/applications/xfce4-mixer.nix
@@ -1,8 +1,7 @@
-{ stdenv, fetchurl, pkgconfig, intltool, glib, gstreamer, gst_plugins_base
-, gtk, libxfce4util, libxfce4ui, xfce4panel, xfconf }:
+{ stdenv, fetchurl, pkgconfig, intltool, glib, gstreamer, gst_plugins_base, gtk
+, libxfce4util, libxfce4ui, xfce4panel, xfconf, libunique?null }:
 
 let
-
   # The usual Gstreamer plugins package has a zillion dependencies
   # that we don't need for a simple mixer, so build a minimal package.
   gst_plugins_minimal = gst_plugins_base.override {
@@ -12,16 +11,19 @@ let
 in
 
 stdenv.mkDerivation rec {
-  name = "xfce4-mixer-4.8.0";
-  
+  p_name  = "xfce4-mixer";
+  ver_maj = "4.10";
+  ver_min = "0";
+
   src = fetchurl {
-    url = "http://archive.xfce.org/src/apps/xfce4-mixer/4.8/${name}.tar.bz2";
-    sha1 = "24f3401a68f10d2c620e354a6de98e09fe808665";
+    url = "mirror://xfce/src/apps/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1pnsd00583l7p5d80rxbh58brzy3jnccwikbbbm730a33c08kid8";
   };
+  name = "${p_name}-${ver_maj}.${ver_min}";
 
   buildInputs =
     [ pkgconfig intltool glib gstreamer gst_plugins_minimal gtk
-      libxfce4util libxfce4ui xfce4panel xfconf
+      libxfce4util libxfce4ui xfce4panel xfconf libunique
     ];
 
   postInstall =
@@ -31,7 +33,7 @@ stdenv.mkDerivation rec {
     '';
 
   meta = {
-    homepage = http://www.xfce.org/projects/xfce4-mixer;
+    homepage = http://www.xfce.org/projects/xfce4-mixer; # referenced but inactive
     description = "A volume control application for the Xfce desktop environment";
     license = "GPLv2+";
     platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/desktops/xfce/applications/xfce4-notifyd.nix b/pkgs/desktops/xfce/applications/xfce4-notifyd.nix
new file mode 100644
index 00000000000..62c5bbe5220
--- /dev/null
+++ b/pkgs/desktops/xfce/applications/xfce4-notifyd.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, pkgconfig, intltool
+, gtk , libxfce4util, libxfce4ui, xfconf }:
+
+stdenv.mkDerivation rec {
+  p_name  = "xfce4-notifyd";
+  ver_maj = "0.2";
+  ver_min = "2";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/apps/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0s4ilc36sl5k5mg5727rmqims1l3dy5pwg6dk93wyjqnqbgnhvmn";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  buildInputs = [ pkgconfig intltool gtk libxfce4util libxfce4ui xfconf ];
+
+  preFixup = ''
+    rm $out/share/icons/hicolor/icon-theme.cache
+    # to be able to run the daemon we need it in PATH
+    cp -l $out/lib/xfce4/notifyd/xfce4-notifyd $out/bin
+  '';
+
+  meta = {
+    homepage = "http://goodies.xfce.org/projects/applications/${p_name}";
+    description = "Notification daemon for Xfce";
+    license = "GPLv2+";
+  };
+}
diff --git a/pkgs/desktops/xfce/applications/xfce4-taskmanager.nix b/pkgs/desktops/xfce/applications/xfce4-taskmanager.nix
new file mode 100644
index 00000000000..baef6872848
--- /dev/null
+++ b/pkgs/desktops/xfce/applications/xfce4-taskmanager.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, intltool, pkgconfig, gtk, libwnck }:
+
+stdenv.mkDerivation rec {
+  p_name  = "xfce4-taskmanager";
+  ver_maj = "1.0";
+  ver_min = "0";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/apps/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1vm9gw7j4ngjlpdhnwdf7ifx6xrrn21011almx2vwidhk2f9zvy0";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  buildInputs = [ intltool pkgconfig gtk libwnck ];
+
+  meta = {
+    homepage = "http://goodies.xfce.org/projects/applications/${p_name}";
+    description = "Easy to use task manager for Xfce";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/desktops/xfce-4.8/art/xfce4-icon-theme.nix b/pkgs/desktops/xfce/art/xfce4-icon-theme.nix
index afa934b6031..1bd257991c9 100644
--- a/pkgs/desktops/xfce-4.8/art/xfce4-icon-theme.nix
+++ b/pkgs/desktops/xfce/art/xfce4-icon-theme.nix
@@ -1,12 +1,15 @@
 { stdenv, fetchurl, pkgconfig, intltool, gtk }:
 
 stdenv.mkDerivation rec {
-  name = "xfce4-icon-theme-4.4.3";
-  
+  p_name  = "xfce4-icon-theme";
+  ver_maj = "4.4";
+  ver_min = "3";
+
   src = fetchurl {
-    url = "http://archive.xfce.org/src/art/xfce4-icon-theme/4.4/${name}.tar.bz2";
-    sha1 = "0c0d0c45cd4a7f609310db8e9d17c1c4a131a6e7";
+    url = "mirror://xfce/src/art/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1yk6rx3zr9grm4jwpjvqdkl13pisy7qn1wm5cqzmd2kbsn96cy6l";
   };
+  name = "${p_name}-${ver_maj}.${ver_min}";
 
   buildInputs = [ pkgconfig intltool gtk ];
 
diff --git a/pkgs/desktops/xfce/core/exo.nix b/pkgs/desktops/xfce/core/exo.nix
new file mode 100644
index 00000000000..3131ea679b0
--- /dev/null
+++ b/pkgs/desktops/xfce/core/exo.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pkgconfig, intltool, URI, glib, gtk, libxfce4ui, libxfce4util }:
+
+stdenv.mkDerivation rec {
+  p_name  = "exo";
+  ver_maj = "0.10";
+  ver_min = "2";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1kknxiz703q4snmry65ajm26jwjslbgpzdal6bd090m3z25q51dk";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  buildInputs = [ pkgconfig intltool URI glib gtk libxfce4ui libxfce4util ];
+
+  preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
+
+  meta = {
+    homepage = "http://www.xfce.org/projects/${p_name}";
+    description = "Application library for the Xfce desktop environment";
+    license = "GPLv2+";
+  };
+}
diff --git a/pkgs/desktops/xfce-4.8/core/garcon.nix b/pkgs/desktops/xfce/core/garcon.nix
index 7f5f18173b2..8e87212c7f7 100644
--- a/pkgs/desktops/xfce-4.8/core/garcon.nix
+++ b/pkgs/desktops/xfce/core/garcon.nix
@@ -1,12 +1,15 @@
 { stdenv, fetchurl, pkgconfig, intltool, glib, libxfce4util }:
 
 stdenv.mkDerivation rec {
-  name = "garcon-0.1.9";
-  
+  p_name  = "garcon";
+  ver_maj = "0.2";
+  ver_min = "0";
+
   src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/garcon/0.1/${name}.tar.bz2";
-    sha1 = "2eeab19bc10747a40b44afd4598a2f555eb69952";
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0v7pkvxcayi86z4f173z5l7w270f3g369sa88z59w0y0p7ns7ph2";
   };
+  name = "${p_name}-${ver_maj}.${ver_min}";
 
   buildInputs = [ pkgconfig intltool glib libxfce4util ];
 
diff --git a/pkgs/desktops/xfce-4.8/core/gtk-xfce-engine.nix b/pkgs/desktops/xfce/core/gtk-xfce-engine.nix
index 4518897cc2f..a97a11c6f12 100644
--- a/pkgs/desktops/xfce-4.8/core/gtk-xfce-engine.nix
+++ b/pkgs/desktops/xfce/core/gtk-xfce-engine.nix
@@ -1,15 +1,18 @@
 { stdenv, fetchurl, pkgconfig, intltool, gtk }:
 
 stdenv.mkDerivation rec {
-  name = "gtk-xfce-engine-2.8.1";
-  
+  p_name  = "gtk-xfce-engine";
+  ver_maj = "3.0";
+  ver_min = "1";
+
   src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/gtk-xfce-engine/2.8/${name}.tar.bz2";
-    sha1 = "d7779f07cc76585be063bc25fa91e660e1fd9c97";
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0vd0ly81540f9133abza56mlqqx1swp0j70ll8kf948sva0wy0zb";
   };
+  name = "${p_name}-${ver_maj}.${ver_min}";
 
-  buildInputs =
-    [ pkgconfig intltool gtk ];
+  #TODO: gtk3
+  buildInputs = [ pkgconfig intltool gtk ];
 
   meta = {
     homepage = http://www.xfce.org/;
diff --git a/pkgs/desktops/xfce-4.8/core/libxfcegui4.nix b/pkgs/desktops/xfce/core/libxfce4ui.nix
index 20e82a2c92f..4f0e7062e45 100644
--- a/pkgs/desktops/xfce-4.8/core/libxfcegui4.nix
+++ b/pkgs/desktops/xfce/core/libxfce4ui.nix
@@ -2,14 +2,17 @@
 , libglade, libstartup_notification }:
 
 stdenv.mkDerivation rec {
-  name = "libxfcegui4-4.8.1";
-  
+  p_name  = "libxfce4ui";
+  ver_maj = "4.10";
+  ver_min = "0";
+
   src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/libxfcegui4/4.8/${name}.tar.bz2";
-    sha1 = "246fcaa71fc8cf44dae0b4c919411231eedd662f";
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1qm31s6568cz4c8rl9fsfq0xmf7pldxm0ki62gx1cpybihlgmfd2";
   };
+  name = "${p_name}-${ver_maj}.${ver_min}";
 
-  # By default, libxfcegui4 tries to install into libglade's prefix.
+  #TODO: gladeui
   # Install into our own prefix instead.
   preConfigure =
     ''
@@ -17,7 +20,7 @@ stdenv.mkDerivation rec {
     '';
 
   buildInputs =
-    [ pkgconfig intltool gtk libxfce4util libglade
+    [ pkgconfig intltool gtk libxfce4util xfconf libglade
       libstartup_notification
     ];
 
diff --git a/pkgs/desktops/xfce-4.8/core/libxfce4util.nix b/pkgs/desktops/xfce/core/libxfce4util.nix
index 7a567d62935..88874722b7d 100644
--- a/pkgs/desktops/xfce-4.8/core/libxfce4util.nix
+++ b/pkgs/desktops/xfce/core/libxfce4util.nix
@@ -1,12 +1,15 @@
 { stdenv, fetchurl, pkgconfig, glib, intltool }:
 
 stdenv.mkDerivation rec {
-  name = "libxfce4util-4.8.2";
-  
+  p_name  = "libxfce4util";
+  ver_maj = "4.10";
+  ver_min = "0";
+
   src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/libxfce4util/4.8/${name}.tar.bz2";
-    sha1 = "e7498c2e5fca2c89dfef89e0788f10eebbd020c3";
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "13k0wwbbqvdmbj4xmk4nxdlgvrdgr5y6r3dk380mzfw053hzwy89";
   };
+  name = "${p_name}-${ver_maj}.${ver_min}";
 
   buildInputs = [ pkgconfig glib intltool ];
 
diff --git a/pkgs/desktops/xfce/core/libxfcegui4.nix b/pkgs/desktops/xfce/core/libxfcegui4.nix
new file mode 100644
index 00000000000..e30fcf22357
--- /dev/null
+++ b/pkgs/desktops/xfce/core/libxfcegui4.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, pkgconfig, intltool, gtk
+, libxfce4util, xfconf, libglade, libstartup_notification }:
+
+stdenv.mkDerivation rec {
+  p_name  = "libxfcegui4";
+  ver_maj = "4.10";
+  ver_min = "0";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0cs5im0ib0cmr1lhr5765yliqjfyxvk4kwy8h1l8bn3mj6bzk0ib";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  #TODO: gladeui
+  # By default, libxfcegui4 tries to install into libglade's prefix.
+  # Install into our own prefix instead.
+  preConfigure =
+    ''
+      configureFlags="--with-libglade-module-path=$out/lib/libglade/2.0"
+    '';
+  #NOTE: missing keyboard library support is OK according to the mailing-list
+
+  buildInputs =
+    [ pkgconfig intltool gtk libxfce4util xfconf libglade
+      libstartup_notification
+    ];
+  preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
+
+  meta = {
+    homepage = http://www.xfce.org/;
+    description = "Basic GUI library for Xfce";
+    license = "LGPLv2+";
+  };
+}
diff --git a/pkgs/desktops/xfce-4.8/core/thunar-volman.nix b/pkgs/desktops/xfce/core/thunar-volman.nix
index 490390d1bac..94fc0e369e5 100644
--- a/pkgs/desktops/xfce-4.8/core/thunar-volman.nix
+++ b/pkgs/desktops/xfce/core/thunar-volman.nix
@@ -2,22 +2,26 @@
 , xfconf, udev, libnotify }:
 
 stdenv.mkDerivation rec {
-  name = "thunar-volman-0.6.0";
-  
+  p_name  = "thunar-volman";
+  ver_maj = "0.8";
+  ver_min = "0";
+
   src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/thunar-volman/0.6/${name}.tar.bz2";
-    sha1 = "dcda936948623b342b290a78c294f71c038e832e";
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1sxw09fwyn5sr6ipxk7r8gqjyf41c2v7vkgl0l6mhy5mcb48f27z";
   };
+  name = "${p_name}-${ver_maj}.${ver_min}";
 
   buildInputs =
     [ pkgconfig intltool exo gtk udev libxfce4ui libxfce4util
       xfconf libnotify
     ];
+  preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
 
   enableParallelBuilding = true;
 
   meta = {
-    homepage = http://thunar.xfce.org/;
+    homepage = http://goodies.xfce.org/projects/thunar-plugins/thunar-volman;
     description = "Thunar extension for automatic management of removable drives and media";
     license = "GPLv2+";
     platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/desktops/xfce/core/thunar.nix b/pkgs/desktops/xfce/core/thunar.nix
new file mode 100644
index 00000000000..848fca345c5
--- /dev/null
+++ b/pkgs/desktops/xfce/core/thunar.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, pkgconfig, intltool
+, gtk, dbus_glib, libstartup_notification, libnotify, libexif, pcre, udev
+, exo, libxfce4util,  xfconf, xfce4panel
+}:
+
+stdenv.mkDerivation rec {
+  p_name  = "thunar";
+  ver_maj = "1.6";
+  ver_min = "2";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/Thunar-${ver_maj}.${ver_min}.tar.bz2";
+    sha256 = "11dx38rvkfbp91pxrprymxhimsm90gvizp277x9s5rwnwcm1ggbx";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  buildInputs = [
+    pkgconfig intltool
+    gtk dbus_glib libstartup_notification libnotify libexif pcre udev
+    exo libxfce4util xfconf xfce4panel
+  ];
+  # TODO: optionality?
+
+  enableParallelBuilding = true;
+
+  preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
+
+  meta = {
+    homepage = http://thunar.xfce.org/;
+    description = "Xfce file manager";
+    license = "GPLv2+";
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+  };
+}
diff --git a/pkgs/desktops/xfce/core/tumbler.nix b/pkgs/desktops/xfce/core/tumbler.nix
new file mode 100644
index 00000000000..a1da730b35b
--- /dev/null
+++ b/pkgs/desktops/xfce/core/tumbler.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, pkgconfig, intltool, dbus_glib, gdk_pixbuf }:
+
+stdenv.mkDerivation rec {
+  p_name  = "tumbler";
+  ver_maj = "0.1";
+  ver_min = "27";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0s9qj99b81asmlqa823nzykq8g6p9azcp2niak67y9bp52wv6q2c";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  buildInputs = [ pkgconfig intltool dbus_glib gdk_pixbuf ];
+
+  meta = {
+    homepage = http://git.xfce.org/xfce/tumbler/;
+    description = "A D-Bus thumbnailer service";
+    license = "GPLv2";
+  };
+}
diff --git a/pkgs/desktops/xfce-4.8/core/xfce-utils.nix b/pkgs/desktops/xfce/core/xfce-utils.nix
index fde8a2c3953..625780adb31 100644
--- a/pkgs/desktops/xfce-4.8/core/xfce-utils.nix
+++ b/pkgs/desktops/xfce/core/xfce-utils.nix
@@ -1,19 +1,17 @@
-{ stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, libxfce4ui }:
+{ v, h, stdenv, fetchXfce, pkgconfig, intltool, gtk, libxfce4util, libxfce4ui, dbus_glib }:
 
 stdenv.mkDerivation rec {
-  name = "xfce-utils-4.8.3";
-  
-  src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/xfce-utils/4.8/${name}.tar.bz2";
-    sha1 = "159d445b689ebbf73462a4b4baf5cce4e04afaab";
-  };
+  name = "xfce-utils-${v}";
+  src = fetchXfce.core name h;
 
   configureFlags = "--with-xsession-prefix=$(out)/share/xsessions --with-vendor-info=NixOS.org";
 
-  buildInputs = [ pkgconfig intltool gtk libxfce4util libxfce4ui ];
+  buildInputs = [ pkgconfig intltool gtk libxfce4util libxfce4ui dbus_glib ];
+
+  preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
 
   meta = {
-    homepage = http://www.xfce.org/;
+    homepage = http://www.xfce.org/projects/xfce-utils;
     description = "Utilities and scripts for Xfce";
     license = "GPLv2+";
     platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/desktops/xfce-4.8/core/xfce4-appfinder.nix b/pkgs/desktops/xfce/core/xfce4-appfinder.nix
index b8165ebb178..b4c9c790ac1 100644
--- a/pkgs/desktops/xfce-4.8/core/xfce4-appfinder.nix
+++ b/pkgs/desktops/xfce/core/xfce4-appfinder.nix
@@ -2,12 +2,15 @@
 , libxfce4ui, garcon, xfconf }:
 
 stdenv.mkDerivation rec {
-  name = "xfce4-appfinder-4.8.0";
-  
+  p_name  = "xfce4-appfinder";
+  ver_maj = "4.9"; # no 4.10 (stable) release yet
+  ver_min = "4";
+
   src = fetchurl {
-    url = "http://archive.xfce.org/src/xfce/xfce4-appfinder/4.8/${name}.tar.bz2";
-    sha1 = "444bbcbded8d2346f9b9beb57ec7adaf556811c9";
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "12lgrbd1n50w9n8xkpai98s2aw8vmjasrgypc57sp0x0qafsqaxq";
   };
+  name = "${p_name}-${ver_maj}.${ver_min}";
 
   buildInputs =
     [ pkgconfig intltool glib gtk libxfce4util libxfce4ui garcon xfconf ];
@@ -15,7 +18,7 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   meta = {
-    homepage = http://www.xfce.org/;
+    homepage = http://docs.xfce.org/xfce/xfce4-appfinder/;
     description = "Xfce application finder, a tool to locate and launch programs on your system";
     license = "GPLv2+";
     platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/desktops/xfce-4.8/core/xfce4-panel-datadir.patch b/pkgs/desktops/xfce/core/xfce4-panel-datadir.patch
index ed9df9ef36f..ed9df9ef36f 100644
--- a/pkgs/desktops/xfce-4.8/core/xfce4-panel-datadir.patch
+++ b/pkgs/desktops/xfce/core/xfce4-panel-datadir.patch
diff --git a/pkgs/desktops/xfce/core/xfce4-panel.nix b/pkgs/desktops/xfce/core/xfce4-panel.nix
new file mode 100644
index 00000000000..a026c4664f1
--- /dev/null
+++ b/pkgs/desktops/xfce/core/xfce4-panel.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, libxfce4ui
+, libwnck, exo, garcon, xfconf, libstartup_notification }:
+
+stdenv.mkDerivation rec {
+  p_name  = "xfce4-panel";
+  ver_maj = "4.10";
+  ver_min = "0";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1f8903nx6ivzircl8d8s9zna4vjgfy0qhjk5d2x19g9bmycgj89k";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  patches = [ ./xfce4-panel-datadir.patch ];
+  patchFlags = "-p1";
+
+  buildInputs =
+    [ pkgconfig intltool gtk libxfce4util exo libwnck
+      garcon xfconf libstartup_notification
+    ];
+  propagatedBuildInputs = [ libxfce4ui ];
+
+  preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = http://www.xfce.org/projects/xfce4-panel;
+    description = "Xfce panel";
+    license = "GPLv2+";
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+  };
+}
diff --git a/pkgs/desktops/xfce-4.8/applications/xfce4-power-manager.nix b/pkgs/desktops/xfce/core/xfce4-power-manager.nix
index bad3b52a6bb..1e77ba39f8f 100644
--- a/pkgs/desktops/xfce-4.8/applications/xfce4-power-manager.nix
+++ b/pkgs/desktops/xfce/core/xfce4-power-manager.nix
@@ -2,17 +2,21 @@
 , libxfce4ui, libxfce4util, libnotify, xfce4panel }:
 
 stdenv.mkDerivation rec {
-  name = "xfce4-power-manager-1.0.10";
-  
+  p_name  = "xfce4-power-manager";
+  ver_maj = "1.2";
+  ver_min = "0";
+
   src = fetchurl {
-    url = "http://archive.xfce.org/src/apps/xfce4-power-manager/1.0/${name}.tar.bz2";
-    sha1 = "64dd7a8fae9cd1cbcf6403d2f51f2281f38cca05";
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1sc4f4wci5yl3l9lk7vcsbwj6hdjshbxw9qm43s64jr882jriyyp";
   };
+  name = "${p_name}-${ver_maj}.${ver_min}";
 
   buildInputs =
     [ pkgconfig intltool gtk dbus_glib xfconf libxfce4ui libxfce4util
       libnotify xfce4panel
     ];
+  preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
 
   meta = {
     homepage = http://goodies.xfce.org/projects/applications/xfce4-power-manager;
diff --git a/pkgs/desktops/xfce/core/xfce4-session.nix b/pkgs/desktops/xfce/core/xfce4-session.nix
new file mode 100644
index 00000000000..a8e7e66c705
--- /dev/null
+++ b/pkgs/desktops/xfce/core/xfce4-session.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, libxfce4ui, xfce4panel
+, libwnck, dbus_glib, xfconf, libglade, xorg }:
+
+#TODO: gnome stuff: gconf (assistive?), keyring
+
+stdenv.mkDerivation rec {
+  p_name  = "xfce4-session";
+  ver_maj = "4.10";
+  ver_min = "0";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1kj65jkjhd0ysf0yxsf88wzpyv6n8i8qgd3gb502hf1x9jksk2mv";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  buildInputs =
+    [ pkgconfig intltool gtk libxfce4util libxfce4ui libwnck dbus_glib
+      xfconf xfce4panel libglade xorg.iceauth
+    ];
+
+  configureFlags = [ "--with-xsession-prefix=$$out" ];
+
+  preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
+
+  meta = {
+    homepage = http://www.xfce.org/projects/xfce4-session;
+    description = "Session manager for Xfce";
+    license = "GPLv2+";
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+  };
+}
diff --git a/pkgs/desktops/xfce/core/xfce4-settings.nix b/pkgs/desktops/xfce/core/xfce4-settings.nix
new file mode 100644
index 00000000000..4cbadaeb54a
--- /dev/null
+++ b/pkgs/desktops/xfce/core/xfce4-settings.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, pkgconfig, intltool, exo, gtk, libxfce4util, libxfce4ui
+, libglade, xfconf, xorg, libwnck, libnotify, libxklavier, garcon }:
+
+#TODO: optional packages
+stdenv.mkDerivation rec {
+  p_name  = "xfce4-settings";
+  ver_maj = "4.10";
+  ver_min = "0";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0zppq747z9lrxyv5zrrvpalq7hb3gfhy9p7qbldisgv7m6dz0hq8";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  buildInputs =
+    [ pkgconfig intltool exo gtk libxfce4util libxfce4ui libglade
+      xfconf xorg.libXi xorg.libXcursor libwnck libnotify libxklavier garcon
+    #gtk libxfce4util libxfcegui4 libwnck dbus_glib
+      #xfconf libglade xorg.iceauth
+    ];
+  configureFlags = "--enable-pluggable-dialogs --enable-sound-settings";
+
+  meta = {
+    homepage = http://www.xfce.org/projects/xfce4-settings;
+    description = "Settings manager for Xfce";
+    license = "GPLv2+";
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+  };
+}
diff --git a/pkgs/desktops/xfce/core/xfconf.nix b/pkgs/desktops/xfce/core/xfconf.nix
new file mode 100644
index 00000000000..e608d459106
--- /dev/null
+++ b/pkgs/desktops/xfce/core/xfconf.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pkgconfig, intltool, glib, libxfce4util, dbus_glib }:
+
+stdenv.mkDerivation rec {
+  p_name  = "xfconf";
+  ver_maj = "4.10";
+  ver_min = "0";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0xh520z0qh0ib0ijgnyrgii9h5d4pc53n6mx1chhyzfc86j1jlhp";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  #TODO: no perl bingings yet (ExtUtils::Depends, ExtUtils::PkgConfig, Glib)
+  buildInputs = [ pkgconfig intltool glib libxfce4util ];
+  propagatedBuildInputs = [ dbus_glib ];
+
+  meta = {
+    homepage = http://docs.xfce.org/xfce/xfconf/start;
+    description = "Simple client-server configuration storage and query system for Xfce";
+    license = "GPLv2";
+  };
+}
diff --git a/pkgs/desktops/xfce/core/xfdesktop.nix b/pkgs/desktops/xfce/core/xfdesktop.nix
new file mode 100644
index 00000000000..8067e1841ca
--- /dev/null
+++ b/pkgs/desktops/xfce/core/xfdesktop.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, libxfce4ui
+, libwnck, xfconf, libglade, xfce4panel, thunar, exo, garcon, libnotify }:
+
+stdenv.mkDerivation rec {
+  p_name  = "xfdesktop";
+  ver_maj = "4.10";
+  ver_min = "2";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0zbrvfj4fxnjz593brxjsjy9pv5bbf12jnbydy4pwc1ya6zf19j9";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  buildInputs =
+    [ pkgconfig intltool gtk libxfce4util libxfce4ui libwnck xfconf
+      libglade xfce4panel thunar exo garcon libnotify
+    ];
+  preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = http://www.xfce.org/projects/xfdesktop;
+    description = "Xfce desktop manager";
+    license = "GPLv2+";
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+  };
+}
diff --git a/pkgs/desktops/xfce/core/xfwm4.nix b/pkgs/desktops/xfce/core/xfwm4.nix
new file mode 100644
index 00000000000..e2fea73eaeb
--- /dev/null
+++ b/pkgs/desktops/xfce/core/xfwm4.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, pkgconfig, gtk, intltool, libglade, libxfce4util
+, libxfce4ui, xfconf, libwnck, libstartup_notification, xorg }:
+
+stdenv.mkDerivation rec {
+  p_name  = "xfwm4";
+  ver_maj = "4.10";
+  ver_min = "0";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "170zzs7adj47srsi2cl723w9pl8k8awd7w1bpzxby7hj92zmf8s9";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  #TODO: kde systray, docs
+  buildInputs =
+    [ pkgconfig intltool gtk libglade libxfce4util libxfce4ui xfconf
+      libwnck libstartup_notification
+      xorg.libXcomposite xorg.libXfixes xorg.libXdamage
+    ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = http://www.xfce.org/projects/xfwm4;
+    description = "Window manager for Xfce";
+    license = "GPLv2+";
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+  };
+}
diff --git a/pkgs/desktops/xfce/default.nix b/pkgs/desktops/xfce/default.nix
new file mode 100644
index 00000000000..03e0def7853
--- /dev/null
+++ b/pkgs/desktops/xfce/default.nix
@@ -0,0 +1,76 @@
+{ pkgs, newScope }: let
+
+callPackage = newScope (deps // xfce_self);
+
+deps = rec { # xfce-global dependency overrides should be here
+  inherit (pkgs.gnome) libglade libwnck vte gtksourceview;
+  inherit (pkgs.perlPackages) URI;
+
+  # The useful bits from ‘gnome-disk-utility’.
+  libgdu = callPackage ./support/libgdu.nix { };
+
+  # Gvfs is required by Thunar for the trash feature and for volume
+  # mounting.  Should use the one from Gnome, but I don't want to mess
+  # with the Gnome packages (or pull in a zillion Gnome dependencies).
+  gvfs = callPackage ./support/gvfs.nix { };
+};
+
+xfce_self = rec { # the lines are very long but it seems better than the even-odd line approach
+
+  #### NixOS support
+
+  inherit (deps) gvfs;
+  xinitrc = "${xfce4session}/etc/xdg/xfce4/xinitrc";
+
+  #### CORE                 from "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2"
+
+  exo             = callPackage ./core/exo.nix { };
+  garcon          = callPackage ./core/garcon.nix { };
+  gtk_xfce_engine = callPackage ./core/gtk-xfce-engine.nix { }; # ToDo: when should be used?
+  libxfce4ui      = callPackage ./core/libxfce4ui.nix { };
+  libxfce4util    = callPackage ./core/libxfce4util.nix { };
+  libxfcegui4     = callPackage ./core/libxfcegui4.nix { };
+  thunar          = callPackage ./core/thunar.nix { };
+  thunar_volman   = callPackage ./core/thunar-volman.nix { }; # ToDo: probably inside Thunar now
+  tumbler         = callPackage ./core/tumbler.nix { }; # ToDo: segfaults after some work
+  xfce4panel      = callPackage ./core/xfce4-panel.nix { }; # ToDo: impure plugins from /run/current-system/sw/lib/xfce4
+  xfce4session    = callPackage ./core/xfce4-session.nix { };
+  xfce4settings   = callPackage ./core/xfce4-settings.nix { };
+  xfce4_power_manager = callPackage ./core/xfce4-power-manager.nix { };
+  xfceutils       = null; # removed in 4.10
+  xfconf          = callPackage ./core/xfconf.nix { };
+  xfdesktop       = callPackage ./core/xfdesktop.nix { };
+  xfwm4           = callPackage ./core/xfwm4.nix { };
+
+  xfce4_appfinder = callPackage ./core/xfce4-appfinder.nix { };
+
+
+  #### APPLICATIONS         from "mirror://xfce/src/apps/${p_name}/${ver_maj}/${name}.tar.bz2"
+
+  gigolo          = callPackage ./applications/gigolo.nix { };
+  mousepad        = callPackage ./applications/mousepad.nix { };
+  ristretto       = callPackage ./applications/ristretto.nix { };
+  terminal        = xfce4terminal; # it has changed its name
+  xfce4mixer      = callPackage ./applications/xfce4-mixer.nix { };
+  xfce4notifyd    = callPackage ./applications/xfce4-notifyd.nix { };
+  xfce4taskmanager= callPackage ./applications/xfce4-taskmanager.nix { };
+  xfce4terminal   = callPackage ./applications/terminal.nix { };
+
+
+  #### ART                  from "mirror://xfce/src/art/${p_name}/${ver_maj}/${name}.tar.bz2"
+
+  xfce4icontheme  = callPackage ./art/xfce4-icon-theme.nix { };
+
+
+  #### PANEL PLUGINS        from "mirror://xfce/src/panel-plugins/${p_name}/${ver_maj}/${name}.tar.bz2"
+
+  xfce4_systemload_plugin = callPackage ./panel-plugins/xfce4-systemload-plugin.nix { };
+  xfce4_cpufreq_plugin    = callPackage ./panel-plugins/xfce4-cpufreq-plugin.nix { };
+
+}; # xfce_self
+
+in xfce_self
+
+
+
+
diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-cpufreq-plugin.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-cpufreq-plugin.nix
new file mode 100644
index 00000000000..18d043c51fd
--- /dev/null
+++ b/pkgs/desktops/xfce/panel-plugins/xfce4-cpufreq-plugin.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4panel, libxfce4ui, libxfcegui4, xfconf, gtk}:
+
+stdenv.mkDerivation rec {
+  p_name  = "xfce4-cpufreq-plugin";
+  ver_maj = "1.0";
+  ver_min = "0";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/panel-plugins/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0q2lj8a25iq9w3dynh6qvsmh19y1v7i82g46yza6gvw7fjcrmcz1";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  buildInputs = [ pkgconfig intltool libxfce4util libxfce4ui xfce4panel libxfcegui4 xfconf gtk ];
+  preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
+
+  meta = {
+    homepage = "http://goodies.xfce.org/projects/panel-plugins/${p_name}";
+    description = "CPU Freq load plugin for Xfce panel";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/desktops/xfce-4.8/panel-plugins/xfce4-systemload-plugin.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-systemload-plugin.nix
index 6d0f997500c..dda5dc89def 100644
--- a/pkgs/desktops/xfce-4.8/panel-plugins/xfce4-systemload-plugin.nix
+++ b/pkgs/desktops/xfce/panel-plugins/xfce4-systemload-plugin.nix
@@ -1,18 +1,21 @@
 { stdenv, fetchurl, pkgconfig, intltool, libxfce4util, xfce4panel, libxfce4ui, gtk}:
 
 stdenv.mkDerivation rec {
-  name = "xfce4-systemload-plugin-1.1.1";
-  
+  p_name  = "xfce4-systemload-plugin";
+  ver_maj = "1.1";
+  ver_min = "1";
+
   src = fetchurl {
-    url = "http://archive.xfce.org/src/panel-plugins/xfce4-systemload-plugin/1.1/${name}.tar.bz2";
+    url = "mirror://xfce/src/panel-plugins/${p_name}/${ver_maj}/${name}.tar.bz2";
     sha256 = "1bnrr30h6kgb37ixcq7frx2gvj2p99bpa1jyzppwjxp5x7xkxh8s";
   };
+  name = "${p_name}-${ver_maj}.${ver_min}";
 
   buildInputs = [ pkgconfig intltool libxfce4util libxfce4ui xfce4panel gtk ];
 
   meta = {
-    homepage = http://www.xfce.org/;
-    description = "System load panel plugin for Xfce";
+    homepage = "http://goodies.xfce.org/projects/panel-plugins/${p_name}";
+    description = "System load plugin for Xfce panel";
     platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/desktops/xfce-4.8/support/gvfs.nix b/pkgs/desktops/xfce/support/gvfs.nix
index f922b194f87..af70aea755a 100644
--- a/pkgs/desktops/xfce-4.8/support/gvfs.nix
+++ b/pkgs/desktops/xfce/support/gvfs.nix
@@ -2,11 +2,11 @@
 , libxml2, libxslt, docbook_xsl, libgphoto2, libtool }:
 
 stdenv.mkDerivation rec {
-  name = "gvfs-1.14.1";
+  name = "gvfs-1.14.2";
 
   src = fetchurl {
     url = "mirror://gnome/sources/gvfs/1.14/${name}.tar.xz";
-    sha256 = "0af86cd7ee7b6daca144776bdf12f2f30d3e18fdd70b4da58e1a68cea4f6716a";
+    sha256 = "1g4ghyf45jg2ajdkv2d972hbckyjh3d9jdrppai85pl9pk2dmfy3";
   };
 
   buildInputs =
diff --git a/pkgs/desktops/xfce-4.8/support/libgdu-only.patch b/pkgs/desktops/xfce/support/libgdu-only.patch
index c5873c71681..c5873c71681 100644
--- a/pkgs/desktops/xfce-4.8/support/libgdu-only.patch
+++ b/pkgs/desktops/xfce/support/libgdu-only.patch
diff --git a/pkgs/desktops/xfce-4.8/support/libgdu.nix b/pkgs/desktops/xfce/support/libgdu.nix
index 32835f0434a..32835f0434a 100644
--- a/pkgs/desktops/xfce-4.8/support/libgdu.nix
+++ b/pkgs/desktops/xfce/support/libgdu.nix
diff --git a/pkgs/development/compilers/ghc/ghc-get-packages.sh b/pkgs/development/compilers/ghc/ghc-get-packages.sh
index 9ed1455d232..71e58e66a5e 100755
--- a/pkgs/development/compilers/ghc/ghc-get-packages.sh
+++ b/pkgs/development/compilers/ghc/ghc-get-packages.sh
@@ -12,7 +12,7 @@ fi
 PATH="$2:$PATH"
 IFS=":"
 for p in $PATH; do
-  PkgDir="$p/../lib/ghc-pkgs/ghc-$version"
+  PkgDir="$p/../lib/ghc-$version/package.conf.d"
   for i in $PkgDir/*.installedconf; do
     # output takes place here
     test -f $i && echo -n " $prefix$i"
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index 376033fe239..157b25779b3 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, ghc, perl, gmp, ncurses }:
 
 stdenv.mkDerivation rec {
-  version = "7.7.20121213";
+  version = "7.7.20130223";
   name = "ghc-${version}";
 
   src = fetchurl {
     url = "http://haskell.org/ghc/dist/current/dist/${name}-src.tar.bz2";
-    sha256 = "0z9ld6271jzv3mx02vqaakirj79pm2vzxnv5a178r6v874qbzx3p";
+    sha256 = "1naw6x1mjij10h9k4biard2pkzi6zml26vv4h34asprv0h6ymdbg";
   };
 
   buildInputs = [ ghc perl gmp ncurses ];
diff --git a/pkgs/development/compilers/ghc/with-packages.nix b/pkgs/development/compilers/ghc/with-packages.nix
index 3494f63c11c..74a8253b838 100644
--- a/pkgs/development/compilers/ghc/with-packages.nix
+++ b/pkgs/development/compilers/ghc/with-packages.nix
@@ -1,117 +1,38 @@
-{stdenv, ghc, packages ? [], makeWrapper}:
+{ stdenv, ghc, packages, buildEnv, makeWrapper }:
 
-stdenv.mkDerivation rec {
-  name = "haskell-env-${ghc.name}";
-
-  allPackages = stdenv.lib.closePropagation packages;
-  buildInputs = allPackages ++ [makeWrapper];
-  propagatedBuildInputs = packages;
-
-  unpackPhase = "true";
-
-  installPhase = ''
-    numversion=$(${ghc}/bin/ghc --numeric-version)
-    majorversion=''${numversion%%.*}
-    minorversion=''${numversion#*.}
-    minorversion=''${minorversion%%.*}
-
-    if [[ $majorversion -gt 6 ]] && [[ $minorversion -gt 4 ]]; then
-      globalConf="--global-package-db"
-    else
-      globalConf="--global-conf"
-    fi
-
-    originalTopDir="${ghc}/lib/ghc-${ghc.version}"
-    originalPkgDir="$originalTopDir/package.conf.d"
-    linkedTopDir="$out/lib"
-    linkedPkgDir="$linkedTopDir/package.conf.d"
-
-    mkdir -p $out/bin
-    mkdir -p $linkedTopDir
-    mkdir -p $linkedPkgDir
-
-    echo "Linking GHC core libraries:"
-
-    echo -n "Linking $originalTopDir "
-    for f in "$originalTopDir/"*; do
-      if test -f $f; then
-        ln -s $f $linkedTopDir
-        echo -n .
-      fi
-    done
-    echo
+assert packages != [];
 
-    echo -n "Linking $originalPkgDir "
-    for f in "$originalPkgDir/"*.conf; do
-      ln -s $f $linkedPkgDir
-      echo -n .
-    done
-    echo
-
-    echo "Linking selected packages and dependencies:"
-
-    for currentPath in ${stdenv.lib.concatStringsSep " " allPackages}; do
-      currentPkgDir="$currentPath/lib/ghc-pkgs/ghc-${ghc.version}"
-      # Check if current path is a Cabal package for the current GHC
-      if test -d $currentPkgDir; then
-        echo -n "Linking $currentPath "
-        for f in "$currentPath/bin/"*; do
-          ln -s $f $out/bin
-          echo -n .
-        done
-        for f in "$currentPath/etc/bash_completion.d/"*; do
-	  mkdir -p $out/etc/bash_completion.d
-          ln -s $f $out/etc/bash_completion.d/
-          echo -n .
-        done
-	for s in 1 2 3 4 5 6 7 8 9; do
-	  for f in "$currentPath/share/man/man$s/"*; do
-	    mkdir -p $out/share/man/man$s
-            ln -sv $f $out/share/man/man$s/
-            echo -n .
-	  done
-       done
-        for f in "$currentPkgDir/"*.conf; do
-          ln -s $f $linkedPkgDir
-          echo -n .
-        done
-        echo
-      fi
-    done
-
-    echo -n "Generating package cache "
-    ${ghc}/bin/ghc-pkg $globalConf $linkedPkgDir recache
-    echo .
-
-    echo -n "Generating wrappers "
+let
+  ghc761OrLater = stdenv.lib.versionOlder "7.6.1" ghc.version;
+  packageDBFlag = if ghc761OrLater then "--package-db" else "--package-conf";
+  libDir        = "$out/lib/ghc-${ghc.version}";
+  packageCfgDir = "${libDir}/package.conf.d";
+in
+buildEnv {
+  name = "haskell-env-${ghc.name}";
+  paths = stdenv.lib.closePropagation (packages ++ [ghc]);
+  postBuild = ''
+    . ${makeWrapper}/nix-support/setup-hook
 
     for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version}; do
-      # The NIX env-vars are picked up by our patched version of ghc-paths.
-      makeWrapper ${ghc}/bin/$prg $out/bin/$prg \
-        --add-flags "-B$linkedTopDir" \
-        --set "NIX_GHC"        "$out/bin/ghc"     \
-        --set "NIX_GHCPKG"     "$out/bin/ghc-pkg" \
-        --set "NIX_GHC_LIBDIR" "$linkedTopDir"
-      echo -n .
+      rm -f $out/bin/$prg
+      makeWrapper ${ghc}/bin/$prg $out/bin/$prg         \
+        --add-flags '"-B$NIX_GHC_LIBDIR"'               \
+        --set "NIX_GHC"        "$out/bin/ghc"           \
+        --set "NIX_GHCPKG"     "$out/bin/ghc-pkg"       \
+        --set "NIX_GHC_LIBDIR" "${libDir}"
     done
 
     for prg in runghc runhaskell; do
+      rm -f $out/bin/$prg
       makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "-f $out/bin/ghc"
-      echo -n .
     done
 
     for prg in ghc-pkg ghc-pkg-${ghc.version}; do
-      makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "$globalConf $linkedPkgDir"
-      echo -n .
+      rm -f $out/bin/$prg
+      makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag} ${packageCfgDir}"
     done
 
-    for prg in hp2ps hpc hasktags hsc2hs haddock haddock-${ghc.version}; do
-      if test -x ${ghc}/bin/$prg -a ! -x $out/bin/$prg; then
-        ln -s ${ghc}/bin/$prg $out/bin/$prg && echo -n .
-      fi
-    done
-    echo
+    $out/bin/ghc-pkg recache
   '';
-
-  meta = ghc.meta;
 }
diff --git a/pkgs/development/compilers/idris/default.nix b/pkgs/development/compilers/idris/default.nix
index babaa2e2482..b5f9446b8a4 100644
--- a/pkgs/development/compilers/idris/default.nix
+++ b/pkgs/development/compilers/idris/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "idris";
-  version = "0.9.6.1";
-  sha256 = "1wy79rrm5pvg77i9nvwkcg6swsdbmg2izch48n4lj4idj0ga5g62";
+  version = "0.9.7";
+  sha256 = "0y3rnxbs2s7kxlzlc347vwpylw2p0pdz50zgkyii21gd6klqvd45";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/compilers/jhc/default.nix b/pkgs/development/compilers/jhc/default.nix
index 4b4d85df890..d36c8c2755a 100644
--- a/pkgs/development/compilers/jhc/default.nix
+++ b/pkgs/development/compilers/jhc/default.nix
@@ -1,4 +1,4 @@
-{ 
+{
   stdenv, fetchurl, perl, ghc, binary, zlib, utf8String, readline, fgl,
   regexCompat, HsSyck, random
 }:
@@ -19,11 +19,12 @@ stdenv.mkDerivation rec {
   ];
 
   meta = {
-    description = ''
-      A Haskell compiler which aims to produce the most efficient programs
-    '';
+    homepage = "http://repetae.net/computer/jhc/";
+    description = "A Haskell compiler which aims to produce the most efficient programs";
     license = stdenv.lib.licenses.gpl2;
-    maintainers = [ stdenv.lib.maintainers.aforemny ];
+
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.aforemny stdenv.lib.maintainers.simons ];
   };
 
 }
diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index 2535fb603ba..6c8c83fe056 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -4,11 +4,11 @@ let
   s= # Generated upstream information
   rec {
     baseName="sbcl";
-    version="1.1.4";
+    version="1.1.5";
     name="${baseName}-${version}";
-    hash="1k7p986hsd3yygzrsc0w68maflvhbg4gcmi3rbylyn0mi8pxb2s6";
-    url="mirror://sourceforge/project/sbcl/sbcl/${version}/sbcl-${version}-source.tar.bz2";
-    sha256="1k7p986hsd3yygzrsc0w68maflvhbg4gcmi3rbylyn0mi8pxb2s6";
+    hash="01wi9aah9rrs7rbjrjrkwjxq03kapyzm48iyhz38fvaqhl7phw78";
+    url="mirror://sourceforge/project/sbcl/sbcl/1.1.5/sbcl-1.1.5-source.tar.bz2";
+    sha256="01wi9aah9rrs7rbjrjrkwjxq03kapyzm48iyhz38fvaqhl7phw78";
   };
   buildInputs = with a; [
     clisp makeWrapper
@@ -23,9 +23,6 @@ rec {
   /* doConfigure should be removed if not needed */
   phaseNames = ["setVars" "doFixNewer" "doFixTests" "setVersion" "doPatch" "doBuild" "doInstall" "doWrap"];
 
-  patches = [ ./newglibc.patch ]; # https://bugs.launchpad.net/sbcl/+bug/1095036
-  patchFlags = "-p2";
-
   setVars = a.fullDepEntry (''
     export INSTALL_ROOT=$out
     mkdir test-home
diff --git a/pkgs/development/compilers/scala/default.nix b/pkgs/development/compilers/scala/default.nix
index a78ee06f652..e7c2c80ac55 100644
--- a/pkgs/development/compilers/scala/default.nix
+++ b/pkgs/development/compilers/scala/default.nix
@@ -28,5 +28,6 @@ stdenv.mkDerivation rec {
     '';
     homepage = http://www.scala-lang.org/;
     license = "BSD";
+    platforms = stdenv.lib.platforms.all;
   };
 }
diff --git a/pkgs/development/compilers/sdcc/default.nix b/pkgs/development/compilers/sdcc/default.nix
new file mode 100644
index 00000000000..ebc052764f2
--- /dev/null
+++ b/pkgs/development/compilers/sdcc/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, bison, flex, boost, gputils ? null }:
+
+stdenv.mkDerivation rec {
+  version = "3.2.0";
+  name = "sdcc-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/sdcc/sdcc-src-${version}.tar.bz2";
+    sha256 = "15gdl04kqpvmwvvplss5nmp3bz8rhz48dhb0wmb2v9v9sn7qj01d";
+  };
+
+  # TODO: remove this comment when gputils != null is tested
+  buildInputs = [ bison flex boost gputils ];
+
+  configureFlags = ''
+    ${if gputils == null then "--disable-pic14-port --disable-pic16-port" else ""}
+  '';
+
+  meta = {
+    description = "Small Device C Compiler";
+    longDescription = ''
+      SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
+      the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim
+      (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based
+      (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit 2000/3000,
+      Rabbit 3000A). Work is in progress on supporting the Microchip PIC16 and
+      PIC18 targets. It can be retargeted for other microprocessors.
+    '';
+    homepage = http://sdcc.sourceforge.net/;
+    license = stdenv.lib.licenses.gpl2;
+  };
+}
diff --git a/pkgs/development/interpreters/php/5.3.nix b/pkgs/development/interpreters/php/5.3.nix
index 014ce9d3b97..683ba73f8b0 100644
--- a/pkgs/development/interpreters/php/5.3.nix
+++ b/pkgs/development/interpreters/php/5.3.nix
@@ -1,6 +1,11 @@
 { stdenv, fetchurl, composableDerivation, autoconf, automake, flex, bison
 , apacheHttpd, mysql, libxml2, readline, zlib, curl, gd, postgresql, gettext
-, openssl, pkgconfig, sqlite, config, libiconv, libjpeg, libpng, freetype }:
+, openssl, pkgconfig, sqlite, config, libiconv, libjpeg, libpng, freetype
+, libxslt, libmcrypt, bzip2, icu }:
+
+let
+  libmcryptOverride = libmcrypt.override { disablePosixThreads = true; };
+in
 
 composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) version; in {
 
@@ -110,6 +115,34 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
         buildInputs = [gettext];
       };
 
+      intl = {
+        configureFlags = ["--enable-intl"];
+        buildInputs = [icu];
+      };
+
+      exif = {
+        configureFlags = ["--enable-exif"];
+      };
+
+      xsl = {
+        configureFlags = ["--with-xsl=${libxslt}"];
+        buildInputs = [libxslt];
+      };
+
+      mcrypt = {
+        configureFlags = ["--with-mcrypt=${libmcrypt}"];
+        buildInputs = [libmcryptOverride];
+      };
+
+      bz2 = {
+        configureFlags = ["--with-bz2=${bzip2}"];
+        buildInputs = [bzip2];
+      };
+
+      zip = {
+        configureFlags = ["--enable-zip"];
+      };
+
       /*
          php is build within this derivation in order to add the xdebug lines to the php.ini.
          So both Apache and command line php both use xdebug without having to configure anything.
@@ -141,12 +174,18 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
     opensslSupport = config.php.openssl or true;
     mbstringSupport = config.php.mbstring or true;
     gdSupport = config.php.gd or true;
+    intlSupport = config.php.intl or true;
+    exifSupport = config.php.exif or true;
+    xslSupport = config.php.xsl or false;
+    mcryptSupport = config.php.mcrypt or false;
+    bz2Support = config.php.bz2 or false;
+    zipSupport = config.php.zip or true;
   };
 
   configurePhase = ''
     iniFile=$out/etc/php-recommended.ini
     [[ -z "$libxml2" ]] || export PATH=$PATH:$libxml2/bin
-    ./configure --with-config-file-scan-dir=/etc --with-config-file-path=$out/etc --prefix=$out  $configureFlags
+    ./configure --with-config-file-scan-dir=/etc --with-config-file-path=$out/etc --prefix=$out $configureFlags
     echo configurePhase end
   '';
 
diff --git a/pkgs/development/interpreters/python/docs/2.6-html.nix b/pkgs/development/interpreters/python/docs/2.6-html.nix
new file mode 100644
index 00000000000..2b41f122fa9
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.6-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python26-docs-html-2.6.8";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-html.tar.bz2;
+    sha256 = "09kznik9ahmnrqw9gkr7mjv3b3zr258f2fm27n12hrrwwsaszkni";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python26
+    cp -R ./ $out/share/doc/python26/html
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.6-pdf-a4.nix b/pkgs/development/interpreters/python/docs/2.6-pdf-a4.nix
new file mode 100644
index 00000000000..ec031821a03
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.6-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python26-docs-pdf-a4-2.6.8";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-pdf-a4.tar.bz2;
+    sha256 = "07k8n9zhd59s1yn8ahsizkaqnv969p0f2c2acxgxrxhhyy842pp8";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python26
+    cp -R ./ $out/share/doc/python26/pdf-a4
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.6-pdf-letter.nix b/pkgs/development/interpreters/python/docs/2.6-pdf-letter.nix
new file mode 100644
index 00000000000..7cacf777834
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.6-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python26-docs-pdf-letter-2.6.8";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-pdf-letter.tar.bz2;
+    sha256 = "01r87m8hb7f9ql4j9zcjcrr9150nsk23sj8cy02vygr83sc1ldmq";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python26
+    cp -R ./ $out/share/doc/python26/pdf-letter
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.6-text.nix b/pkgs/development/interpreters/python/docs/2.6-text.nix
new file mode 100644
index 00000000000..eb394a3f3e2
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.6-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python26-docs-text-2.6.8";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-text.tar.bz2;
+    sha256 = "05wsdh6ilgkclgak09fq7fsx5kflkmqq8dyxi2rpydx289cw3a8c";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python26
+    cp -R ./ $out/share/doc/python26/text
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.7-html.nix b/pkgs/development/interpreters/python/docs/2.7-html.nix
new file mode 100644
index 00000000000..3885b43960f
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.7-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python27-docs-html-2.7.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-html.tar.bz2;
+    sha256 = "1hg92n0mzl9w6j33b2h0bf2vy6fsxnpxfdc3qw760vcm0y00155j";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python27
+    cp -R ./ $out/share/doc/python27/html
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.7-pdf-a4.nix b/pkgs/development/interpreters/python/docs/2.7-pdf-a4.nix
new file mode 100644
index 00000000000..d8dde17ac66
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.7-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python27-docs-pdf-a4-2.7.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-pdf-a4.tar.bz2;
+    sha256 = "13da88panq5b6qfhf8k4dgqgxkg4ydcac5cx69a3f35s1w90xdjr";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python27
+    cp -R ./ $out/share/doc/python27/pdf-a4
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.7-pdf-letter.nix b/pkgs/development/interpreters/python/docs/2.7-pdf-letter.nix
new file mode 100644
index 00000000000..32581cd229a
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.7-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python27-docs-pdf-letter-2.7.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-pdf-letter.tar.bz2;
+    sha256 = "0x41phsdrpivhzkchswsliyx3a10n7gzc9irkrw6rz22j81bfydg";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python27
+    cp -R ./ $out/share/doc/python27/pdf-letter
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/2.7-text.nix b/pkgs/development/interpreters/python/docs/2.7-text.nix
new file mode 100644
index 00000000000..59019238301
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/2.7-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python27-docs-text-2.7.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-text.tar.bz2;
+    sha256 = "1rxlb3jhh3892y65i45nk1y2lx981fr22a5hmfkp9gvjvdykjnzp";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python27
+    cp -R ./ $out/share/doc/python27/text
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.0-html.nix b/pkgs/development/interpreters/python/docs/3.0-html.nix
new file mode 100644
index 00000000000..fb793da3e5f
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.0-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python30-docs-html-3.0.1";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.0.1/python-3.0.1-docs-html.tar.bz2;
+    sha256 = "0ybjnhg8qfr9kc4axm5xlghkz9dmsg6b1caj6m4gz28q89vggv3c";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python30
+    cp -R ./ $out/share/doc/python30/html
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.0-pdf-a4.nix b/pkgs/development/interpreters/python/docs/3.0-pdf-a4.nix
new file mode 100644
index 00000000000..e4b185a11c6
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.0-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python30-docs-pdf-a4-3.0.1";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.0.1/python-3.0.1-docs-pdf-a4.tar.bz2;
+    sha256 = "1qgcydqxxhy317lkzzs2v5as4hcwcblir8y3mdr173qsg51iggra";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python30
+    cp -R ./ $out/share/doc/python30/pdf-a4
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.0-pdf-letter.nix b/pkgs/development/interpreters/python/docs/3.0-pdf-letter.nix
new file mode 100644
index 00000000000..1373ae21284
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.0-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python30-docs-pdf-letter-3.0.1";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.0.1/python-3.0.1-docs-pdf-letter.tar.bz2;
+    sha256 = "1x59q0k6fv55vvpsgr5xcq66k5zsd0f142cp6aa4rb6c81i31yml";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python30
+    cp -R ./ $out/share/doc/python30/pdf-letter
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.0-text.nix b/pkgs/development/interpreters/python/docs/3.0-text.nix
new file mode 100644
index 00000000000..c37fa99f7c5
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.0-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python30-docs-text-3.0.1";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.0.1/python-3.0.1-docs-text.tar.bz2;
+    sha256 = "12qlh9ywbnw50wk5siq7lmhr935dd16q3vjbii6gfv0g80b1byzx";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python30
+    cp -R ./ $out/share/doc/python30/text
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.1-html.nix b/pkgs/development/interpreters/python/docs/3.1-html.nix
new file mode 100644
index 00000000000..625aa181c63
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.1-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python31-docs-html-3.1.5";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.1.5/python-3.1.5-docs-html.tar.bz2;
+    sha256 = "187shb92218k0i07hj9ak1kqbqjcxkivmwxlzj18v791l7x7qcpz";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python31
+    cp -R ./ $out/share/doc/python31/html
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.1-pdf-a4.nix b/pkgs/development/interpreters/python/docs/3.1-pdf-a4.nix
new file mode 100644
index 00000000000..564103dd101
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.1-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python31-docs-pdf-a4-3.1.5";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.1.5/python-3.1.5-docs-pdf-a4.tar.bz2;
+    sha256 = "0kbj6b43gnwlb1czkzmirasmc31j10plq0rlb9s9rh8phqnbmhx1";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python31
+    cp -R ./ $out/share/doc/python31/pdf-a4
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.1-pdf-letter.nix b/pkgs/development/interpreters/python/docs/3.1-pdf-letter.nix
new file mode 100644
index 00000000000..d6e3009f59c
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.1-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python31-docs-pdf-letter-3.1.5";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.1.5/python-3.1.5-docs-pdf-letter.tar.bz2;
+    sha256 = "0s202vrjfa8dnp3vpfjb21bmqym9wyj8jn2glgwjzk63z6fwb60i";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python31
+    cp -R ./ $out/share/doc/python31/pdf-letter
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.1-text.nix b/pkgs/development/interpreters/python/docs/3.1-text.nix
new file mode 100644
index 00000000000..3ce559e3ecc
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.1-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python31-docs-text-3.1.5";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.1.5/python-3.1.5-docs-text.tar.bz2;
+    sha256 = "1jsfgfgdi1i2l3lhdk7ss5gwrcg3qhhh8syfrwz8xrv2klmmmn9b";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python31
+    cp -R ./ $out/share/doc/python31/text
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.2-html.nix b/pkgs/development/interpreters/python/docs/3.2-html.nix
new file mode 100644
index 00000000000..14690100548
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.2-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python32-docs-html-3.2.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.2.3/python-3.2.3-docs-html.tar.bz2;
+    sha256 = "058pryg0gn0rlpswkj1z0xvpr39s3ymx3dwqfhhf83w0mlysdm0x";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python32
+    cp -R ./ $out/share/doc/python32/html
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.2-pdf-a4.nix b/pkgs/development/interpreters/python/docs/3.2-pdf-a4.nix
new file mode 100644
index 00000000000..729101b2d01
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.2-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python32-docs-pdf-a4-3.2.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.2.3/python-3.2.3-docs-pdf-a4.tar.bz2;
+    sha256 = "1lw1sbk3nx70k2zxgjc36ryvyzlxndzsvhrxyzdy9sjfhasyd807";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python32
+    cp -R ./ $out/share/doc/python32/pdf-a4
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.2-pdf-letter.nix b/pkgs/development/interpreters/python/docs/3.2-pdf-letter.nix
new file mode 100644
index 00000000000..da9b0ce4dcc
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.2-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python32-docs-pdf-letter-3.2.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.2.3/python-3.2.3-docs-pdf-letter.tar.bz2;
+    sha256 = "199ibzslw3zrwjd49582vc5q6ghp5ig8zalvslawz0xkz1226wg2";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python32
+    cp -R ./ $out/share/doc/python32/pdf-letter
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.2-text.nix b/pkgs/development/interpreters/python/docs/3.2-text.nix
new file mode 100644
index 00000000000..3ceef2431f7
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.2-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python32-docs-text-3.2.3";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.2.3/python-3.2.3-docs-text.tar.bz2;
+    sha256 = "1jdc9rj2b4vsbvg5mq6vcdfa2b72avhhvjw7rn7k3kl521cvxs09";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python32
+    cp -R ./ $out/share/doc/python32/text
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.3-html.nix b/pkgs/development/interpreters/python/docs/3.3-html.nix
new file mode 100644
index 00000000000..055224dd740
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.3-html.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python33-docs-html-3.3.0";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-html.tar.bz2;
+    sha256 = "0vv24b9qi7gznv687ik0pa2w1rq9grqivy44znvj2ysjfg7mc2c1";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python33
+    cp -R ./ $out/share/doc/python33/html
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.3-pdf-a4.nix b/pkgs/development/interpreters/python/docs/3.3-pdf-a4.nix
new file mode 100644
index 00000000000..8c6b842d0b9
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.3-pdf-a4.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python33-docs-pdf-a4-3.3.0";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-pdf-a4.tar.bz2;
+    sha256 = "1y6n13bxlw8a11khy3ynfbz8z0kpf2lvh32dvy8scyw3hrk6wdxp";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python33
+    cp -R ./ $out/share/doc/python33/pdf-a4
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.3-pdf-letter.nix b/pkgs/development/interpreters/python/docs/3.3-pdf-letter.nix
new file mode 100644
index 00000000000..046abe8f83d
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.3-pdf-letter.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python33-docs-pdf-letter-3.3.0";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-pdf-letter.tar.bz2;
+    sha256 = "0mcj1i47nx81fc9zk1cic4c4p139qjcqlzf4hnnkzvb3jcgy5z6k";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python33
+    cp -R ./ $out/share/doc/python33/pdf-letter
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/3.3-text.nix b/pkgs/development/interpreters/python/docs/3.3-text.nix
new file mode 100644
index 00000000000..4d99c25bf59
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/3.3-text.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "python33-docs-text-3.3.0";
+  src = fetchurl {
+    url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-text.tar.bz2;
+    sha256 = "10vk2fixg1aglqmsf89kn98rlirrbhnrk1285vzfbynf2iavxw0n";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/python33
+    cp -R ./ $out/share/doc/python33/text
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/python/docs/default.nix b/pkgs/development/interpreters/python/docs/default.nix
new file mode 100644
index 00000000000..16ade3af3f9
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/default.nix
@@ -0,0 +1,89 @@
+{ stdenv, fetchurl, lib }:
+
+let
+pythonDocs = {
+  html = {
+    recurseForDerivations = true;
+    python33 = import ./3.3-html.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python32 = import ./3.2-html.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python31 = import ./3.1-html.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python30 = import ./3.0-html.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python27 = import ./2.7-html.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python26 = import ./2.6-html.nix {
+      inherit stdenv fetchurl lib;
+    };
+  };
+  pdf_a4 = {
+    recurseForDerivations = true;
+    python33 = import ./3.3-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python32 = import ./3.2-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python31 = import ./3.1-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python30 = import ./3.0-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python27 = import ./2.7-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python26 = import ./2.6-pdf-a4.nix {
+      inherit stdenv fetchurl lib;
+    };
+  };
+  pdf_letter = {
+    recurseForDerivations = true;
+    python33 = import ./3.3-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python32 = import ./3.2-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python31 = import ./3.1-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python30 = import ./3.0-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python27 = import ./2.7-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python26 = import ./2.6-pdf-letter.nix {
+      inherit stdenv fetchurl lib;
+    };
+  };
+  text = {
+    recurseForDerivations = true;
+    python33 = import ./3.3-text.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python32 = import ./3.2-text.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python31 = import ./3.1-text.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python30 = import ./3.0-text.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python27 = import ./2.7-text.nix {
+      inherit stdenv fetchurl lib;
+    };
+    python26 = import ./2.6-text.nix {
+      inherit stdenv fetchurl lib;
+    };
+  };
+}; in pythonDocs
diff --git a/pkgs/development/interpreters/python/docs/generate.sh b/pkgs/development/interpreters/python/docs/generate.sh
new file mode 100755
index 00000000000..bebefc10ccd
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/generate.sh
@@ -0,0 +1,59 @@
+#!/usr/bin/env bash
+
+TYPES="html pdf-a4 pdf-letter text"
+URL=http://docs.python.org/ftp/python/doc/VERSION/python-VERSION-docs-TYPE.tar.bz2
+VERSIONS=$(curl http://www.python.org/download/releases/ 2>/dev/null | grep "releases/[123456789]"| cut -d/ -f4 |grep -v "^[12].[012345]" |grep -v "^1.6.1")
+echo "Generating expressions for:
+${VERSIONS}
+"
+
+
+cat >default.nix <<EOF
+{ stdenv, fetchurl, lib }:
+
+let
+pythonDocs = {
+EOF
+
+for type in $TYPES; do
+    cat >>default.nix <<EOF
+  ${type/-/_} = {
+    recurseForDerivations = true;
+EOF
+
+    for version in $VERSIONS; do
+        major=$(echo -n ${version}| cut -d. -f1)
+        minor=$(echo -n ${version}| cut -d. -f2)
+        outfile=${major}.${minor}-${type}.nix
+        hash=
+        if [ -e ${outfile} ]; then
+            currentversion=$(grep "url =" ${outfile} |cut -d/ -f7)
+            if [ ${version} = ${currentversion} ]; then
+                hash=$(grep sha256 ${outfile} | cut -d'"' -f2)
+            fi
+        fi
+        echo "Generating ${outfile}"
+        url=$(echo -n $URL |sed -e "s,VERSION,${version},g" -e "s,TYPE,${type},")
+        sha=$(nix-prefetch-url ${url} ${hash})
+
+        sed -e "s,VERSION,${version}," \
+            -e "s,MAJOR,${major}," \
+            -e "s,MINOR,${minor}," \
+            -e "s,TYPE,${type}," \
+            -e "s,URL,${url}," \
+            -e "s,SHA,${sha}," < template.nix > ${outfile}
+
+        attrname=python${major}${minor}
+        cat >>default.nix <<EOF
+    ${attrname} = import ./${major}.${minor}-${type}.nix {
+      inherit stdenv fetchurl lib;
+    };
+EOF
+
+        echo "done."
+        echo
+    done
+    echo "  };" >> default.nix
+done
+
+echo "}; in pythonDocs" >> default.nix
diff --git a/pkgs/development/interpreters/python/docs/template.nix b/pkgs/development/interpreters/python/docs/template.nix
new file mode 100644
index 00000000000..cc92f71bc1e
--- /dev/null
+++ b/pkgs/development/interpreters/python/docs/template.nix
@@ -0,0 +1,18 @@
+# This file was generated and will be overwritten by ./generate.sh
+
+{ stdenv, fetchurl, lib }:
+
+stdenv.mkDerivation rec {
+  name = "pythonMAJORMINOR-docs-TYPE-VERSION";
+  src = fetchurl {
+    url = URL;
+    sha256 = "SHA";
+  };
+  installPhase = ''
+    mkdir -p $out/share/doc/pythonMAJORMINOR
+    cp -R ./ $out/share/doc/pythonMAJORMINOR/TYPE
+  '';
+  meta = {
+    maintainers = [ lib.maintainers.chaoflow ];
+  };
+}
diff --git a/pkgs/development/interpreters/ruby/fix-gem-nix-versions.patch b/pkgs/development/interpreters/ruby/fix-gem-nix-versions.patch
new file mode 100644
index 00000000000..c67eaff2ac5
--- /dev/null
+++ b/pkgs/development/interpreters/ruby/fix-gem-nix-versions.patch
@@ -0,0 +1,35 @@
+diff --git a/lib/nix/gem-nix-command.rb b/lib/nix/gem-nix-command.rb
+index 8d3733e..ba942ff 100644
+--- a/lib/nix/gem-nix-command.rb
++++ b/lib/nix/gem-nix-command.rb
+@@ -108,11 +108,12 @@ class Gem::Commands::NixCommand < Gem::Command
+ 
+       # args to dep informations
+       args.each { |arg|
+-        if arg =~ /(.+)-?(.*)?/ then
++        if arg =~ /(.+)-([0-9][^-]+)/ then
+           gem_name = $1
+-          version =  $2.empty? ?  Gem::Requirement.default : Gem::Version.new($2)
++          version =  Gem::Version.new($2)
+         else
+-          raise Gem::CommandLineError, "couldn't parse arg. expected: name or name-version"
++          gem_name = arg
++          version =  Gem::Requirement.default
+         end
+ 
+         adddep(Gem::Dependency.new gem_name, version)
+@@ -162,7 +163,13 @@ class Gem::Commands::NixCommand < Gem::Command
+     spec, source_uri = find_gem_with_source(dep)
+     full_name = spec.full_name
+ 
+-    return if @gems_with_deps.key?(full_name)
++    if @gems_with_deps.key?(full_name)
++      unless @gems_with_deps[full_name].nil?
++        return @gems_with_deps[full_name][0]
++      else
++        return nil
++      end
++    end
+     @gems_with_deps[full_name] = nil # there maybe circular dependencies. thus mark this gem seen as early as possible
+ 
+     # development deps can't be found. Some are old. Thus only add rutime dependencies
diff --git a/pkgs/development/interpreters/ruby/generated.nix b/pkgs/development/interpreters/ruby/generated.nix
index 68c83a8e78c..2f276fc163a 100644
--- a/pkgs/development/interpreters/ruby/generated.nix
+++ b/pkgs/development/interpreters/ruby/generated.nix
@@ -10,53 +10,66 @@ g: # Get dependencies from patched gems
     activerecord = g.activerecord_3_2_12;
     activeresource = g.activeresource_3_2_12;
     activesupport = g.activesupport_3_2_12;
+    addressable = g.addressable_2_3_3;
     arel = g.arel_3_0_2;
     atoulme_Antwrap = g.atoulme_Antwrap_0_7_4;
     autotest_rails = g.autotest_rails_4_1_2;
-    aws_sdk = g.aws_sdk_1_8_3;
-    builder = g.builder_3_1_4;
+    aws_sdk = g.aws_sdk_1_8_5;
+    bitbucket_backup = g.bitbucket_backup_0_2_2;
+    builder = g.builder_3_2_0;
     buildr = g.buildr_1_4_10;
-    bundler = g.bundler_1_2_4;
-    childprocess = g.childprocess_0_3_8;
+    bundler = g.bundler_1_3_4;
+    childprocess = g.childprocess_0_3_9;
+    chronic = g.chronic_0_9_1;
     daemons = g.daemons_1_1_9;
     diff_lcs = g.diff_lcs_1_1_3;
+    dimensions = g.dimensions_1_2_0;
+    em_resolv_replace = g.em_resolv_replace_1_1_3;
     erubis = g.erubis_2_7_0;
-    eventmachine = g.eventmachine_1_0_0;
+    eventmachine = g.eventmachine_1_0_3;
+    eventmachine_tail = g.eventmachine_tail_0_6_4;
     fakes3 = g.fakes3_0_1_5;
+    faraday = g.faraday_0_8_6;
+    faraday_middleware = g.faraday_middleware_0_8_8;
     ffi = g.ffi_1_4_0;
-    foreman = g.foreman_0_61_0;
-    highline = g.highline_1_6_2;
+    file_tail = g.file_tail_1_0_12;
+    foreman = g.foreman_0_62_0;
+    highline = g.highline_1_6_15;
     hike = g.hike_1_2_1;
     hoe = g.hoe_3_1_0;
-    i18n = g.i18n_0_6_1;
+    i18n = g.i18n_0_6_4;
     journey = g.journey_1_0_4;
     jruby_pageant = g.jruby_pageant_1_1_1;
-    jsduck = g.jsduck_4_6_1;
+    jsduck = g.jsduck_4_6_2;
     json = g.json_1_7_7;
     json_pure = g.json_pure_1_7_7;
-    libv8 = g.libv8_3_3_10_4_x86_64_linux;
+    libv8 = g.libv8_3_3_10_4;
     macaddr = g.macaddr_1_6_1;
     mail = g.mail_2_4_4;
     mime_types = g.mime_types_1_21;
     minitar = g.minitar_0_5_3;
     multi_json = g.multi_json_1_6_1;
+    multipart_post = g.multipart_post_1_2_0;
     net_sftp = g.net_sftp_2_0_5;
-    net_ssh = g.net_ssh_2_6_5;
+    net_ssh = g.net_ssh_2_6_6;
     nix = g.nix_0_1_1;
     nokogiri = g.nokogiri_1_5_6;
+    papertrail = g.papertrail_0_9_7;
+    papertrail_cli = g.papertrail_cli_0_9_3;
     parallel = g.parallel_0_6_2;
     polyglot = g.polyglot_0_3_3;
     rack = g.rack_1_5_2;
     rack_cache = g.rack_cache_1_2;
-    rack_protection = g.rack_protection_1_3_2;
+    rack_protection = g.rack_protection_1_5_0;
     rack_ssl = g.rack_ssl_1_3_3;
     rack_test = g.rack_test_0_6_2;
     rails = g.rails_3_2_12;
     railties = g.railties_3_2_12;
     rake = g.rake_10_0_3;
     rb_fsevent = g.rb_fsevent_0_9_3;
-    rdiscount = g.rdiscount_2_0_7;
-    rdoc = g.rdoc_3_12_1;
+    rdiscount = g.rdiscount_2_0_7_1;
+    rdoc = g.rdoc_3_12_2;
+    remote_syslog = g.remote_syslog_1_6_13;
     rjb = g.rjb_1_4_6;
     rspec = g.rspec_2_11_0;
     rspec_core = g.rspec_core_2_11_1;
@@ -64,23 +77,27 @@ g: # Get dependencies from patched gems
     rspec_mocks = g.rspec_mocks_2_11_3;
     rubyforge = g.rubyforge_2_0_4;
     rubyzip = g.rubyzip_0_9_9;
-    sass = g.sass_3_2_5;
-    selenium_webdriver = g.selenium_webdriver_2_30_0;
+    sass = g.sass_3_2_7;
+    selenium_webdriver = g.selenium_webdriver_2_31_0;
+    servolux = g.servolux_0_10_0;
     sinatra = g.sinatra_1_3_2;
     sprockets = g.sprockets_2_2_2;
+    syslog_protocol = g.syslog_protocol_0_9_2;
     systemu = g.systemu_2_5_2;
     therubyracer = g.therubyracer_0_10_2;
     thin = g.thin_1_5_0;
     thor = g.thor_0_17_0;
-    tilt = g.tilt_1_3_3;
+    tilt = g.tilt_1_3_5;
+    tins = g.tins_0_7_2;
     treetop = g.treetop_1_4_12;
-    tzinfo = g.tzinfo_0_3_35;
+    tzinfo = g.tzinfo_0_3_37;
     uuid = g.uuid_2_3_7;
     uuidtools = g.uuidtools_2_1_3;
     websocket = g.websocket_1_0_7;
     xml_simple = g.xml_simple_1_1_1;
+    yajl_ruby = g.yajl_ruby_1_1_0;
   };
-  gem_nix_args = [ ''autotest-rails'' ''aws-sdk'' ''buildr'' ''fakes3'' ''foreman'' ''jsduck'' ''nix'' ''rails'' ''rake'' ''rb-fsevent'' ''sass'' ''selenium-webdriver'' ''sinatra-1.3.2'' ''thin'' ''uuid'' ];
+  gem_nix_args = [ ''autotest-rails'' ''aws-sdk'' ''bitbucket-backup'' ''buildr'' ''fakes3'' ''foreman'' ''jsduck'' ''nix'' ''papertrail-cli'' ''rails'' ''rake'' ''rb-fsevent'' ''remote_syslog'' ''sass'' ''selenium-webdriver'' ''sinatra-1.3.2'' ''thin'' ''uuid'' ];
   gems = {
     ZenTest_4_9_0 = {
       basename = ''ZenTest'';
@@ -154,7 +171,7 @@ installed versions.'';
         longDescription = ''Databases on Rails. Build a persistent domain model by mapping database tables to Ruby classes. Strong conventions for associations, validations, aggregations, migrations, and testing come baked-in.'';
       };
       name = ''activerecord-3.2.12'';
-      requiredGems = [ g.activesupport_3_2_12 g.activemodel_3_2_12 g.arel_3_0_2 g.tzinfo_0_3_35 ];
+      requiredGems = [ g.activesupport_3_2_12 g.activemodel_3_2_12 g.arel_3_0_2 g.tzinfo_0_3_37 ];
       sha256 = ''0fl8iyv3gcy72y79iv4ccyck8ik02rrl3pdy7yxfhlnqgryp8syi'';
     };
     activeresource_3_2_12 = {
@@ -176,9 +193,23 @@ installed versions.'';
         longDescription = ''A toolkit of support libraries and Ruby core extensions extracted from the Rails framework. Rich support for multibyte strings, internationalization, time zones, and testing.'';
       };
       name = ''activesupport-3.2.12'';
-      requiredGems = [ g.i18n_0_6_1 g.multi_json_1_6_1 ];
+      requiredGems = [ g.i18n_0_6_4 g.multi_json_1_6_1 ];
       sha256 = ''1giqkprxjf5gyfyhn5nz9q8a5gi3v8irxhkpqr00zc5fw1azllsg'';
     };
+    addressable_2_3_3 = {
+      basename = ''addressable'';
+      meta = {
+        description = ''URI Implementation'';
+        homepage = ''http://addressable.rubyforge.org/'';
+        longDescription = ''Addressable is a replacement for the URI implementation that is part of
+Ruby's standard library. It more closely conforms to the relevant RFCs and
+adds support for IRIs and URI templates.
+'';
+      };
+      name = ''addressable-2.3.3'';
+      requiredGems = [  ];
+      sha256 = ''0nn583ba8kq4hhpr4lr2zzpm4r0mga0zfalxxpa6a4v27q71v5hh'';
+    };
     arel_3_0_2 = {
       basename = ''arel'';
       meta = {
@@ -231,16 +262,27 @@ rails support and extra plugins for migrations and fixtures.'';
       requiredGems = [ g.ZenTest_4_9_0 ];
       sha256 = ''1wkb5jayb39yx0i8ly7sibygf9f9c3w24jg2z1qgm135zlb070v4'';
     };
-    aws_sdk_1_8_3 = {
+    aws_sdk_1_8_5 = {
       basename = ''aws_sdk'';
       meta = {
         description = ''AWS SDK for Ruby'';
         homepage = ''http://aws.amazon.com/sdkforruby'';
         longDescription = ''AWS SDK for Ruby'';
       };
-      name = ''aws-sdk-1.8.3'';
+      name = ''aws-sdk-1.8.5'';
       requiredGems = [ g.uuidtools_2_1_3 g.nokogiri_1_5_6 g.json_1_7_7 ];
-      sha256 = ''0ggvwiya4swyjyswfgwhzw09hap2slz7djp0svq22y7j0xci1axy'';
+      sha256 = ''0rhkkkfsw0qzckn99mnvpbnl7b1kysma3x8bbqwah2x438kwygpb'';
+    };
+    bitbucket_backup_0_2_2 = {
+      basename = ''bitbucket_backup'';
+      meta = {
+        description = ''A tool to backup Bitbucket repos.'';
+        homepage = ''https://bitbucket.org/seth/bitbucket-backup'';
+        longDescription = ''A tool to backup Bitbucket repos.'';
+      };
+      name = ''bitbucket-backup-0.2.2'';
+      requiredGems = [ g.highline_1_6_15 g.json_1_7_7 ];
+      sha256 = ''1kzg6pkzw04n96i6mhb74gpg4c899wly5fc2m1y6m2xvn71qksys'';
     };
     builder_3_0_4 = {
       basename = ''builder'';
@@ -274,7 +316,7 @@ simple to do.  Currently the following builder objects are supported:
       requiredGems = [  ];
       sha256 = ''0w6xsq9vyvzdy0xb52sajgipr9ml2bbpivk6dxm69c6987dk7him'';
     };
-    builder_3_1_4 = {
+    builder_3_2_0 = {
       basename = ''builder'';
       meta = {
         description = ''Builders for MarkUp.'';
@@ -286,9 +328,9 @@ simple to do.  Currently the following builder objects are supported:
 * XML Events
 '';
       };
-      name = ''builder-3.1.4'';
+      name = ''builder-3.2.0'';
       requiredGems = [  ];
-      sha256 = ''1p0bjy1vb0zbswd6bsh5qda0f0br53p8vak8cm7hls62094r405p'';
+      sha256 = ''0f2cpfx6lpazb1wrz3lf06qp6f0qf0gdq5z8xnhkplc3fz3kslb0'';
     };
     buildr_1_4_10 = {
       basename = ''buildr'';
@@ -303,30 +345,41 @@ for those one-off tasks, with a language that's a joy to use.
 '';
       };
       name = ''buildr-1.4.10'';
-      requiredGems = [ g.rake_0_9_2_2 g.builder_3_1_3 g.net_ssh_2_6_0 g.net_sftp_2_0_5 g.rubyzip_0_9_9 g.highline_1_6_2 g.json_pure_1_7_5 g.rubyforge_2_0_4 g.hoe_3_1_0 g.rjb_1_4_2 g.atoulme_Antwrap_0_7_4 g.diff_lcs_1_1_3 g.rspec_expectations_2_11_3 g.rspec_mocks_2_11_3 g.rspec_core_2_11_1 g.rspec_2_11_0 g.xml_simple_1_1_1 g.minitar_0_5_3 g.bundler_1_2_4 ];
+      requiredGems = [ g.rake_0_9_2_2 g.builder_3_1_3 g.net_ssh_2_6_0 g.net_sftp_2_0_5 g.rubyzip_0_9_9 g.highline_1_6_2 g.json_pure_1_7_5 g.rubyforge_2_0_4 g.hoe_3_1_0 g.rjb_1_4_2 g.atoulme_Antwrap_0_7_4 g.diff_lcs_1_1_3 g.rspec_expectations_2_11_3 g.rspec_mocks_2_11_3 g.rspec_core_2_11_1 g.rspec_2_11_0 g.xml_simple_1_1_1 g.minitar_0_5_3 g.bundler_1_3_4 ];
       sha256 = ''1x192r8ab5zr9rlp1i9b3pi3y74f9pj2w491wkgshgwj22akh6vn'';
     };
-    bundler_1_2_4 = {
+    bundler_1_3_4 = {
       basename = ''bundler'';
       meta = {
         description = ''The best way to manage your application's dependencies'';
         homepage = ''http://gembundler.com'';
         longDescription = ''Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably'';
       };
-      name = ''bundler-1.2.4'';
+      name = ''bundler-1.3.4'';
       requiredGems = [  ];
-      sha256 = ''0p90abn29wvg6ic1230f4dj7zs55r9r772b0xq02fwqd0ry3pdgl'';
+      sha256 = ''1vgrc71nhnqlrg08zvs63afa1z9kzn2vvn95b14dvy14k2br3qhj'';
     };
-    childprocess_0_3_8 = {
+    childprocess_0_3_9 = {
       basename = ''childprocess'';
       meta = {
         description = ''This gem aims at being a simple and reliable solution for controlling external programs running in the background on any Ruby / OS combination.'';
         homepage = ''http://github.com/jarib/childprocess'';
         longDescription = ''This gem aims at being a simple and reliable solution for controlling external programs running in the background on any Ruby / OS combination.'';
       };
-      name = ''childprocess-0.3.8'';
+      name = ''childprocess-0.3.9'';
       requiredGems = [ g.ffi_1_4_0 ];
-      sha256 = ''08rp4krw0g60567ih4w51ndlq2pg92al0dycy0bs0m3msq68nlq4'';
+      sha256 = ''0jbz2ix7ff9ry8717lhcq9w8j8yd45akw48giwgdqccay5mlph7d'';
+    };
+    chronic_0_9_1 = {
+      basename = ''chronic'';
+      meta = {
+        description = ''Natural language date/time parsing.'';
+        homepage = ''http://github.com/mojombo/chronic'';
+        longDescription = ''Chronic is a natural language date/time parser written in pure Ruby.'';
+      };
+      name = ''chronic-0.9.1'';
+      requiredGems = [  ];
+      sha256 = ''0kspaxpfy7yvyk1lvpx31w852qfj8wb9z04mcj5bzi70ljb9awqk'';
     };
     daemons_1_1_9 = {
       basename = ''daemons'';
@@ -364,6 +417,27 @@ is the MIT license.'';
       requiredGems = [  ];
       sha256 = ''15wqs3md9slif6ag43vp6gw63r3a2zdqiyfapnnzkb7amgg930pv'';
     };
+    dimensions_1_2_0 = {
+      basename = ''dimensions'';
+      meta = {
+        description = ''Pure Ruby dimension measurement for GIF, PNG, JPEG and TIFF images'';
+        homepage = ''https://github.com/sstephenson/dimensions'';
+        longDescription = ''A pure Ruby library for measuring the dimensions and rotation angles of GIF, PNG, JPEG and TIFF images.'';
+      };
+      name = ''dimensions-1.2.0'';
+      requiredGems = [  ];
+      sha256 = ''1pqb7yzjcpbgbyi196ifqbd1wy570cn12bkzcvpcha4xilhajja0'';
+    };
+    em_resolv_replace_1_1_3 = {
+      basename = ''em_resolv_replace'';
+      meta = {
+        description = ''EventMachine-aware DNS lookup for Ruby'';
+        homepage = ''http://github.com/mperham/em-resolv-replace'';
+      };
+      name = ''em-resolv-replace-1.1.3'';
+      requiredGems = [  ];
+      sha256 = ''1w5y4rzmp51ni56v05qwgay5wrs2i6i3q92pvlcrghmhxhgsbqg7'';
+    };
     erubis_2_7_0 = {
       basename = ''erubis'';
       meta = {
@@ -387,7 +461,7 @@ is the MIT license.'';
       requiredGems = [  ];
       sha256 = ''1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3'';
     };
-    eventmachine_1_0_0 = {
+    eventmachine_1_0_3 = {
       basename = ''eventmachine'';
       meta = {
         description = ''Ruby/EventMachine library'';
@@ -403,9 +477,20 @@ are provided with the package, primarily to serve as examples. The real goal
 of EventMachine is to enable programs to easily interface with other programs
 using TCP/IP, especially if custom protocols are required.'';
       };
-      name = ''eventmachine-1.0.0'';
+      name = ''eventmachine-1.0.3'';
       requiredGems = [  ];
-      sha256 = ''1qshsikskkfbbhai9s0qhmnpa326m83k9yzivwvkl2dc1ffpk2pz'';
+      sha256 = ''09sqlsb6x9ddlgfw5gsw7z0yjg5m2qfjiqkz2fx70zsizj3lqhil'';
+    };
+    eventmachine_tail_0_6_4 = {
+      basename = ''eventmachine_tail'';
+      meta = {
+        description = ''eventmachine tail - a file tail implementation with glob support'';
+        homepage = ''http://code.google.com/p/semicomplete/wiki/EventMachineTail'';
+        longDescription = ''Add file 'tail' implemented with EventMachine. Also includes a 'glob watch' class for watching a directory pattern for new matches, like /var/log/*.log'';
+      };
+      name = ''eventmachine-tail-0.6.4'';
+      requiredGems = [ g.eventmachine_1_0_3 ];
+      sha256 = ''1pvlb34vdzd81kf9f3xyibb4f55xjqm7lqqy28dgyci5cyv50y61'';
     };
     fakes3_0_1_5 = {
       basename = ''fakes3'';
@@ -414,9 +499,30 @@ using TCP/IP, especially if custom protocols are required.'';
         longDescription = ''Use FakeS3 to test basic S3 functionality without actually connecting to S3'';
       };
       name = ''fakes3-0.1.5'';
-      requiredGems = [ g.thor_0_17_0 g.builder_3_1_4 ];
+      requiredGems = [ g.thor_0_17_0 g.builder_3_2_0 ];
       sha256 = ''1na5wrbarla6s414svqmr5spbpv6vmcgpswal444x4clcpmadhib'';
     };
+    faraday_0_8_6 = {
+      basename = ''faraday'';
+      meta = {
+        description = ''HTTP/REST API client library.'';
+        homepage = ''https://github.com/lostisland/faraday'';
+      };
+      name = ''faraday-0.8.6'';
+      requiredGems = [ g.multipart_post_1_2_0 ];
+      sha256 = ''16jd0gnqfrh5v4v88nlasyjjm8cmf2w2p6gphxq64mvdxlcdy5jy'';
+    };
+    faraday_middleware_0_8_8 = {
+      basename = ''faraday_middleware'';
+      meta = {
+        description = ''Various middleware for Faraday'';
+        homepage = ''https://github.com/pengwynn/faraday_middleware'';
+        longDescription = ''Various middleware for Faraday'';
+      };
+      name = ''faraday_middleware-0.8.8'';
+      requiredGems = [ g.faraday_0_8_6 ];
+      sha256 = ''1n0g8pm7ynx6ffyqhscc1cqw97zhvd8isr31yfyj15335j1jsncz'';
+    };
     ffi_1_4_0 = {
       basename = ''ffi'';
       meta = {
@@ -428,16 +534,42 @@ using TCP/IP, especially if custom protocols are required.'';
       requiredGems = [  ];
       sha256 = ''06a29qvg487yk9pyi7wzyj5700mf7s3mjdqc6dsrh0467mjj9768'';
     };
-    foreman_0_61_0 = {
+    file_tail_1_0_12 = {
+      basename = ''file_tail'';
+      meta = {
+        description = ''File::Tail for Ruby'';
+        homepage = ''http://github.com/flori/file-tail'';
+        longDescription = ''Library to tail files in Ruby'';
+      };
+      name = ''file-tail-1.0.12'';
+      requiredGems = [ g.tins_0_7_2 ];
+      sha256 = ''0mzxxnwj7k5pwxs0rdbmb3b41zgvzw7x40sf3qlkch4zdfx91i1j'';
+    };
+    foreman_0_62_0 = {
       basename = ''foreman'';
       meta = {
         description = ''Process manager for applications with multiple components'';
         homepage = ''http://github.com/ddollar/foreman'';
         longDescription = ''Process manager for applications with multiple components'';
       };
-      name = ''foreman-0.61.0'';
+      name = ''foreman-0.62.0'';
       requiredGems = [ g.thor_0_17_0 ];
-      sha256 = ''1h9dmzq1cwz87qyzx2ibpjghsxjnnqbh485l3sdxyfh5k3v79k7z'';
+      sha256 = ''08i34rgs3bydk52zwpps4p0y2fvcnibp9lvfdhr75ppin7wv7lmr'';
+    };
+    highline_1_6_15 = {
+      basename = ''highline'';
+      meta = {
+        description = ''HighLine is a high-level command-line IO library.'';
+        homepage = ''http://highline.rubyforge.org'';
+        longDescription = ''A high-level IO library that provides validation, type conversion, and more for
+command-line interfaces. HighLine also includes a complete menu system that can
+crank out anything from simple list selection to complete shells with just
+minutes of work.
+'';
+      };
+      name = ''highline-1.6.15'';
+      requiredGems = [  ];
+      sha256 = ''1ilwlgylv92md9dnw6hqhrw8hiwk3f4k8qz6airqjp1rq9r594m1'';
     };
     highline_1_6_2 = {
       basename = ''highline'';
@@ -485,16 +617,16 @@ For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf'';
       requiredGems = [ g.rake_0_9_6 ];
       sha256 = ''0i961x0hrd6fs1nsfham87dhn64gqpnai27l14jag7qbnp3a79yp'';
     };
-    i18n_0_6_1 = {
+    i18n_0_6_4 = {
       basename = ''i18n'';
       meta = {
         description = ''New wave Internationalization support for Ruby'';
         homepage = ''http://github.com/svenfuchs/i18n'';
         longDescription = ''New wave Internationalization support for Ruby.'';
       };
-      name = ''i18n-0.6.1'';
+      name = ''i18n-0.6.4'';
       requiredGems = [  ];
-      sha256 = ''0x3lhp1vl1k4dfqx6k93hhxcpjkz57y8cf007ws7p845ywk6ibfl'';
+      sha256 = ''0wz1rnrs4n21j1rw9a120j2pfdkbikp1yvxaqi3mk30iw6mx4p0f'';
     };
     journey_1_0_4 = {
       basename = ''journey'';
@@ -518,16 +650,16 @@ For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf'';
       requiredGems = [  ];
       sha256 = ''1kgqsn0bagr41gf5kbqaxbs38a7s5bm85m0pdx4qz7d70v9nc9cl'';
     };
-    jsduck_4_6_1 = {
+    jsduck_4_6_2 = {
       basename = ''jsduck'';
       meta = {
         description = ''Simple JavaScript Duckumentation generator'';
         homepage = ''https://github.com/senchalabs/jsduck'';
         longDescription = ''Documentation generator for Sencha JS frameworks'';
       };
-      name = ''jsduck-4.6.1'';
-      requiredGems = [ g.rdiscount_2_0_7 g.json_1_7_7 g.parallel_0_6_2 g.therubyracer_0_10_2 ];
-      sha256 = ''01bws3jfsym531znwsd6qjaymf1mrsss1bj8csvj3vhnv728qbyh'';
+      name = ''jsduck-4.6.2'';
+      requiredGems = [ g.rdiscount_2_0_7_1 g.json_1_7_7 g.parallel_0_6_2 g.therubyracer_0_10_2 g.dimensions_1_2_0 ];
+      sha256 = ''035w4igfa6yy6234ff4zbiqfjn0bhwqs6k8kji52l7gzgskwmzln'';
     };
     json_1_7_7 = {
       basename = ''json'';
@@ -562,16 +694,16 @@ For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf'';
       requiredGems = [  ];
       sha256 = ''0jxp0amx9xhka0ixnhvfgwc5ydr82hkxp81pvw32z31arx7jrwl6'';
     };
-    libv8_3_3_10_4_x86_64_linux = {
+    libv8_3_3_10_4 = {
       basename = ''libv8'';
       meta = {
         description = ''Distribution of the V8 JavaScript engine'';
         homepage = ''http://github.com/fractaloop/libv8'';
         longDescription = ''Distributes the V8 JavaScript engine in binary and source forms in order to support fast builds of The Ruby Racer'';
       };
-      name = ''libv8-3.3.10.4-x86_64-linux'';
+      name = ''libv8-3.3.10.4'';
       requiredGems = [  ];
-      sha256 = ''13lnmkm9z3xqyi8rlsycfd7wybv044pxcisrkyq0cx7ig91a0dmc'';
+      sha256 = ''0zy585rs1ihm8nsw525wgmbkcq7aqy1k9dbkk8s6953adl0bpz42'';
     };
     macaddr_1_6_1 = {
       basename = ''macaddr'';
@@ -592,7 +724,7 @@ For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf'';
         longDescription = ''A really Ruby Mail handler.'';
       };
       name = ''mail-2.4.4'';
-      requiredGems = [ g.mime_types_1_21 g.treetop_1_4_12 g.i18n_0_6_1 ];
+      requiredGems = [ g.mime_types_1_21 g.treetop_1_4_12 g.i18n_0_6_4 ];
       sha256 = ''0idylz5pnlz34mrxm7gs9jbll2c0k0y9dq2qarhxk30gwyvjaxi3'';
     };
     mime_types_1_21 = {
@@ -649,6 +781,17 @@ added from the the {LTSW collection}[http://www.ltsw.se/knbase/internet/mime.htp
       requiredGems = [  ];
       sha256 = ''0p33swcl9i97wvv0cq9jkdl8q7xbc3j07apy35vsgldnhw99krcg'';
     };
+    multipart_post_1_2_0 = {
+      basename = ''multipart_post'';
+      meta = {
+        description = ''A multipart form post accessory for Net::HTTP.'';
+        homepage = ''https://github.com/nicksieger/multipart-post'';
+        longDescription = ''Use with Net::HTTP to do multipart form posts.  IO values that have #content_type, #original_filename, and #local_path will be posted as a binary file.'';
+      };
+      name = ''multipart-post-1.2.0'';
+      requiredGems = [  ];
+      sha256 = ''12p7lnmc52di1r4h73h6xrpppplzyyhani9p7wm8l4kgf1hnmwnc'';
+    };
     net_sftp_2_0_5 = {
       basename = ''net_sftp'';
       meta = {
@@ -657,7 +800,7 @@ added from the the {LTSW collection}[http://www.ltsw.se/knbase/internet/mime.htp
         longDescription = ''A pure Ruby implementation of the SFTP client protocol'';
       };
       name = ''net-sftp-2.0.5'';
-      requiredGems = [ g.net_ssh_2_6_5 ];
+      requiredGems = [ g.net_ssh_2_6_6 ];
       sha256 = ''0lqk735wspm8rbiyxpbil8ikrqcyg00ss1df7fny0761c3as6m0v'';
     };
     net_ssh_2_6_0 = {
@@ -671,16 +814,16 @@ added from the the {LTSW collection}[http://www.ltsw.se/knbase/internet/mime.htp
       requiredGems = [ g.jruby_pageant_1_1_1 ];
       sha256 = ''18fsgps4a9dfrjszkl3py8j7vw0xwi70bcp59ccj2rlr6i1jv5gw'';
     };
-    net_ssh_2_6_5 = {
+    net_ssh_2_6_6 = {
       basename = ''net_ssh'';
       meta = {
         description = ''Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.'';
         homepage = ''https://github.com/net-ssh/net-ssh'';
         longDescription = ''Net::SSH: a pure-Ruby implementation of the SSH2 client protocol. It allows you to write programs that invoke and interact with processes on remote servers, via SSH2.'';
       };
-      name = ''net-ssh-2.6.5'';
+      name = ''net-ssh-2.6.6'';
       requiredGems = [  ];
-      sha256 = ''1f21r78b0rm9gyzdc96fzih27nrags3pk00zlhfviqlfbmb1c48x'';
+      sha256 = ''00fdnwv3jf311jjcc51lq8w26r62vzma91i79h5hj8i1ylrilx51'';
     };
     nix_0_1_1 = {
       basename = ''nix'';
@@ -708,6 +851,28 @@ enough of it.'';
       requiredGems = [  ];
       sha256 = ''1235h8k242f6yi5qgb8rfcx6gp7g99djwqgrz0vb6w12pbp9kar8'';
     };
+    papertrail_0_9_7 = {
+      basename = ''papertrail'';
+      meta = {
+        description = ''Command-line client for Papertrail hosted log management service.'';
+        homepage = ''http://github.com/papertrail/papertrail-cli'';
+        longDescription = ''Command-line client for Papertrail hosted log management service. Tails and searches app server logs and system syslog. Supports Boolean search and works with grep and pipe output (Unix).'';
+      };
+      name = ''papertrail-0.9.7'';
+      requiredGems = [ g.addressable_2_3_3 g.yajl_ruby_1_1_0 g.chronic_0_9_1 g.faraday_0_8_6 g.faraday_middleware_0_8_8 ];
+      sha256 = ''0v0m1v0qabbr9pmyl77znz39qy1m7p0xwvf3lf9hyq6n524f2dwr'';
+    };
+    papertrail_cli_0_9_3 = {
+      basename = ''papertrail_cli'';
+      meta = {
+        description = ''Placeholder gem to point to new papertrail gem'';
+        homepage = ''http://github.com/papertrail/papertrail-cli-gem'';
+        longDescription = ''Placeholder gem to point to new papertrail gem.'';
+      };
+      name = ''papertrail-cli-0.9.3'';
+      requiredGems = [ g.papertrail_0_9_7 ];
+      sha256 = ''1914dcfqsmw5rl4xd1zwjrfbgwglyncxm8km06bgxaqn4wnaq5iv'';
+    };
     parallel_0_6_2 = {
       basename = ''parallel'';
       meta = {
@@ -779,16 +944,16 @@ Also see http://rack.github.com/.
       requiredGems = [ g.rack_1_5_2 ];
       sha256 = ''073ffpsqmy4nqxz178qisb3a4v3305c49ypj0jw6s9mkz02yvgq2'';
     };
-    rack_protection_1_3_2 = {
+    rack_protection_1_5_0 = {
       basename = ''rack_protection'';
       meta = {
         description = ''You should use protection!'';
         homepage = ''http://github.com/rkh/rack-protection'';
         longDescription = ''You should use protection!'';
       };
-      name = ''rack-protection-1.3.2'';
+      name = ''rack-protection-1.5.0'';
       requiredGems = [ g.rack_1_5_2 ];
-      sha256 = ''0f69d491xciq1hb3mm26nxnsb3pvlf3gdkggj4ryiphimsy05n0k'';
+      sha256 = ''10wm67f2mp9pryg0s8qapbyxd2lcrpb8ywsbicg29cv2xprhbl4j'';
     };
     rack_ssl_1_3_3 = {
       basename = ''rack_ssl'';
@@ -824,7 +989,7 @@ request helpers feature.'';
         longDescription = ''Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity. It encourages beautiful code by favoring convention over configuration.'';
       };
       name = ''rails-3.2.12'';
-      requiredGems = [ g.activesupport_3_2_12 g.actionpack_3_2_12 g.activerecord_3_2_12 g.activeresource_3_2_12 g.actionmailer_3_2_12 g.railties_3_2_12 g.bundler_1_2_4 ];
+      requiredGems = [ g.activesupport_3_2_12 g.actionpack_3_2_12 g.activerecord_3_2_12 g.activeresource_3_2_12 g.actionmailer_3_2_12 g.railties_3_2_12 g.bundler_1_3_4 ];
       sha256 = ''1jjnm74nzl5v3461c0mrbpa471yd6s8hnkmnxb64c2rm95c61wxz'';
     };
     railties_3_2_12 = {
@@ -835,7 +1000,7 @@ request helpers feature.'';
         longDescription = ''Rails internals: application bootup, plugins, generators, and rake tasks.'';
       };
       name = ''railties-3.2.12'';
-      requiredGems = [ g.rake_10_0_3 g.rack_ssl_1_3_3 g.thor_0_17_0 g.rdoc_3_12_1 g.activesupport_3_2_12 g.actionpack_3_2_12 ];
+      requiredGems = [ g.rake_10_0_3 g.rack_ssl_1_3_3 g.thor_0_17_0 g.rdoc_3_12_2 g.activesupport_3_2_12 g.actionpack_3_2_12 ];
       sha256 = ''0d8wy1n591x12bigj3jh8c9djzi8k68vh14342mc22raxwp5rwdw'';
     };
     rake_0_9_2_2 = {
@@ -882,17 +1047,17 @@ request helpers feature.'';
       requiredGems = [  ];
       sha256 = ''0bdnxwdxj4r1kdxfi5nszbsb126njrr81p912g64xxs2bgxd1bp1'';
     };
-    rdiscount_2_0_7 = {
+    rdiscount_2_0_7_1 = {
       basename = ''rdiscount'';
       meta = {
         description = ''Fast Implementation of Gruber's Markdown in C'';
         homepage = ''http://github.com/rtomayko/rdiscount'';
       };
-      name = ''rdiscount-2.0.7'';
+      name = ''rdiscount-2.0.7.1'';
       requiredGems = [  ];
-      sha256 = ''1cj9dn59xqjaglvzvd1ninid62xmih74az0glqqb90n2p42s2zs1'';
+      sha256 = ''1xjwi99wfyjhn72h8k709kbq2npqmw2zvikszxfg6in83yb8vmxn'';
     };
-    rdoc_3_12_1 = {
+    rdoc_3_12_2 = {
       basename = ''rdoc'';
       meta = {
         description = ''RDoc produces HTML and command-line documentation for Ruby projects'';
@@ -903,9 +1068,20 @@ documentation.
 
 See RDoc for a description of RDoc's markup and basic use.'';
       };
-      name = ''rdoc-3.12.1'';
+      name = ''rdoc-3.12.2'';
       requiredGems = [ g.json_1_7_7 ];
-      sha256 = ''1hflgw2v0lyx38kdwj71jyibc14j6ghb6zmp2l3g47v7d2m47z4g'';
+      sha256 = ''1v9k4sp5yzj2bshngckdvivj6bszciskk1nd2r3wri2ygs7vgqm8'';
+    };
+    remote_syslog_1_6_13 = {
+      basename = ''remote_syslog'';
+      meta = {
+        description = ''Monitor plain text log file(s) for new entries and send to remote syslog collector'';
+        homepage = ''http://github.com/papertrail/remote_syslog'';
+        longDescription = ''Lightweight daemon to tail one or more log files and transmit UDP syslog messages to a remote syslog host (centralized log aggregation). Generates UDP packets itself instead of depending on a system syslog daemon, so it doesn't affect system-wide logging configuration.'';
+      };
+      name = ''remote_syslog-1.6.13'';
+      requiredGems = [ g.servolux_0_10_0 g.file_tail_1_0_12 g.eventmachine_1_0_3 g.eventmachine_tail_0_6_4 g.syslog_protocol_0_9_2 g.em_resolv_replace_1_1_3 ];
+      sha256 = ''0q35j02k2l3fw3fdzq0i3rd6chsqr982gj13f3m3lsxm7kms03nw'';
     };
     rjb_1_4_2 = {
       basename = ''rjb'';
@@ -1003,7 +1179,7 @@ See RDoc for a description of RDoc's markup and basic use.'';
       requiredGems = [  ];
       sha256 = ''1khf6d903agnwd8965f5f8b353rzmfvygxp53z1199rqzw8h46q2'';
     };
-    sass_3_2_5 = {
+    sass_3_2_7 = {
       basename = ''sass'';
       meta = {
         description = ''A powerful but elegant CSS compiler that makes CSS fun again.'';
@@ -1014,20 +1190,34 @@ See RDoc for a description of RDoc's markup and basic use.'';
       command line tool or a web-framework plugin.
 '';
       };
-      name = ''sass-3.2.5'';
+      name = ''sass-3.2.7'';
       requiredGems = [  ];
-      sha256 = ''1ys7pfadw61dm09yyk28zrssi8zsyj99fyq6bdf2xmi8yp1avs6k'';
+      sha256 = ''0c494gh1i4llk4lbi35vidsgclf3cgxind1a7nm499ac9sdz084s'';
     };
-    selenium_webdriver_2_30_0 = {
+    selenium_webdriver_2_31_0 = {
       basename = ''selenium_webdriver'';
       meta = {
         description = ''The next generation developer focused tool for automated testing of webapps'';
         homepage = ''http://selenium.googlecode.com'';
         longDescription = ''WebDriver is a tool for writing automated tests of websites. It aims to mimic the behaviour of a real user, and as such interacts with the HTML of the application.'';
       };
-      name = ''selenium-webdriver-2.30.0'';
-      requiredGems = [ g.multi_json_1_6_1 g.rubyzip_0_9_9 g.childprocess_0_3_8 g.websocket_1_0_7 ];
-      sha256 = ''1ybx8v9m5y8ykbdbldd1mglz0xhg30iv0708ig0vzjl2522sg6v1'';
+      name = ''selenium-webdriver-2.31.0'';
+      requiredGems = [ g.multi_json_1_6_1 g.rubyzip_0_9_9 g.childprocess_0_3_9 g.websocket_1_0_7 ];
+      sha256 = ''1nv3ff31g183kdb97jjz0y7ny3vdnccd09pgblpj87bzhrrdfv3r'';
+    };
+    servolux_0_10_0 = {
+      basename = ''servolux'';
+      meta = {
+        description = ''* {Homepage}[http://rubygems.'';
+        homepage = ''http://gemcutter.org/gems/servolux'';
+        longDescription = ''Serv-O-Lux is a collection of Ruby classes that are useful for daemon and
+process management, and for writing your own Ruby services. The code is well
+documented and tested. It works with Ruby and JRuby supporting both 1.8 and 1.9
+interpreters.'';
+      };
+      name = ''servolux-0.10.0'';
+      requiredGems = [  ];
+      sha256 = ''08jdrk35f61ab8b48ffm85p9lgfpbnzq3n4is00gqhpcrrq72dhs'';
     };
     sinatra_1_3_2 = {
       basename = ''sinatra'';
@@ -1037,7 +1227,7 @@ See RDoc for a description of RDoc's markup and basic use.'';
         longDescription = ''Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort.'';
       };
       name = ''sinatra-1.3.2'';
-      requiredGems = [ g.rack_1_5_2 g.rack_protection_1_3_2 g.tilt_1_3_3 ];
+      requiredGems = [ g.rack_1_5_2 g.rack_protection_1_5_0 g.tilt_1_3_5 ];
       sha256 = ''05blf915zpiwyz7agcn9rwdmddwxz0z4l3gd4qlqmrgd2vkw4sxc'';
     };
     sprockets_2_2_2 = {
@@ -1048,9 +1238,20 @@ See RDoc for a description of RDoc's markup and basic use.'';
         longDescription = ''Sprockets is a Rack-based asset packaging system that concatenates and serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.'';
       };
       name = ''sprockets-2.2.2'';
-      requiredGems = [ g.hike_1_2_1 g.multi_json_1_6_1 g.rack_1_5_2 g.tilt_1_3_3 ];
+      requiredGems = [ g.hike_1_2_1 g.multi_json_1_6_1 g.rack_1_5_2 g.tilt_1_3_5 ];
       sha256 = ''15ngw3bjbyr31ygzmmdxxa30ylah6pdn8akgdy9w30vfx2vr7s7s'';
     };
+    syslog_protocol_0_9_2 = {
+      basename = ''syslog_protocol'';
+      meta = {
+        description = ''Syslog protocol parser and generator'';
+        homepage = ''https://github.com/eric/syslog_protocol'';
+        longDescription = ''Syslog protocol parser and generator'';
+      };
+      name = ''syslog_protocol-0.9.2'';
+      requiredGems = [  ];
+      sha256 = ''1yb2cmbyj0zmb2yhkgnmghcngrkhcxs4g1svcmgfj90l2hs23nmc'';
+    };
     systemu_2_5_2 = {
       basename = ''systemu'';
       meta = {
@@ -1070,7 +1271,7 @@ See RDoc for a description of RDoc's markup and basic use.'';
         longDescription = ''Call javascript code and manipulate javascript objects from ruby. Call ruby code and manipulate ruby objects from javascript.'';
       };
       name = ''therubyracer-0.10.2'';
-      requiredGems = [ g.libv8_3_3_10_4_x86_64_linux ];
+      requiredGems = [ g.libv8_3_3_10_4 ];
       sha256 = ''111hm2l613v06sy7pzjzmnyi4x11rg3c2syhnpv8fn0wnn9rdiyb'';
     };
     thin_1_5_0 = {
@@ -1081,7 +1282,7 @@ See RDoc for a description of RDoc's markup and basic use.'';
         longDescription = ''A thin and fast web server'';
       };
       name = ''thin-1.5.0'';
-      requiredGems = [ g.rack_1_5_2 g.eventmachine_1_0_0 g.daemons_1_1_9 ];
+      requiredGems = [ g.rack_1_5_2 g.eventmachine_1_0_3 g.daemons_1_1_9 ];
       sha256 = ''14sd2qbbk6y108z6v723mh3f1mk8s4fwxmmn9f8dk4xkhk4rwvq1'';
     };
     thor_0_17_0 = {
@@ -1095,16 +1296,27 @@ See RDoc for a description of RDoc's markup and basic use.'';
       requiredGems = [  ];
       sha256 = ''0gf46qafcfgmi20a2mnb3wkd9y6spgy2hq22h70377daj4zjxla2'';
     };
-    tilt_1_3_3 = {
+    tilt_1_3_5 = {
       basename = ''tilt'';
       meta = {
         description = ''Generic interface to multiple Ruby template engines'';
         homepage = ''http://github.com/rtomayko/tilt/'';
         longDescription = ''Generic interface to multiple Ruby template engines'';
       };
-      name = ''tilt-1.3.3'';
+      name = ''tilt-1.3.5'';
+      requiredGems = [  ];
+      sha256 = ''081saxdxnal4ky38a904jw3n2837m80g211w0zm5rx6m712mb6qd'';
+    };
+    tins_0_7_2 = {
+      basename = ''tins'';
+      meta = {
+        description = ''Useful stuff.'';
+        homepage = ''http://flori.github.com/tins'';
+        longDescription = ''All the stuff that isn't good/big enough for a real library.'';
+      };
+      name = ''tins-0.7.2'';
       requiredGems = [  ];
-      sha256 = ''18qdl8nllbgwipa2ab9df3wlfgvsc8ml78hbypwc17b9qwv9bbs8'';
+      sha256 = ''142mvgn8218wikwdvd5gq4g6k3p24f273wlqvczzfhz02livrz90'';
     };
     treetop_1_4_12 = {
       basename = ''treetop'';
@@ -1116,16 +1328,16 @@ See RDoc for a description of RDoc's markup and basic use.'';
       requiredGems = [ g.polyglot_0_3_3 g.polyglot_0_3_3 ];
       sha256 = ''1jlfjq67n933sm0px0s2j965v1kl1rj8fbx6xk8y4yppkv6ygxc8'';
     };
-    tzinfo_0_3_35 = {
+    tzinfo_0_3_37 = {
       basename = ''tzinfo'';
       meta = {
         description = ''Daylight-savings aware timezone library'';
         homepage = ''http://tzinfo.rubyforge.org/'';
         longDescription = ''TZInfo is a Ruby library that uses the standard tz (Olson) database to provide daylight savings aware transformations between times in different time zones.'';
       };
-      name = ''tzinfo-0.3.35'';
+      name = ''tzinfo-0.3.37'';
       requiredGems = [  ];
-      sha256 = ''1c52ndjqcxpgxhlclbxf98clcpni216xk5zgrkcd4px84riyjbmp'';
+      sha256 = ''0pi2vabsg73h6z4wfwyd27k63issp2qp1nh0vd74rdk740gmb3kc'';
     };
     uuid_2_3_7 = {
       basename = ''uuid'';
@@ -1173,5 +1385,15 @@ See RDoc for a description of RDoc's markup and basic use.'';
       requiredGems = [  ];
       sha256 = ''0zlwz8kvpm45m227aazg369fapbqyhvd5v9aga8cvxyhqnq0b87i'';
     };
+    yajl_ruby_1_1_0 = {
+      basename = ''yajl_ruby'';
+      meta = {
+        description = ''Ruby C bindings to the excellent Yajl JSON stream-based parser library.'';
+        homepage = ''http://github.com/brianmario/yajl-ruby'';
+      };
+      name = ''yajl-ruby-1.1.0'';
+      requiredGems = [  ];
+      sha256 = ''0sj46j47icb12hdhcfh76rnvddyiic5ifqzkh3kla1vcr505kf4m'';
+    };
   };
 }
diff --git a/pkgs/development/interpreters/ruby/patches.nix b/pkgs/development/interpreters/ruby/patches.nix
index a2d2d753a4a..10b0b202387 100644
--- a/pkgs/development/interpreters/ruby/patches.nix
+++ b/pkgs/development/interpreters/ruby/patches.nix
@@ -1,5 +1,5 @@
 { fetchurl, writeScript, ruby, ncurses, sqlite, libxml2, libxslt, libffi
-, zlib, libuuid, gems, jdk }:
+, zlib, libuuid, gems, jdk, python }:
 
 let
 
@@ -14,12 +14,21 @@ in
 
 {
   sup = { buildInputs = [ gems.ncursesw ]; };
+
+  libv8 = { buildInputs = [ python ]; };
   
   sqlite3 = { propagatedBuildInputs = [ sqlite ]; };
   
   rails = { gemFlags = "--no-ri --no-rdoc"; };
   
   ncurses = { propagatedBuildInputs = [ ncurses ]; };
+
+  nix = {
+    postInstall = ''
+      cd $out/${ruby.gemPath}/gems/nix*
+      patch -Np1 -i ${./fix-gem-nix-versions.patch}
+    '';
+  };
   
   ncursesw = { propagatedBuildInputs = [ ncurses ]; };
   
diff --git a/pkgs/development/interpreters/ruby/ruby-2.0.nix b/pkgs/development/interpreters/ruby/ruby-2.0.nix
new file mode 100644
index 00000000000..7c47bac0bbb
--- /dev/null
+++ b/pkgs/development/interpreters/ruby/ruby-2.0.nix
@@ -0,0 +1,57 @@
+{ stdenv, fetchurl
+, zlib, zlibSupport ? true
+, openssl, opensslSupport ? true
+, gdbm, gdbmSupport ? true
+, ncurses, readline, cursesSupport ? false
+, groff, docSupport ? false
+, libyaml, yamlSupport ? true
+}:
+
+let
+  op = stdenv.lib.optional;
+  ops = stdenv.lib.optionals;
+in
+
+stdenv.mkDerivation rec {
+  version = with passthru; "${majorVersion}.${minorVersion}-p${patchLevel}";
+  
+  name = "ruby-${version}";
+  
+  src = fetchurl {
+    url = "ftp://ftp.ruby-lang.org/pub/ruby/2.0/${name}.tar.bz2";
+    sha256 = "0pr9jf01cfap93xcngyd5zpns67ffjsgaxkm0qr1r464rj9d7066";
+  };
+
+  # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
+  NROFF = "${groff}/bin/nroff";
+
+  buildInputs = (ops cursesSupport [ ncurses readline ] )
+    ++ (op docSupport groff )
+    ++ (op zlibSupport zlib)
+    ++ (op opensslSupport openssl)
+    ++ (op gdbmSupport gdbm)
+    ++ (op yamlSupport libyaml);
+
+  enableParallelBuilding = true;
+    
+  configureFlags = ["--enable-shared" ];
+
+  installFlags = stdenv.lib.optionalString docSupport "install-doc";
+  # Bundler tries to create this directory
+  postInstall = "mkdir -pv $out/${passthru.gemPath}";
+
+  meta = {
+    license = "Ruby";
+    homepage = "http://www.ruby-lang.org/en/";
+    description = "The Ruby language";
+    platforms = stdenv.lib.platforms.all;
+  };
+
+  passthru = rec {
+    majorVersion = "2.0";
+    minorVersion = "0";
+    patchLevel = "0";
+    libPath = "lib/ruby/${majorVersion}";
+    gemPath = "lib/ruby/gems/${majorVersion}";
+  };
+}
diff --git a/pkgs/development/libraries/apache-activemq/default.nix b/pkgs/development/libraries/apache-activemq/default.nix
new file mode 100644
index 00000000000..90d0dafdd95
--- /dev/null
+++ b/pkgs/development/libraries/apache-activemq/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "apache-activemq-${version}";
+  version = "5.8.0";
+
+  src = fetchurl {
+    url = "mirror://apache/activemq/apache-activemq/${version}/${name}-bin.tar.gz";
+    sha256 = "12a1lmmqapviqdgw307jm07vw1z5q53r56pkbp85w9wnqwspjrbk";
+  };
+
+  phases = [ "unpackPhase" "installPhase" ];
+
+  installPhase = ''
+    ensureDir $out
+    mv * $out/
+    for j in `find $out/lib -name "*.jar"`; do
+      cp="''${cp:+"$cp:"}$j";
+    done
+    echo "CLASSPATH=$cp" > $out/lib/classpath.env
+  '';
+
+  meta = {
+    homepage = http://activemq.apache.org/;
+    description = ''
+      Messaging and Integration Patterns server written in Java.
+    '';
+    license = stdenv.lib.licenses.asl20;
+  };
+
+}
diff --git a/pkgs/development/libraries/boost/1.53.nix b/pkgs/development/libraries/boost/1.53.nix
index c3272e98a14..ff09dfd5954 100644
--- a/pkgs/development/libraries/boost/1.53.nix
+++ b/pkgs/development/libraries/boost/1.53.nix
@@ -28,7 +28,7 @@ let
   layout = if taggedLayout then "tagged" else "system";
 
   cflags = if enablePIC && enableExceptions then
-             "cflags=-fPIC -fexceptions cxxflags=-fPIC linkflags=-fPIC"
+             "cflags=\"-fPIC -fexceptions\" cxxflags=-fPIC linkflags=-fPIC"
            else if enablePIC then
              "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC"
            else if enableExceptions then
diff --git a/pkgs/development/libraries/bullet/default.nix b/pkgs/development/libraries/bullet/default.nix
index b725f6bbf9f..6320dd58e4c 100644
--- a/pkgs/development/libraries/bullet/default.nix
+++ b/pkgs/development/libraries/bullet/default.nix
@@ -1,14 +1,17 @@
-{stdenv, fetchurl, unzip, cmake}:
+{ stdenv, fetchurl, cmake, mesa, freeglut }:
 
-stdenv.mkDerivation {
-  name = "bullet-2.78";
+stdenv.mkDerivation rec {
+  name = "bullet-2.80"; # vdrift 2012-07-22 doesn't build with 2.81
+  rev = "2531";
   src = fetchurl {
-    url = "http://bullet.googlecode.com/files/bullet-2.78.zip";
-    sha256 = "10l2dclvv0di9mi9qp6xfy9vybx182xp2dyygabacrpr3p75s77k";
+    url = "http://bullet.googlecode.com/files/${name}-rev${rev}.tgz";
+    sha256 = "0dig6k88jz5y0cz6dn186vc4l96l4v56zvwpsp5bv9f5wdwjskj6";
   };
-  buildInputs = [ unzip cmake ];
+
+  buildInputs = [ cmake mesa freeglut ];
   configurePhase = ''
-    cmake -DBUILD_SHARED_LIBS=ON -DBUILD_EXTRAS=OFF -DBUILD_DEMOS=OFF .
+    cmake -DBUILD_SHARED_LIBS=ON -DBUILD_EXTRAS=OFF -DBUILD_DEMOS=OFF \
+      -DCMAKE_INSTALL_PREFIX=$out .
   '';
 
   meta = {
@@ -19,6 +22,6 @@ stdenv.mkDerivation {
     '';
     homepage = http://code.google.com/p/bullet/;
     license = stdenv.lib.licenses.zlib;
-    maintainers = [ "Alexander Foremny <alexanderforemny@googlemail.com>" ];
+    maintainers = with stdenv.lib.maintainers; [ aforemny ];
   };
 }
diff --git a/pkgs/development/libraries/cairo/1.12.2.nix b/pkgs/development/libraries/cairo/1.12.2.nix
new file mode 100644
index 00000000000..254998b6e7a
--- /dev/null
+++ b/pkgs/development/libraries/cairo/1.12.2.nix
@@ -0,0 +1,85 @@
+{ postscriptSupport ? true
+, pdfSupport ? true
+, pngSupport ? true
+, xcbSupport ? false
+, gobjectSupport ? true, glib
+, stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype, xlibs
+, zlib, libpng, pixman, libxcb ? null, xcbutil ? null
+, gettext, libiconvOrEmpty
+}:
+
+assert postscriptSupport -> zlib != null;
+assert pngSupport -> libpng != null;
+assert xcbSupport -> libxcb != null && xcbutil != null;
+
+stdenv.mkDerivation rec {
+  name = "cairo-1.12.2";
+
+  src = fetchurl {
+    url = "http://cairographics.org/releases/${name}.tar.xz";
+    sha1 = "bc2ee50690575f16dab33af42a2e6cdc6451e3f9";
+  };
+
+  buildInputs =
+    [ pkgconfig x11 fontconfig xlibs.libXrender ]
+    ++ stdenv.lib.optionals xcbSupport [ libxcb xcbutil ]
+
+    # On non-GNU systems we need GNU Gettext for libintl.
+    ++ stdenv.lib.optional (!stdenv.isLinux) gettext
+
+    ++ libiconvOrEmpty;
+
+  propagatedBuildInputs =
+    [ freetype pixman ] ++
+    stdenv.lib.optional gobjectSupport glib ++
+    stdenv.lib.optional postscriptSupport zlib ++
+    stdenv.lib.optional pngSupport libpng;
+
+  configureFlags =
+    [ "--enable-tee" ]
+    ++ stdenv.lib.optional xcbSupport "--enable-xcb"
+    ++ stdenv.lib.optional pdfSupport "--enable-pdf";
+
+  preConfigure = ''
+    # Work around broken `Requires.private' that prevents Freetype
+    # `-I' flags to be propagated.
+    sed -i "src/cairo.pc.in" \
+        -es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype}/include/freetype2 -I${freetype}/include|g'
+  ''
+
+  # On FreeBSD, `-ldl' doesn't exist.
+  + (stdenv.lib.optionalString stdenv.isFreeBSD
+       '' for i in "util/"*"/Makefile.in" boilerplate/Makefile.in
+          do
+            cat "$i" | sed -es/-ldl//g > t
+            mv t "$i"
+          done
+       '');
+
+  enableParallelBuilding = true;
+
+  # The default `--disable-gtk-doc' is ignored.
+  postInstall = "rm -rf $out/share/gtk-doc";
+
+  meta = {
+    description = "A 2D graphics library with support for multiple output devices";
+
+    longDescription = ''
+      Cairo is a 2D graphics library with support for multiple output
+      devices.  Currently supported output targets include the X
+      Window System, Quartz, Win32, image buffers, PostScript, PDF,
+      and SVG file output.  Experimental backends include OpenGL
+      (through glitz), XCB, BeOS, OS/2, and DirectFB.
+
+      Cairo is designed to produce consistent output on all output
+      media while taking advantage of display hardware acceleration
+      when available (e.g., through the X Render Extension).
+    '';
+
+    homepage = http://cairographics.org/;
+
+    licenses = [ "LGPLv2+" "MPLv1" ];
+
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix
index d21f303e741..72ea24c9f8a 100644
--- a/pkgs/development/libraries/cairo/default.nix
+++ b/pkgs/development/libraries/cairo/default.nix
@@ -21,7 +21,8 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs =
-    [ pkgconfig x11 fontconfig xlibs.libXrender ]
+    [ pkgconfig x11 fontconfig ] 
+    ++ stdenv.lib.optional (!stdenv.isDarwin) xlibs.libXrender
     ++ stdenv.lib.optionals xcbSupport [ libxcb xcbutil ]
 
     # On non-GNU systems we need GNU Gettext for libintl.
diff --git a/pkgs/development/libraries/cyrus-sasl/default.nix b/pkgs/development/libraries/cyrus-sasl/default.nix
index c5aefbe3214..87165fa8e7f 100644
--- a/pkgs/development/libraries/cyrus-sasl/default.nix
+++ b/pkgs/development/libraries/cyrus-sasl/default.nix
@@ -1,22 +1,25 @@
 { stdenv, fetchurl, openssl, db4, gettext, pam }:
 
 stdenv.mkDerivation rec {
-  name = "cyrus-sasl-2.1.25";
+  name = "cyrus-sasl-2.1.26";
 
   src = fetchurl {
-    url = "ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${name}.tar.gz";
-    sha256 = "418c16e6240a4f9b637cbe3d62937b9675627bad27c622191d47de8686fe24fe";
+    url = "ftp://ftp.cyrusimap.org/cyrus-sasl/${name}.tar.gz";
+    sha256 = "1hvvbcsg21nlncbgs0cgn3iwlnb3vannzwsp6rwvnn9ba4v53g4g";
   };
 
   buildInputs = [ openssl db4 gettext ] ++ stdenv.lib.optional stdenv.isLinux pam;
 
+  patches = [ ./missing-size_t.patch ]; # https://bugzilla.redhat.com/show_bug.cgi?id=906519
+  patchFlags = "-p0";
+
   # Set this variable at build-time to make sure $out can be evaluated.
   preConfigure = ''
     configureFlagsArray=( --with-plugindir=$out/lib/sasl2
                           --with-configdir=$out/lib/sasl2
-			  --with-saslauthd=/run/saslauthd
-			  --enable-login
-			)
+                          --with-saslauthd=/run/saslauthd
+                          --enable-login
+                        )
   '';
 
   meta = {
diff --git a/pkgs/development/libraries/cyrus-sasl/missing-size_t.patch b/pkgs/development/libraries/cyrus-sasl/missing-size_t.patch
new file mode 100644
index 00000000000..42f20fb8096
--- /dev/null
+++ b/pkgs/development/libraries/cyrus-sasl/missing-size_t.patch
@@ -0,0 +1,13 @@
+Gentoo bug #458790
+--- include/sasl.h	2012-10-12 17:05:48.000000000 +0300
++++ include/sasl.h	2013-02-23 16:56:44.648786268 +0200
+@@ -121,6 +121,9 @@
+ #ifndef SASL_H
+ #define SASL_H 1
+ 
++/* stddef.h to get size_t defined */
++#include <stddef.h>
++
+ /* Keep in sync with win32/common.mak */
+ #define SASL_VERSION_MAJOR 2
+ #define SASL_VERSION_MINOR 1
diff --git a/pkgs/development/libraries/ffmpeg/1.0.nix b/pkgs/development/libraries/ffmpeg/1.0.nix
deleted file mode 100644
index d703fd8e369..00000000000
--- a/pkgs/development/libraries/ffmpeg/1.0.nix
+++ /dev/null
@@ -1,85 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, yasm, zlib, bzip2, alsaLib
-, mp3Support ? true, lame ? null
-, speexSupport ? true, speex ? null
-, theoraSupport ? true, libtheora ? null
-, vorbisSupport ? true, libvorbis ? null
-, vpxSupport ? false, libvpx ? null
-, x264Support ? true, x264 ? null
-, xvidSupport ? true, xvidcore ? null
-, vdpauSupport ? true, libvdpau ? null
-, faacSupport ? false, faac ? null
-, dc1394Support ? false, libdc1394 ? null
-, x11grabSupport ? false, libXext ? null, libXfixes ? null
-}:
-
-assert speexSupport -> speex != null;
-assert theoraSupport -> libtheora != null;
-assert vorbisSupport -> libvorbis != null;
-assert vpxSupport -> libvpx != null;
-assert x264Support -> x264 != null;
-assert xvidSupport -> xvidcore != null;
-assert vdpauSupport -> libvdpau != null;
-assert faacSupport -> faac != null;
-assert x11grabSupport -> libXext != null && libXfixes != null;
-
-stdenv.mkDerivation rec {
-  name = "ffmpeg-1.0";
-  
-  src = fetchurl {
-    url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
-    sha256 = "1jbi85z2zkk3fh09l9f1s70kpvsz8706ay4lsw75395q8vic70hd";
-  };
-  
-  # `--enable-gpl' (as well as the `postproc' and `swscale') mean that
-  # the resulting library is GPL'ed, so it can only be used in GPL'ed
-  # applications.
-  configureFlags = [
-    "--enable-gpl"
-    "--enable-postproc"
-    "--enable-swscale"
-    "--disable-ffplay"
-    "--enable-shared"
-    "--enable-runtime-cpudetect"
-  ]
-    ++ stdenv.lib.optional mp3Support "--enable-libmp3lame"
-    ++ stdenv.lib.optional speexSupport "--enable-libspeex"
-    ++ stdenv.lib.optional theoraSupport "--enable-libtheora"
-    ++ stdenv.lib.optional vorbisSupport "--enable-libvorbis"
-    ++ stdenv.lib.optional vpxSupport "--enable-libvpx"
-    ++ stdenv.lib.optional x264Support "--enable-libx264"
-    ++ stdenv.lib.optional xvidSupport "--enable-libxvid"
-    ++ stdenv.lib.optional vdpauSupport "--enable-vdpau"
-    ++ stdenv.lib.optional faacSupport "--enable-libfaac --enable-nonfree"
-    ++ stdenv.lib.optional dc1394Support "--enable-libdc1394"
-    ++ stdenv.lib.optional x11grabSupport "--enable-x11grab";
-
-  buildInputs = [ pkgconfig lame yasm zlib bzip2 alsaLib ]
-    ++ stdenv.lib.optional mp3Support lame
-    ++ stdenv.lib.optional speexSupport speex
-    ++ stdenv.lib.optional theoraSupport libtheora
-    ++ stdenv.lib.optional vorbisSupport libvorbis
-    ++ stdenv.lib.optional vpxSupport libvpx
-    ++ stdenv.lib.optional x264Support x264
-    ++ stdenv.lib.optional xvidSupport xvidcore
-    ++ stdenv.lib.optional vdpauSupport libvdpau
-    ++ stdenv.lib.optional faacSupport faac
-    ++ stdenv.lib.optional dc1394Support libdc1394
-    ++ stdenv.lib.optionals x11grabSupport [ libXext libXfixes ];
-
-  enableParallelBuilding = true;
-    
-  crossAttrs = {
-    dontSetConfigureCross = true;
-    configureFlags = configureFlags ++ [
-      "--cross-prefix=${stdenv.cross.config}-"
-      "--enable-cross-compile"
-      "--target_os=linux"
-      "--arch=${stdenv.cross.arch}"
-      ];
-  };
-
-  meta = {
-    homepage = http://www.ffmpeg.org/;
-    description = "A complete, cross-platform solution to record, convert and stream audio and video";
-  };
-}
diff --git a/pkgs/development/libraries/ffmpeg/1.1.nix b/pkgs/development/libraries/ffmpeg/1.1.nix
index 7cb83db5e8d..100e3456ca4 100644
--- a/pkgs/development/libraries/ffmpeg/1.1.nix
+++ b/pkgs/development/libraries/ffmpeg/1.1.nix
@@ -25,7 +25,7 @@ assert faacSupport -> faac != null;
 assert x11grabSupport -> libXext != null && libXfixes != null;
 
 stdenv.mkDerivation rec {
-  name = "ffmpeg-1.1";
+  name = "ffmpeg-1.1.3";
   
   src = fetchurl {
     url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
diff --git a/pkgs/development/libraries/gamin/deadlock.patch b/pkgs/development/libraries/gamin/deadlock.patch
new file mode 100644
index 00000000000..e2abc8ce2d9
--- /dev/null
+++ b/pkgs/development/libraries/gamin/deadlock.patch
@@ -0,0 +1,68 @@
+Fix for a deadlock:
+https://bugzilla.gnome.org/show_bug.cgi?id=667230
+
+From cc14440eface093548cb3bc7814da11d9a99d283 Mon Sep 17 00:00:00 2001
+From: Anssi Hannula <anssi@mageia.org>
+Date: Wed, 4 Jan 2012 00:23:55 +0200
+Subject: [PATCH] fix possible server deadlock in ih_sub_cancel
+
+ih_sub_foreach() calls ih_sub_cancel() while inotify_lock is locked.
+However, ih_sub_cancel() locks it again, and locking GMutex recursively
+causes undefined behaviour.
+
+Fix that by removing locking from ih_sub_cancel() as ih_sub_foreach()
+is its only user. Also make the function static so that it won't
+accidentally get used by other files without locking (inotify-helper.h
+is an internal server header).
+
+This should fix the intermittent deadlocks I've been experiencing
+causing KDE applications to no longer start, and probably also
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542361
+---
+ server/inotify-helper.c |    7 ++-----
+ server/inotify-helper.h |    1 -
+ 2 files changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/server/inotify-helper.c b/server/inotify-helper.c
+index d77203e..0789fa4 100644
+--- a/server/inotify-helper.c
++++ b/server/inotify-helper.c
+@@ -123,13 +123,11 @@ ih_sub_add (ih_sub_t * sub)
+ 
+ /**
+  * Cancels a subscription which was being monitored.
++ * inotify_lock must be held when calling.
+  */
+-gboolean
++static gboolean
+ ih_sub_cancel (ih_sub_t * sub)
+ {
+-	G_LOCK(inotify_lock);
+-
+-
+ 	if (!sub->cancelled)
+ 	{
+ 		IH_W("cancelling %s\n", sub->pathname);
+@@ -140,7 +138,6 @@ ih_sub_cancel (ih_sub_t * sub)
+ 		sub_list = g_list_remove (sub_list, sub);
+ 	}
+ 
+-	G_UNLOCK(inotify_lock);
+ 	return TRUE;
+ }
+ 
+diff --git a/server/inotify-helper.h b/server/inotify-helper.h
+index 5d3b6d0..d36b5fd 100644
+--- a/server/inotify-helper.h
++++ b/server/inotify-helper.h
+@@ -34,7 +34,6 @@ gboolean	 ih_startup		(event_callback_t ecb,
+ 					 found_callback_t fcb);
+ gboolean	 ih_running		(void);
+ gboolean	 ih_sub_add		(ih_sub_t *sub);
+-gboolean	 ih_sub_cancel		(ih_sub_t *sub);
+ 
+ /* Return FALSE from 'f' if the subscription should be cancelled */
+ void		 ih_sub_foreach		(void *callerdata, gboolean (*f)(ih_sub_t *sub, void *callerdata));
+-- 
+1.7.7.2
+
diff --git a/pkgs/development/libraries/gamin/default.nix b/pkgs/development/libraries/gamin/default.nix
index 6d94eee865f..b61101654ba 100644
--- a/pkgs/development/libraries/gamin/default.nix
+++ b/pkgs/development/libraries/gamin/default.nix
@@ -16,5 +16,5 @@ stdenv.mkDerivation rec {
   # <sys/socket.h> with Glibc 2.9.
   configureFlags = "--disable-debug --with-python=${python} CPPFLAGS=-D_GNU_SOURCE";
 
-  patches = map fetchurl (import ./debian-patches.nix);
+  patches = [ ./deadlock.patch ] ++ map fetchurl (import ./debian-patches.nix);
 }
diff --git a/pkgs/development/libraries/glibc/2.17/common.nix b/pkgs/development/libraries/glibc/2.17/common.nix
index eed51288707..3006ff49013 100644
--- a/pkgs/development/libraries/glibc/2.17/common.nix
+++ b/pkgs/development/libraries/glibc/2.17/common.nix
@@ -49,6 +49,11 @@ stdenv.mkDerivation ({
          compatibility with old NixOS installations (since NixOS used
          to default to blowfish). */
       ./glibc-crypt-blowfish.patch
+
+      /* Fix for random "./sysdeps/posix/getaddrinfo.c:1467:
+         rfc3484_sort: Assertion `src->results[i].native == -1 ||
+         src->results[i].native == a2_native' failed." crashes. */
+      ./glibc-rh739743.patch
     ];
 
   postPatch = ''
@@ -138,7 +143,9 @@ stdenv.mkDerivation ({
 
     configureScript="`pwd`/../$sourceRoot/configure"
 
-    makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.gcc.libc}/lib"
+    ${stdenv.lib.optionalString (stdenv.gcc.libc != null)
+      ''makeFlags="$makeFlags BUILD_LDFLAGS=-Wl,-rpath,${stdenv.gcc.libc}/lib"''
+    }
 
     ${preConfigure}
   '';
diff --git a/pkgs/development/libraries/glibc/2.17/glibc-rh739743.patch b/pkgs/development/libraries/glibc/2.17/glibc-rh739743.patch
new file mode 100644
index 00000000000..c390b772b16
--- /dev/null
+++ b/pkgs/development/libraries/glibc/2.17/glibc-rh739743.patch
@@ -0,0 +1,55 @@
+2009-04-26  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/posix/getaddrinfo.c (rfc3484_sort): don't assign native
+	result if the result has no associated interface.
+
+---
+ sysdeps/posix/getaddrinfo.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -1456,13 +1456,13 @@
+ 
+ 	      /* Fill in the results in all the records.  */
+ 	      for (int i = 0; i < src->nresults; ++i)
+-		if (src->results[i].index == a1_index)
++		if (a1_index != -1 && src->results[i].index == a1_index)
+ 		  {
+ 		    assert (src->results[i].native == -1
+ 			    || src->results[i].native == a1_native);
+ 		    src->results[i].native = a1_native;
+ 		  }
+-		else if (src->results[i].index == a2_index)
++		else if (a2_index != -1 && src->results[i].index == a2_index)
+ 		  {
+ 		    assert (src->results[i].native == -1
+ 			    || src->results[i].native == a2_native);
+
+2009-03-15  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/posix/getaddrinfo.c (getaddrinfo): correctly detect 
+	interface for all 127.X.Y.Z addresses.
+
+---
+ sysdeps/posix/getaddrinfo.c |    9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -2265,7 +2265,14 @@
+ 			  tmp.addr[0] = 0;
+ 			  tmp.addr[1] = 0;
+ 			  tmp.addr[2] = htonl (0xffff);
+-			  tmp.addr[3] = sinp->sin_addr.s_addr;
++			  /* Special case for lo interface, the source address
++			     being possibly different than the interface 
++			     address. */
++			  if ((ntohl(sinp->sin_addr.s_addr) & 0xff000000)
++			      == 0x7f000000)
++			    tmp.addr[3] = htonl(0x7f000001);
++			  else
++			    tmp.addr[3] = sinp->sin_addr.s_addr;
+ 			}
+ 		      else
+ 			{
diff --git a/pkgs/development/libraries/glibc/2.17/info.nix b/pkgs/development/libraries/glibc/2.17/info.nix
index 322f07f0236..e4cdb42dd68 100644
--- a/pkgs/development/libraries/glibc/2.17/info.nix
+++ b/pkgs/development/libraries/glibc/2.17/info.nix
@@ -19,7 +19,7 @@ build null {
   # libc.info hasn't a Top node.
   installPhase = ''
     mkdir -p "$out/share/info"
-    cp -v "../$sourceRoot/manual/"*.info* "$out/share/info"
+    cp -v "manual/"*.info* "$out/share/info"
   '';
 
   meta.description = "GNU Info manual of the GNU C Library";
diff --git a/pkgs/development/libraries/gmp/5.0.5.nix b/pkgs/development/libraries/gmp/5.0.5.nix
index dba5cafdf57..461187a509c 100644
--- a/pkgs/development/libraries/gmp/5.0.5.nix
+++ b/pkgs/development/libraries/gmp/5.0.5.nix
@@ -23,6 +23,13 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  crossAttrs = {
+    # Disable stripping to avoid "libgmp.a: Archive has no index"
+    # (see <http://hydra.nixos.org/build/4268666>.)
+    dontStrip = true;
+    dontCrossStrip = true;
+  };
+
   meta = {
     description = "GMP, the GNU multiple precision arithmetic library";
 
diff --git a/pkgs/development/libraries/gsl/default.nix b/pkgs/development/libraries/gsl/default.nix
index 474d2f97dd0..0eefda50c20 100644
--- a/pkgs/development/libraries/gsl/default.nix
+++ b/pkgs/development/libraries/gsl/default.nix
@@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
     sha256 = "18qf6jzz1r3mzb5qynywv4xx3z9g61hgkbpkdrhbgqh2g7jhgfc5";
   };
 
+  # ToDo: there might be more impurities than FMA support check
+  patches = [ ./disable-fma.patch ]; # http://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html
+  patchFlags = "-p0";
+
   doCheck = true;
 
   meta = {
diff --git a/pkgs/development/libraries/gsl/disable-fma.patch b/pkgs/development/libraries/gsl/disable-fma.patch
new file mode 100644
index 00000000000..d5c0d620863
--- /dev/null
+++ b/pkgs/development/libraries/gsl/disable-fma.patch
@@ -0,0 +1,32 @@
+--- configure.ac        2011-09-22 16:13:22 +0000
++++ configure.ac        2011-11-26 23:55:24 +0000
+@@ -381,6 +381,28 @@
+ AC_SUBST(HAVE_DARWIN_IEEE_INTERFACE)
+ AC_SUBST(HAVE_DARWIN86_IEEE_INTERFACE)
+ 
++dnl check for compiler flags to disable use of FMA
++save_cflags="$CFLAGS"
++AC_CACHE_CHECK([for compiler flags to disable use of FMA], ac_cv_c_fma_flags,
++[
++if test X"$GCC" = Xyes; then
++    fma_flags='-ffp-contract=off'
++else
++    fma_flags=
++fi
++if test X"$fma_flags" != X; then
++  CFLAGS="$fma_flags $CFLAGS"
++  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int foo;]])],[ac_cv_c_fma_flags="$fma_flags"],[ac_cv_c_fma_flags="none"])
++else
++  ac_cv_c_fma_flags="none"
++fi])
++
++if test "$ac_cv_c_fma_flags" != "none" ; then
++   CFLAGS="$ac_cv_c_fma_flags $save_cflags"
++else
++   CFLAGS="$save_cflags"
++fi
++
+ dnl Check for IEEE control flags
+ 
+ save_cflags="$CFLAGS"
+
diff --git a/pkgs/development/libraries/haskell/DAV/default.nix b/pkgs/development/libraries/haskell/DAV/default.nix
index b1932966675..e3c6b11e55b 100644
--- a/pkgs/development/libraries/haskell/DAV/default.nix
+++ b/pkgs/development/libraries/haskell/DAV/default.nix
@@ -5,15 +5,14 @@
 
 cabal.mkDerivation (self: {
   pname = "DAV";
-  version = "0.3";
-  sha256 = "16qbq59g79a0a1n6vblndj1fknj9fvd0anhrsz9czwl3k3lk5cx8";
+  version = "0.3.1";
+  sha256 = "0ql6sf61gq55iyn189papnid91n4ab5s2i24zvkqrgixjz7998rd";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
     caseInsensitive cmdargs httpConduit httpTypes lens liftedBase mtl
     network resourcet transformers xmlConduit xmlHamlet
   ];
-  jailbreak = true;
   meta = {
     homepage = "http://floss.scru.org/hDAV";
     description = "RFC 4918 WebDAV support";
diff --git a/pkgs/development/libraries/haskell/NumInstances/default.nix b/pkgs/development/libraries/haskell/NumInstances/default.nix
index 4d258f5634d..4f06a97002d 100644
--- a/pkgs/development/libraries/haskell/NumInstances/default.nix
+++ b/pkgs/development/libraries/haskell/NumInstances/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "NumInstances";
-  version = "1.0";
-  sha256 = "1fmg3slwma5f88a2qxj54ny40s67qbdyvsyh506bkp11v54958fy";
+  version = "1.2";
+  sha256 = "0s26j3h0xg16lcz95qs21iyfnzx8q8w2k2lnq55gakkr1wl4ap59";
   meta = {
     description = "Instances of numeric classes for functions and tuples";
     license = self.stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/haskell/OpenAL/default.nix b/pkgs/development/libraries/haskell/OpenAL/default.nix
index 206e78eb728..a04aea993fa 100644
--- a/pkgs/development/libraries/haskell/OpenAL/default.nix
+++ b/pkgs/development/libraries/haskell/OpenAL/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "OpenAL";
-  version = "1.4.0.1";
-  sha256 = "180f84sjakhd1b8h5n3l92by2wmic20n6ax0z5fi3fvk9w73khyv";
+  version = "1.4.0.2";
+  sha256 = "19q4pd5i2w330qh895z0cgim4m4f4gxqf4ya1192fchqmgcz1svz";
   buildDepends = [ ObjectName StateVar Tensor ];
   extraLibraries = [ openal ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/QuickCheck/2.6.nix b/pkgs/development/libraries/haskell/QuickCheck/2.6.nix
new file mode 100644
index 00000000000..39c97859e65
--- /dev/null
+++ b/pkgs/development/libraries/haskell/QuickCheck/2.6.nix
@@ -0,0 +1,15 @@
+{ cabal, random }:
+
+cabal.mkDerivation (self: {
+  pname = "QuickCheck";
+  version = "2.6";
+  sha256 = "03cp7mshjy2yrg31i13b9kmc2a6lrmrbl1sh9s8lswcj305c00c0";
+  buildDepends = [ random ];
+  meta = {
+    homepage = "http://code.haskell.org/QuickCheck";
+    description = "Automatic testing of Haskell programs";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.andres ];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/Safe/default.nix b/pkgs/development/libraries/haskell/Safe/default.nix
deleted file mode 100644
index f35877cd656..00000000000
--- a/pkgs/development/libraries/haskell/Safe/default.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ cabal }:
-
-cabal.mkDerivation (self: {
-  pname = "Safe";
-  version = "0.1";
-  sha256 = "0ybi5r4635yjx41ig54bm426fbdzrivc5kn8fwqxmzm62ai0v623";
-  meta = {
-    homepage = "http://www-users.cs.york.ac.uk/~ndm/projects/libraries.php";
-    description = "Library for safe (pattern match free) functions";
-    license = self.stdenv.lib.licenses.bsd3;
-    platforms = self.ghc.meta.platforms;
-  };
-})
diff --git a/pkgs/development/libraries/haskell/basic-prelude/default.nix b/pkgs/development/libraries/haskell/basic-prelude/default.nix
index df00aff549f..04f3842be41 100644
--- a/pkgs/development/libraries/haskell/basic-prelude/default.nix
+++ b/pkgs/development/libraries/haskell/basic-prelude/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "basic-prelude";
-  version = "0.3.2.0";
-  sha256 = "1sdwkh9xrsx8v96d06jll7cqc0p6ykv2y9gnjzpbfx0k3ns69kcj";
+  version = "0.3.4.0";
+  sha256 = "0layc06df7df4mf4zafj87c4klsvkxbhi69dkv4ag9fkzvs62sz6";
   buildDepends = [
     hashable liftedBase ReadArgs systemFilepath text transformers
     unorderedContainers vector
diff --git a/pkgs/development/libraries/haskell/bifunctors/default.nix b/pkgs/development/libraries/haskell/bifunctors/default.nix
index 09287600323..c659c3bc3be 100644
--- a/pkgs/development/libraries/haskell/bifunctors/default.nix
+++ b/pkgs/development/libraries/haskell/bifunctors/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "bifunctors";
-  version = "3.2";
-  sha256 = "03bszf1127iw5kimjbag5gmgzz7h2qzcd9f7jb53jpiadfhjfx0a";
+  version = "3.2.0.1";
+  sha256 = "1biicx0zi48wzzi7vkhzvrdyk59hmmm1bqbsga6x5nbrbf3qrkm6";
   buildDepends = [ semigroupoids semigroups tagged ];
   meta = {
     homepage = "http://github.com/ekmett/bifunctors/";
diff --git a/pkgs/development/libraries/haskell/binary/default.nix b/pkgs/development/libraries/haskell/binary/default.nix
index b4f205e41b2..6273a099f73 100644
--- a/pkgs/development/libraries/haskell/binary/default.nix
+++ b/pkgs/development/libraries/haskell/binary/default.nix
@@ -1,13 +1,14 @@
-{ cabal, QuickCheck, random, testFramework
+{ cabal, Cabal, filepath, HUnit, QuickCheck, random, testFramework
 , testFrameworkQuickcheck2
 }:
 
 cabal.mkDerivation (self: {
   pname = "binary";
-  version = "0.6.4.0";
-  sha256 = "0vq80fzhwil5bx4a2vbd3jvfh1awhg1pwxgvq3lvbi37yzl0ydgh";
+  version = "0.7.0.1";
+  sha256 = "16srrp0qx9hsr7820b2q3sp9wp8y8sxxi8rvsh63n48w4l3canxq";
   testDepends = [
-    QuickCheck random testFramework testFrameworkQuickcheck2
+    Cabal filepath HUnit QuickCheck random testFramework
+    testFrameworkQuickcheck2
   ];
   meta = {
     homepage = "https://github.com/kolmodin/binary";
diff --git a/pkgs/development/libraries/haskell/blaze-html/default.nix b/pkgs/development/libraries/haskell/blaze-html/default.nix
index 59e0f718751..ec21e3fcd84 100644
--- a/pkgs/development/libraries/haskell/blaze-html/default.nix
+++ b/pkgs/development/libraries/haskell/blaze-html/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "blaze-html";
-  version = "0.6.0.0";
-  sha256 = "0n8jpmslcs29pfyb8jhp43dg4058ahd9y3kf2p2wr3r6b9yr5dll";
+  version = "0.6.1.1";
+  sha256 = "08zfmkvahmm613r0nrabwl5zv9ragcrhdqsa8jfdrfdkrf6ckbrc";
   buildDepends = [ blazeBuilder blazeMarkup text ];
   testDepends = [
     blazeBuilder blazeMarkup HUnit QuickCheck testFramework
diff --git a/pkgs/development/libraries/haskell/blaze-markup/default.nix b/pkgs/development/libraries/haskell/blaze-markup/default.nix
index afd607fe5e8..0c544119d5f 100644
--- a/pkgs/development/libraries/haskell/blaze-markup/default.nix
+++ b/pkgs/development/libraries/haskell/blaze-markup/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "blaze-markup";
-  version = "0.5.1.4";
-  sha256 = "0g316qhk7yv6y680w93613apfhm458a01g3jmq42yv4ndydkv4rr";
+  version = "0.5.1.5";
+  sha256 = "0g3smm1ym7h45bkzx94b77ssyg0z0gqfwbnap3ywa2381rb39l74";
   buildDepends = [ blazeBuilder text ];
   testDepends = [
     blazeBuilder HUnit QuickCheck testFramework testFrameworkHunit
diff --git a/pkgs/development/libraries/haskell/citeproc-hs/default.nix b/pkgs/development/libraries/haskell/citeproc-hs/default.nix
index b62714749e3..2c68fd24d1f 100644
--- a/pkgs/development/libraries/haskell/citeproc-hs/default.nix
+++ b/pkgs/development/libraries/haskell/citeproc-hs/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "citeproc-hs";
-  version = "0.3.7";
-  sha256 = "0ix9y7z8m8x4l10h96fgv820grywvwcp3019wxjja4y4w6irid3b";
+  version = "0.3.8";
+  sha256 = "0wlfwjxg852qcgx54m99xm7hxsmcw8c8r7fyrsxyxl3054xnfwz8";
   buildDepends = [
     filepath hexpat hsBibutils HTTP json mtl network pandocTypes parsec
     syb time utf8String
diff --git a/pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix b/pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix
index 6af68223834..c04b4dfc25e 100644
--- a/pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/classy-prelude-conduit/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "classy-prelude-conduit";
-  version = "0.5.1";
-  sha256 = "1vwcxwrbnczchq2b773kjjr3ysc47widak8qj0kwi26nf3jics4k";
+  version = "0.5.3";
+  sha256 = "1rmx439kdjipyz2s3v2s1xv1mb55kb4njl9k6f8mfhykgac39rhz";
   buildDepends = [
     classyPrelude conduit monadControl resourcet transformers void
     xmlConduit
diff --git a/pkgs/development/libraries/haskell/classy-prelude/default.nix b/pkgs/development/libraries/haskell/classy-prelude/default.nix
index 4c2f076039e..4d0f5441e41 100644
--- a/pkgs/development/libraries/haskell/classy-prelude/default.nix
+++ b/pkgs/development/libraries/haskell/classy-prelude/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "classy-prelude";
-  version = "0.5.1";
-  sha256 = "0kgnffqvh13adadp85iw4ybbs5jpa5hwrr2dsi2aj9p8lvzac1jy";
+  version = "0.5.3";
+  sha256 = "0xlhdxkxvrzj9y8wdl2f1pz94zz2gfa9vfbia9prhr7skirxvsad";
   buildDepends = [
     basicPrelude hashable liftedBase systemFilepath text transformers
     unorderedContainers vector
diff --git a/pkgs/development/libraries/haskell/cmdargs/default.nix b/pkgs/development/libraries/haskell/cmdargs/default.nix
index e6b208b0297..6780d02e674 100644
--- a/pkgs/development/libraries/haskell/cmdargs/default.nix
+++ b/pkgs/development/libraries/haskell/cmdargs/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "cmdargs";
-  version = "0.10.1";
-  sha256 = "0p7fzh65asn1bpzp137vfww97in2mkqfwwsk8hxzsdx32zi1nfz8";
+  version = "0.10.2";
+  sha256 = "0vn7c569akyabij2bh9myyvnx08w67dwdvx5g5q36b3ixzp0lrg4";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ filepath transformers ];
diff --git a/pkgs/development/libraries/haskell/conduit/default.nix b/pkgs/development/libraries/haskell/conduit/default.nix
index 4dada245791..8614b24bacc 100644
--- a/pkgs/development/libraries/haskell/conduit/default.nix
+++ b/pkgs/development/libraries/haskell/conduit/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "conduit";
-  version = "1.0.0";
-  sha256 = "1sx7s3awzb7y51prmmvrx9gxhd5068rbzwl719lfx3r50k94r00d";
+  version = "1.0.3";
+  sha256 = "1jvbm5v25h1m5a9gd0f417mhpabp3kcfzsjm8887gcyimp2d0z07";
   buildDepends = [
     liftedBase monadControl resourcet text transformers
     transformersBase void
diff --git a/pkgs/development/libraries/haskell/constraints/default.nix b/pkgs/development/libraries/haskell/constraints/default.nix
new file mode 100644
index 00000000000..0fe2cb8864a
--- /dev/null
+++ b/pkgs/development/libraries/haskell/constraints/default.nix
@@ -0,0 +1,15 @@
+{ cabal, newtype }:
+
+cabal.mkDerivation (self: {
+  pname = "constraints";
+  version = "0.3.2";
+  sha256 = "1fmjl6dh2iswvmq8r3izplp6zg9m8yq1c4rj0zpqjbv2iqsi4kl1";
+  buildDepends = [ newtype ];
+  meta = {
+    homepage = "http://github.com/ekmett/constraints/";
+    description = "Constraint manipulation";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.andres ];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/cuda/default.nix b/pkgs/development/libraries/haskell/cuda/default.nix
index a90efcdf4ca..f03e1907ec0 100644
--- a/pkgs/development/libraries/haskell/cuda/default.nix
+++ b/pkgs/development/libraries/haskell/cuda/default.nix
@@ -7,20 +7,18 @@ cabal.mkDerivation (self: {
   buildDepends = [ extensibleExceptions ];
   buildTools = [ c2hs ];
   extraLibraries = [ cudatoolkit nvidia_x11 self.stdenv.gcc ];
+  doCheck = false;
   # Perhaps this should be the default in cabal.nix ...
   #
   # The cudatoolkit provides both 64 and 32-bit versions of the
   # library. GHC's linker fails if the wrong version is found first.
   # We solve this by eliminating lib64 from the path on 32-bit
   # platforms and putting lib64 first on 64-bit platforms.
-
   libPaths = if self.stdenv.is64bit then "lib64 lib" else "lib";
-
   configurePhase = ''
     for i in Setup.hs Setup.lhs; do
       test -f $i && ghc --make $i
     done
-
     for p in $extraBuildInputs $propagatedNativeBuildInputs; do
       if [ -d "$p/include" ]; then
         extraLibDirs="$extraLibDirs --extra-include-dir=$p/include"
@@ -31,12 +29,8 @@ cabal.mkDerivation (self: {
         fi
       done
     done
-
     ./Setup configure --verbose --prefix="$out" $libraryProfiling $extraLibDirs $configureFlags
   '';
-
-  doCheck = false;
-
   meta = {
     description = "FFI binding to the CUDA interface for programming NVIDIA GPUs";
     license = self.stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/haskell/data-default/default.nix b/pkgs/development/libraries/haskell/data-default/default.nix
index 893f2121f0a..4fb21ed5f55 100644
--- a/pkgs/development/libraries/haskell/data-default/default.nix
+++ b/pkgs/development/libraries/haskell/data-default/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "data-default";
-  version = "0.5.0";
-  sha256 = "1wv8wjd9j40s7h19aph5pqph7rby5ma1nlagqywn9q0634iq9n2a";
+  version = "0.5.1";
+  sha256 = "05zp9bcxm4lcdqniwckq0zi014iqcnqbrk5wh54dyy83h97z6mpv";
   buildDepends = [ dlist ];
   meta = {
     description = "A class for types with a default value";
diff --git a/pkgs/development/libraries/haskell/diagrams/core.nix b/pkgs/development/libraries/haskell/diagrams/core.nix
index c087e27d025..ebea3fd6090 100644
--- a/pkgs/development/libraries/haskell/diagrams/core.nix
+++ b/pkgs/development/libraries/haskell/diagrams/core.nix
@@ -4,13 +4,12 @@
 
 cabal.mkDerivation (self: {
   pname = "diagrams-core";
-  version = "0.6.0.1";
-  sha256 = "0kw0rxk9a2zkpnbx4bfd0japm75y29ldvdn7i3c93kvz0p6jc2wa";
+  version = "0.6.0.2";
+  sha256 = "1g4b1zabgfdpaf7y3804r3w04ll4sqqrf71rm9389dg17ghc1q85";
   buildDepends = [
     dualTree MemoTrie monoidExtras newtype semigroups vectorSpace
     vectorSpacePoints
   ];
-  jailbreak = true;
   meta = {
     homepage = "http://projects.haskell.org/diagrams";
     description = "Core libraries for diagrams EDSL";
diff --git a/pkgs/development/libraries/haskell/digestive-functors-heist/default.nix b/pkgs/development/libraries/haskell/digestive-functors-heist/default.nix
index 0b7eb1e88de..48853c13655 100644
--- a/pkgs/development/libraries/haskell/digestive-functors-heist/default.nix
+++ b/pkgs/development/libraries/haskell/digestive-functors-heist/default.nix
@@ -1,11 +1,13 @@
-{ cabal, digestiveFunctors, heist, mtl, text, xmlhtml }:
+{ cabal, blazeBuilder, digestiveFunctors, heist, mtl, text, xmlhtml
+}:
 
 cabal.mkDerivation (self: {
   pname = "digestive-functors-heist";
-  version = "0.6.0.0";
-  sha256 = "17qndqsk09fvnvyhhw3xbbjjhfyyp4sivc898vqllyyky0wqmrdk";
-  buildDepends = [ digestiveFunctors heist mtl text xmlhtml ];
-  jailbreak = true;
+  version = "0.6.1.0";
+  sha256 = "08h883731cb5kqsv33f6dpf2lgh1r6qn9maqjkn5766vqf7m28nx";
+  buildDepends = [
+    blazeBuilder digestiveFunctors heist mtl text xmlhtml
+  ];
   meta = {
     homepage = "http://github.com/jaspervdj/digestive-functors";
     description = "Heist frontend for the digestive-functors library";
diff --git a/pkgs/development/libraries/haskell/distributive/default.nix b/pkgs/development/libraries/haskell/distributive/default.nix
index bd8b64aa509..d40952024ef 100644
--- a/pkgs/development/libraries/haskell/distributive/default.nix
+++ b/pkgs/development/libraries/haskell/distributive/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "distributive";
-  version = "0.3";
-  sha256 = "0z6vwak2n91vpx9ps9j1pbiw0zlh9jmds84yx1yqssbqx8npi32f";
+  version = "0.3.1";
+  sha256 = "0zf3wq1xz9sbb0g6fg852jckrwkffsfkghq3zx03d2q9ginc6jbc";
   buildDepends = [ transformers transformersCompat ];
   testDepends = [ doctest filepath ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/doctest/default.nix b/pkgs/development/libraries/haskell/doctest/default.nix
index 3c8988400bc..ce418a8d053 100644
--- a/pkgs/development/libraries/haskell/doctest/default.nix
+++ b/pkgs/development/libraries/haskell/doctest/default.nix
@@ -13,6 +13,7 @@ cabal.mkDerivation (self: {
     baseCompat deepseq filepath ghcPaths hspec HUnit QuickCheck setenv
     silently stringbuilder syb transformers
   ];
+  jailbreak = true;
   doCheck = false;
   meta = {
     homepage = "https://github.com/sol/doctest-haskell#readme";
diff --git a/pkgs/development/libraries/haskell/flexible-defaults/default.nix b/pkgs/development/libraries/haskell/flexible-defaults/default.nix
index 9cba8f2c13f..7be21dbbf34 100644
--- a/pkgs/development/libraries/haskell/flexible-defaults/default.nix
+++ b/pkgs/development/libraries/haskell/flexible-defaults/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "flexible-defaults";
-  version = "0.0.1.0";
-  sha256 = "0vq8ci3zbzmw8abjd12dhjiqzz4ckr99c1fqk32qsp5bvm81bdma";
+  version = "0.0.1.1";
+  sha256 = "0cbp8hb7y29xz3hl780173cs6ca4df0r98fz7v3drqr46aq55ipl";
   buildDepends = [ thExtras transformers ];
   meta = {
     homepage = "https://github.com/mokus0/flexible-defaults";
diff --git a/pkgs/development/libraries/haskell/ghc-mod/default.nix b/pkgs/development/libraries/haskell/ghc-mod/default.nix
index f85b7f8e208..3e86d440d5d 100644
--- a/pkgs/development/libraries/haskell/ghc-mod/default.nix
+++ b/pkgs/development/libraries/haskell/ghc-mod/default.nix
@@ -1,16 +1,20 @@
 { cabal, Cabal, convertible, emacs, filepath, ghcPaths, ghcSybUtils
-, hlint, ioChoice, regexPosix, syb, time, transformers
+, hlint, hspec, ioChoice, syb, time, transformers
 }:
 
 cabal.mkDerivation (self: {
   pname = "ghc-mod";
-  version = "1.11.4";
-  sha256 = "1bxmpvad415ayzwyijjm0zsck0z8aa1nfjixwb6l80i6lbxi4rfg";
+  version = "1.12.2";
+  sha256 = "0kwf1szw26iz4sw2slv10birpngf1cfy9jzmllzr0nvybh1pv7a9";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
-    Cabal convertible filepath ghcPaths ghcSybUtils hlint ioChoice
-    regexPosix syb time transformers
+    Cabal convertible filepath ghcPaths ghcSybUtils hlint ioChoice syb
+    time transformers
+  ];
+  testDepends = [
+    Cabal convertible filepath ghcPaths ghcSybUtils hlint hspec
+    ioChoice syb time transformers
   ];
   buildTools = [ emacs ];
   postInstall = ''
diff --git a/pkgs/development/libraries/haskell/ghc-vis/default.nix b/pkgs/development/libraries/haskell/ghc-vis/default.nix
index 4b606e8b73b..3fd1230073e 100644
--- a/pkgs/development/libraries/haskell/ghc-vis/default.nix
+++ b/pkgs/development/libraries/haskell/ghc-vis/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "ghc-vis";
-  version = "0.6";
-  sha256 = "0gvfs0f6fjg4bzq9q6rrhin6gk1pbyw9qbigi90cz1fg10nq7nzi";
+  version = "0.6.1";
+  sha256 = "0q0v1l44vagcg0nl4iv8m872g4qblj9syjlcgbf6fpgx1fqnyp24";
   buildDepends = [
     cairo deepseq fgl ghcHeapView graphviz gtk mtl svgcairo text
     transformers xdot
diff --git a/pkgs/development/libraries/haskell/github/default.nix b/pkgs/development/libraries/haskell/github/default.nix
new file mode 100644
index 00000000000..3eafcd70940
--- /dev/null
+++ b/pkgs/development/libraries/haskell/github/default.nix
@@ -0,0 +1,25 @@
+{ cabal, fetchurl, aeson, attoparsec, caseInsensitive, conduit, dataDefault
+, failure, HTTP, httpConduit, httpTypes, network, text, time
+, unorderedContainers, vector
+}:
+
+cabal.mkDerivation (self: {
+  pname = "github";
+  version = "0.5.0-patched";
+  src = fetchurl {
+    url = "https://github.com/mike-burns/github/archive/df415af64ebd4a28f1f8e5cc726e933545efdd7e.tar.gz";
+    sha256 = "1d1ya5j1qz1nf5kfkxp48gb0xbcr4fmf9y0kfpd3gxivfrdkfrig";
+    name = "github-${self.version}.tar.gz";
+  };
+  patches = [ (fetchurl { url = "https://github.com/mike-burns/github/pull/33.patch"; sha256 = "1d0m73ygzpk5rd6ahbrf58mxca56s5sd70yrf7fn2r1bh0rlacap"; }) ];
+  buildDepends = [
+    aeson attoparsec caseInsensitive conduit dataDefault failure HTTP
+    httpConduit httpTypes network text time unorderedContainers vector
+  ];
+  meta = {
+    homepage = "https://github.com/mike-burns/github";
+    description = "Access to the Github API, v3";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/gitit/default.nix b/pkgs/development/libraries/haskell/gitit/default.nix
index b38774cd02b..1c7dfdd10e1 100644
--- a/pkgs/development/libraries/haskell/gitit/default.nix
+++ b/pkgs/development/libraries/haskell/gitit/default.nix
@@ -7,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "gitit";
-  version = "0.10.2";
-  sha256 = "07zdc1qx429rmisb39gdamwn9b1jblvjg7py4fcxx3qj01b6mvxx";
+  version = "0.10.3";
+  sha256 = "1hz4ddym2vn01nd22gb995dya48fzc7nsmsqywdc8hjczmn93qyg";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
@@ -18,7 +18,6 @@ cabal.mkDerivation (self: {
     safe SHA syb tagsoup text time url utf8String xhtml xml xssSanitize
     zlib
   ];
-  jailbreak = true;
   meta = {
     homepage = "http://gitit.net";
     description = "Wiki using happstack, git or darcs, and pandoc";
diff --git a/pkgs/development/libraries/haskell/hakyll/default.nix b/pkgs/development/libraries/haskell/hakyll/default.nix
index 2ca90094bb8..35204f853a3 100644
--- a/pkgs/development/libraries/haskell/hakyll/default.nix
+++ b/pkgs/development/libraries/haskell/hakyll/default.nix
@@ -7,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "hakyll";
-  version = "4.1.4.0";
-  sha256 = "0nhr7ai03hx2qjxlqml0js43iwxhcbpdqkwdvw8pqs396yrjwxdj";
+  version = "4.2.1.2";
+  sha256 = "0b2jmi9hi5l72lkyjn2w3gwn52zvnvv7c10x5329hp000gzmwbvi";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
@@ -19,10 +19,9 @@ cabal.mkDerivation (self: {
   testDepends = [
     binary blazeHtml blazeMarkup citeprocHs cmdargs cryptohash deepseq
     filepath httpConduit httpTypes HUnit lrucache mtl pandoc parsec
-    QuickCheck random regexBase regexTdfa tagsoup testFramework
-    testFrameworkHunit testFrameworkQuickcheck2 text time
+    QuickCheck random regexBase regexTdfa snapCore snapServer tagsoup
+    testFramework testFrameworkHunit testFrameworkQuickcheck2 text time
   ];
-  jailbreak = true;
   doCheck = false;
   meta = {
     homepage = "http://jaspervdj.be/hakyll";
diff --git a/pkgs/development/libraries/haskell/happstack/happstack-server.nix b/pkgs/development/libraries/haskell/happstack/happstack-server.nix
index 8d8261df97e..0185e4e6ce9 100644
--- a/pkgs/development/libraries/haskell/happstack/happstack-server.nix
+++ b/pkgs/development/libraries/haskell/happstack/happstack-server.nix
@@ -7,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "happstack-server";
-  version = "7.1.6";
-  sha256 = "0gifq625kclam6sgblwa8a1vhxmx8saanzlrikch0l9q0l95nfwd";
+  version = "7.1.7";
+  sha256 = "1gd7qa224z04aya44fdrbhpiy5iw88wjcvqihz6l95ks9ilbzmg7";
   buildDepends = [
     base64Bytestring blazeHtml extensibleExceptions filepath hslogger
     html monadControl mtl network parsec sendfile syb systemFilepath
diff --git a/pkgs/development/libraries/haskell/haskell-src-meta/default.nix b/pkgs/development/libraries/haskell/haskell-src-meta/default.nix
index 1d9bba47b4b..7b6ccb69633 100644
--- a/pkgs/development/libraries/haskell/haskell-src-meta/default.nix
+++ b/pkgs/development/libraries/haskell/haskell-src-meta/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "haskell-src-meta";
-  version = "0.6.0.1";
-  sha256 = "181xjajvppipzgknmbhbb1i2r8rimbr5vzn6gf1ksddgw12sargd";
+  version = "0.6.0.2";
+  sha256 = "1msqnsavghsc5bil3mm9swpi9a54pki4162jdfwwvlzvdmfvk9hp";
   buildDepends = [ haskellSrcExts syb thOrphans uniplate ];
   meta = {
     description = "Parse source to template-haskell abstract syntax";
diff --git a/pkgs/development/libraries/haskell/heist/default.nix b/pkgs/development/libraries/haskell/heist/default.nix
index 526a9b6ed87..45ff3fea7f0 100644
--- a/pkgs/development/libraries/haskell/heist/default.nix
+++ b/pkgs/development/libraries/haskell/heist/default.nix
@@ -5,14 +5,13 @@
 
 cabal.mkDerivation (self: {
   pname = "heist";
-  version = "0.11.0.1";
-  sha256 = "0d5nn0kfs7hbgs4b77i8c8pq2q5hldqk08dacva7xlxvjrlxsyn6";
+  version = "0.11.1";
+  sha256 = "17d6jycgxx5fz8sd3wnln53im29vz8l9847qsqbpyx8adrcg7rjh";
   buildDepends = [
     aeson attoparsec blazeBuilder blazeHtml directoryTree dlist errors
     filepath hashable MonadCatchIOTransformers mtl random text time
     unorderedContainers vector xmlhtml
   ];
-  jailbreak = true;
   meta = {
     homepage = "http://snapframework.com/";
     description = "An Haskell template system supporting both HTML5 and XML";
diff --git a/pkgs/development/libraries/haskell/highlighting-kate/default.nix b/pkgs/development/libraries/haskell/highlighting-kate/default.nix
index 805519d3d30..9d6185dc526 100644
--- a/pkgs/development/libraries/haskell/highlighting-kate/default.nix
+++ b/pkgs/development/libraries/haskell/highlighting-kate/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "highlighting-kate";
-  version = "0.5.3.7";
-  sha256 = "04wa1al83v5ak6gvrwqy2b63mda0qfi2ircxfs9ddk1gkdscrlrl";
+  version = "0.5.3.8";
+  sha256 = "1fdgmwhiw05mgbgsrgyzvdqzklw9r10nswxfpnxkh5ivfxrhz82w";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ blazeHtml filepath mtl parsec regexPcre ];
diff --git a/pkgs/development/libraries/haskell/hint/default.nix b/pkgs/development/libraries/haskell/hint/default.nix
index 106b8591778..8cf1accca9c 100644
--- a/pkgs/development/libraries/haskell/hint/default.nix
+++ b/pkgs/development/libraries/haskell/hint/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "hint";
-  version = "0.3.3.5";
-  sha256 = "09pd4b105c2ikf4ap96fz8091qra7hypq3k3ik0kay3bb532hmlq";
+  version = "0.3.3.6";
+  sha256 = "080wnds99lg9p4n2h9d4bpgvk73yzc3im2ysn1r8f3nqai4b2can";
   buildDepends = [
     extensibleExceptions filepath ghcMtl ghcPaths haskellSrc
     MonadCatchIOMtl mtl random utf8String
diff --git a/pkgs/development/libraries/haskell/hp2any-core/default.nix b/pkgs/development/libraries/haskell/hp2any-core/default.nix
index 37e6000a3c0..96ac397da79 100644
--- a/pkgs/development/libraries/haskell/hp2any-core/default.nix
+++ b/pkgs/development/libraries/haskell/hp2any-core/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "hp2any-core";
-  version = "0.11.1";
-  sha256 = "146bigmch7dawyyakj0w55p0jdpnxkj8q5izjsswqqk0pdxia546";
+  version = "0.11.2";
+  sha256 = "1gmw9bggw8hsp6pi0xgrryf0sqjb1aaxbwh85q5h72h4ixskwn1y";
   buildDepends = [ attoparsec filepath network time ];
   meta = {
     homepage = "http://www.haskell.org/haskellwiki/Hp2any";
diff --git a/pkgs/development/libraries/haskell/hp2any-graph/default.nix b/pkgs/development/libraries/haskell/hp2any-graph/default.nix
index 98b9518c7de..83369ac008b 100644
--- a/pkgs/development/libraries/haskell/hp2any-graph/default.nix
+++ b/pkgs/development/libraries/haskell/hp2any-graph/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "hp2any-graph";
-  version = "0.5.3";
-  sha256 = "1al20pxfgkgwynrx7vr0i57342s91lcm3cnd9qjx8b6vkqmzykkq";
+  version = "0.5.4";
+  sha256 = "1lhp9saw51w09fhk94hz31rjawnnxavd7x3lxjc8xn1778wp3v9h";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/http-conduit/default.nix b/pkgs/development/libraries/haskell/http-conduit/default.nix
index 5ff4b4cd95e..715d5ce7dba 100644
--- a/pkgs/development/libraries/haskell/http-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/http-conduit/default.nix
@@ -1,29 +1,29 @@
-{ cabal, asn1Data, attoparsec, attoparsecConduit, base64Bytestring
-, blazeBuilder, blazeBuilderConduit, caseInsensitive, certificate
-, conduit, cookie, cprngAes, dataDefault, deepseq, failure
-, filepath, hspec, httpTypes, HUnit, liftedBase, mimeTypes
-, monadControl, mtl, network, networkConduit, random, regexCompat
+{ cabal, asn1Data, base64Bytestring, blazeBuilder
+, blazeBuilderConduit, caseInsensitive, certificate, conduit
+, cookie, cprngAes, dataDefault, deepseq, failure, filepath, hspec
+, httpTypes, HUnit, liftedBase, mimeTypes, monadControl, mtl
+, network, networkConduit, publicsuffixlist, random, regexCompat
 , resourcet, socks, text, time, tls, tlsExtra, transformers
 , transformersBase, utf8String, void, wai, warp, zlibConduit
 }:
 
 cabal.mkDerivation (self: {
   pname = "http-conduit";
-  version = "1.8.9";
-  sha256 = "0v99nc29h4qm1dbs7bwk4nwhxwk22vzl4ghrq9r3vishi6gwr7hb";
+  version = "1.9.2.1";
+  sha256 = "1zzw9gdljn7pmp0d6k051gp1wiw9412c3gdbpwbpng6m5jhk079i";
   buildDepends = [
-    asn1Data attoparsec attoparsecConduit base64Bytestring blazeBuilder
-    blazeBuilderConduit caseInsensitive certificate conduit cookie
-    cprngAes dataDefault deepseq failure filepath httpTypes liftedBase
-    mimeTypes monadControl mtl network random regexCompat resourcet
-    socks text time tls tlsExtra transformers transformersBase
-    utf8String void zlibConduit
+    asn1Data base64Bytestring blazeBuilder blazeBuilderConduit
+    caseInsensitive certificate conduit cookie cprngAes dataDefault
+    deepseq failure filepath httpTypes liftedBase mimeTypes
+    monadControl mtl network publicsuffixlist random regexCompat
+    resourcet socks text time tls tlsExtra transformers
+    transformersBase utf8String void zlibConduit
   ];
   testDepends = [
-    asn1Data attoparsec attoparsecConduit base64Bytestring blazeBuilder
-    blazeBuilderConduit caseInsensitive certificate conduit cookie
-    cprngAes dataDefault deepseq failure filepath hspec httpTypes HUnit
-    liftedBase mimeTypes monadControl mtl network networkConduit random
+    asn1Data base64Bytestring blazeBuilder blazeBuilderConduit
+    caseInsensitive certificate conduit cookie cprngAes dataDefault
+    deepseq failure filepath hspec httpTypes HUnit liftedBase mimeTypes
+    monadControl mtl network networkConduit publicsuffixlist random
     regexCompat resourcet socks text time tls tlsExtra transformers
     transformersBase utf8String void wai warp zlibConduit
   ];
diff --git a/pkgs/development/libraries/haskell/iproute/default.nix b/pkgs/development/libraries/haskell/iproute/default.nix
index 1ec2b659f0c..045bb64035c 100644
--- a/pkgs/development/libraries/haskell/iproute/default.nix
+++ b/pkgs/development/libraries/haskell/iproute/default.nix
@@ -1,14 +1,14 @@
 { cabal, appar, byteorder, doctest, hspec, network, QuickCheck
-, Safe
+, safe
 }:
 
 cabal.mkDerivation (self: {
   pname = "iproute";
-  version = "1.2.10";
-  sha256 = "1ni91llvq1mfdsjmw1laqhk964y4vlpyk5s25j8klsfn27mq6c68";
+  version = "1.2.11";
+  sha256 = "14f96sb41f5m14186900rz84vwv7idjiylp8m5nsm6gganvh4sh4";
   buildDepends = [ appar byteorder network ];
   testDepends = [
-    appar byteorder doctest hspec network QuickCheck Safe
+    appar byteorder doctest hspec network QuickCheck safe
   ];
   meta = {
     homepage = "http://www.mew.org/~kazu/proj/iproute/";
diff --git a/pkgs/development/libraries/haskell/liblastfm/default.nix b/pkgs/development/libraries/haskell/liblastfm/default.nix
index d9a04355e2e..3222f4607e7 100644
--- a/pkgs/development/libraries/haskell/liblastfm/default.nix
+++ b/pkgs/development/libraries/haskell/liblastfm/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "liblastfm";
-  version = "0.1.0.0";
-  sha256 = "1777p2zysha9z389dkzvc22wph5k2xa6f23xk1ckr8j1q5v9dg6x";
+  version = "0.1.1.0";
+  sha256 = "1yrgyb0m1gdhsrkv3b8a5a0qii67v9gx1kbv79ixlac60bsm4q95";
   buildDepends = [
     aeson cereal cryptoApi httpConduit httpTypes network pureMD5 text
   ];
diff --git a/pkgs/development/libraries/haskell/monad-control/default.nix b/pkgs/development/libraries/haskell/monad-control/default.nix
index bf27ac461c3..1cdf917cf8f 100644
--- a/pkgs/development/libraries/haskell/monad-control/default.nix
+++ b/pkgs/development/libraries/haskell/monad-control/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "monad-control";
-  version = "0.3.1.4";
-  sha256 = "0mvcj6rljh2drkpf29zavwsqpzd9lw7s0n4inxm82i2017xdazy1";
+  version = "0.3.2";
+  sha256 = "1gw1g89cjr993kcxjd1lvj94klrb8hsxn0yzyl1gmfk4273z39pa";
   buildDepends = [
     baseUnicodeSymbols transformers transformersBase
   ];
diff --git a/pkgs/development/libraries/haskell/monad-logger/default.nix b/pkgs/development/libraries/haskell/monad-logger/default.nix
index 173529b443d..c06809c261d 100644
--- a/pkgs/development/libraries/haskell/monad-logger/default.nix
+++ b/pkgs/development/libraries/haskell/monad-logger/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "monad-logger";
-  version = "0.3.0.1";
-  sha256 = "05pwccs2f5qn22cwvzaiw6bflyxl3avrl89y737rjcsw6755r5sr";
+  version = "0.3.1.1";
+  sha256 = "11qqmflcydjfm5py7rkbi9qd0mkhw4kxzxff95wf0jmaia9knvx6";
   buildDepends = [
     conduit fastLogger monadControl mtl resourcet text transformers
     transformersBase
diff --git a/pkgs/development/libraries/haskell/multiarg/default.nix b/pkgs/development/libraries/haskell/multiarg/default.nix
index 74254a4c591..0a2495a07e9 100644
--- a/pkgs/development/libraries/haskell/multiarg/default.nix
+++ b/pkgs/development/libraries/haskell/multiarg/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "multiarg";
-  version = "0.8.0.0";
-  sha256 = "17zfrm9zjf7c8g7q9vqj1srk0g766ifhwqp7gm4ql890541q5lv5";
+  version = "0.10.0.0";
+  sha256 = "09clgin66i2m0b3ws7di9p15cy9bd144as832xpx4li6cfbg16ip";
   buildDepends = [ explicitException utf8String ];
   meta = {
     homepage = "https://github.com/massysett/multiarg";
diff --git a/pkgs/development/libraries/haskell/numbers/default.nix b/pkgs/development/libraries/haskell/numbers/default.nix
index e0136ad5d45..81a3e866dc0 100644
--- a/pkgs/development/libraries/haskell/numbers/default.nix
+++ b/pkgs/development/libraries/haskell/numbers/default.nix
@@ -2,14 +2,13 @@
 
 cabal.mkDerivation (self: {
   pname = "numbers";
-  version = "3000.1.0.1";
-  sha256 = "0r2s47nfdxasnp8j7giwpxls9v48f6ld0gc2hg2p7y2ar5xfrcc4";
+  version = "3000.1.0.3";
+  sha256 = "0w2m2m3vp3lpvnc7wkw6pqfz741a68dma4s0asl7cryykwf94xgz";
   testDepends = [
     QuickCheck testFramework testFrameworkQuickcheck2
   ];
-  doCheck = false;
   meta = {
-    homepage = "https://github.com/DanBurton/numbers";
+    homepage = "https://github.com/DanBurton/numbers#readme";
     description = "Various number types";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
diff --git a/pkgs/development/libraries/haskell/pandoc/default.nix b/pkgs/development/libraries/haskell/pandoc/default.nix
index 93f7e8add42..184e3fd9536 100644
--- a/pkgs/development/libraries/haskell/pandoc/default.nix
+++ b/pkgs/development/libraries/haskell/pandoc/default.nix
@@ -1,13 +1,15 @@
-{ cabal, base64Bytestring, blazeHtml, blazeMarkup, citeprocHs
-, dataDefault, extensibleExceptions, filepath, highlightingKate
-, HTTP, json, mtl, network, pandocTypes, parsec, random, syb
-, tagsoup, temporary, texmath, text, time, xml, zipArchive, zlib
+{ cabal, ansiTerminal, base64Bytestring, blazeHtml, blazeMarkup
+, citeprocHs, dataDefault, Diff, extensibleExceptions, filepath
+, highlightingKate, HTTP, HUnit, json, mtl, network, pandocTypes
+, parsec, QuickCheck, random, syb, tagsoup, temporary
+, testFramework, testFrameworkHunit, testFrameworkQuickcheck2
+, texmath, text, time, xml, zipArchive, zlib
 }:
 
 cabal.mkDerivation (self: {
   pname = "pandoc";
-  version = "1.10.1";
-  sha256 = "127pxs1w99nr6hdancaajm20w3vgmch4xlj0v7221y7i9qcr1y1y";
+  version = "1.11";
+  sha256 = "1v32z6fmfkllwf5y64sjbk3ckss2kfcs71b64a7fjdhp82m4i4yh";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
@@ -16,10 +18,13 @@ cabal.mkDerivation (self: {
     network pandocTypes parsec random syb tagsoup temporary texmath
     text time xml zipArchive zlib
   ];
+  testDepends = [
+    ansiTerminal Diff filepath highlightingKate HUnit pandocTypes
+    QuickCheck syb testFramework testFrameworkHunit
+    testFrameworkQuickcheck2 text
+  ];
   configureFlags = "-fblaze_html_0_5";
-  patchPhase = ''
-    sed -r -i -e 's|blaze-html >= 0.5 && < 0.6,|blaze-html >= 0.5,|' pandoc.cabal
-  '';
+  patchPhase = "sed -i -e 's|QuickCheck >= 2.4 && < 2.6,|QuickCheck,|' pandoc.cabal";
   doCheck = false;
   meta = {
     homepage = "http://johnmacfarlane.net/pandoc";
diff --git a/pkgs/development/libraries/haskell/persistent-sqlite/default.nix b/pkgs/development/libraries/haskell/persistent-sqlite/default.nix
index 418c8c4ca74..947f75342d4 100644
--- a/pkgs/development/libraries/haskell/persistent-sqlite/default.nix
+++ b/pkgs/development/libraries/haskell/persistent-sqlite/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "persistent-sqlite";
-  version = "1.1.4";
-  sha256 = "1xllj5bq7rw9v32ddm515705nviarw0hp4yxj0z8jf5q5jdz2vz0";
+  version = "1.1.5";
+  sha256 = "1kqxp0qsvxfz352yg9k1wgb2nfm7kcz8xdj9q537ilh99wxkp6cl";
   buildDepends = [
     aeson conduit monadControl monadLogger persistent text transformers
   ];
diff --git a/pkgs/development/libraries/haskell/persistent-template/default.nix b/pkgs/development/libraries/haskell/persistent-template/default.nix
index 117a63618d4..8cdc7caafc9 100644
--- a/pkgs/development/libraries/haskell/persistent-template/default.nix
+++ b/pkgs/development/libraries/haskell/persistent-template/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "persistent-template";
-  version = "1.1.2.4";
-  sha256 = "0fsqyv5r6h356shmah6bs75fzds0fsmyizbnvj5ywzhc003jv5h9";
+  version = "1.1.2.5";
+  sha256 = "142b02ini1b5c566rzhykv45n4byzvhp9r6yyavy4zyvgdj7ligj";
   buildDepends = [ aeson monadControl persistent text transformers ];
   testDepends = [ aeson hspec persistent QuickCheck text ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/publicsuffixlist/default.nix b/pkgs/development/libraries/haskell/publicsuffixlist/default.nix
index 1f38962ddd3..a091b62b3b1 100644
--- a/pkgs/development/libraries/haskell/publicsuffixlist/default.nix
+++ b/pkgs/development/libraries/haskell/publicsuffixlist/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "publicsuffixlist";
-  version = "0.0.3";
-  sha256 = "1drsm1zp30629rzy0693ggzcx46b7ydzzafmf07mjanmn1kyyqci";
+  version = "0.0.4";
+  sha256 = "0qwx2739pmmjfy6w3iri1fgyin3295vzn6rvazh34qd89i5vi3pb";
   buildDepends = [ cereal dataDefault text utf8String ];
   testDepends = [ cereal dataDefault HUnit idna text utf8String ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/punycode/default.nix b/pkgs/development/libraries/haskell/punycode/default.nix
index ade7685be6e..a4ad760d8ff 100644
--- a/pkgs/development/libraries/haskell/punycode/default.nix
+++ b/pkgs/development/libraries/haskell/punycode/default.nix
@@ -6,6 +6,7 @@ cabal.mkDerivation (self: {
   sha256 = "192jgfixnpxdj6jiiz92kx5bi6ij3c389b76q9f4vyfmvcajj1sr";
   buildDepends = [ cereal mtl text ];
   testDepends = [ cereal encoding HUnit mtl QuickCheck text ];
+  doCheck = false;
   meta = {
     homepage = "https://github.com/litherum/punycode";
     description = "Encode unicode strings to ascii forms according to RFC 3492";
diff --git a/pkgs/development/libraries/haskell/resourcet/default.nix b/pkgs/development/libraries/haskell/resourcet/default.nix
index 35b7fec3276..f0dde62ef97 100644
--- a/pkgs/development/libraries/haskell/resourcet/default.nix
+++ b/pkgs/development/libraries/haskell/resourcet/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "resourcet";
-  version = "0.4.4";
-  sha256 = "0ad1hl7bl9qid4brchb95gvnylfchmxncgdvgljb5lci7gy9r31z";
+  version = "0.4.5";
+  sha256 = "1i2n0y4ridlzi2fn319f8jg1whb10gajgyvbz0rx2mwxj15bbgni";
   buildDepends = [
     liftedBase monadControl mtl transformers transformersBase
   ];
diff --git a/pkgs/development/libraries/haskell/shake/default.nix b/pkgs/development/libraries/haskell/shake/default.nix
new file mode 100644
index 00000000000..dd4f985e618
--- /dev/null
+++ b/pkgs/development/libraries/haskell/shake/default.nix
@@ -0,0 +1,21 @@
+{ cabal, binary, deepseq, filepath, hashable, random, time
+, transformers, unorderedContainers
+}:
+
+cabal.mkDerivation (self: {
+  pname = "shake";
+  version = "0.9.1";
+  sha256 = "19jpnf7794ii1v0rfafmcrs71flwz6hmz72ng529ll12iy64xwkv";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [
+    binary deepseq filepath hashable random time transformers
+    unorderedContainers
+  ];
+  meta = {
+    homepage = "http://community.haskell.org/~ndm/shake/";
+    description = "Build system library, like Make, but more accurate dependencies";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/shakespeare-js/default.nix b/pkgs/development/libraries/haskell/shakespeare-js/default.nix
index 55bf276d1f8..7f00530a7f9 100644
--- a/pkgs/development/libraries/haskell/shakespeare-js/default.nix
+++ b/pkgs/development/libraries/haskell/shakespeare-js/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "shakespeare-js";
-  version = "1.1.2";
-  sha256 = "0iwajn0d0yngzp10j9qbb2gpq1g7r390yqd7pj5dri35rjc6mr8n";
+  version = "1.1.2.1";
+  sha256 = "049nn0p236wbm2majkih87n2c7h65xrnf6gydsi7najxccjl7y8z";
   buildDepends = [ aeson shakespeare text ];
   testDepends = [ aeson hspec HUnit shakespeare text ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/shelly/default.nix b/pkgs/development/libraries/haskell/shelly/default.nix
index 325021c1cca..1e9e1f8c6cc 100644
--- a/pkgs/development/libraries/haskell/shelly/default.nix
+++ b/pkgs/development/libraries/haskell/shelly/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "shelly";
-  version = "0.15.4";
-  sha256 = "1b8fn5fa350hhlswn97g6zn9454nzn9sz60x55j959phwys0fcdk";
+  version = "0.15.4.1";
+  sha256 = "12m11s22izz0ny1syb1ykp2hi9n240myf0nhapvn8jx1fgf5iyck";
   buildDepends = [
     mtl systemFileio systemFilepath text time unixCompat
   ];
diff --git a/pkgs/development/libraries/haskell/smallcheck/default.nix b/pkgs/development/libraries/haskell/smallcheck/default.nix
index b7b0dc8e974..6d82e7e5132 100644
--- a/pkgs/development/libraries/haskell/smallcheck/default.nix
+++ b/pkgs/development/libraries/haskell/smallcheck/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "smallcheck";
-  version = "1.0.1";
-  sha256 = "1b8g7vgvwyz2smx16gbn73k749mazj2zmr2hjhqj4rk0433i6lpk";
+  version = "1.0.2";
+  sha256 = "09zlsvgbwgpjwkjhizbzzww2nvkyxvkf214yqxzfaa1cj9xzbbdi";
   buildDepends = [ logict mtl ];
   meta = {
     homepage = "https://github.com/feuerbach/smallcheck";
diff --git a/pkgs/development/libraries/haskell/stylish-haskell/default.nix b/pkgs/development/libraries/haskell/stylish-haskell/default.nix
index 18105124962..1d2cea756ff 100644
--- a/pkgs/development/libraries/haskell/stylish-haskell/default.nix
+++ b/pkgs/development/libraries/haskell/stylish-haskell/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "stylish-haskell";
-  version = "0.5.6.0";
-  sha256 = "1cy40b7csna3fwq0bm5mx9d09x52vj517mf38yn8ymd0afff67sb";
+  version = "0.5.6.1";
+  sha256 = "0fxncnl9bvb7qjha3r06qli9qlzfljism6k688hrr9y6l06jdc2c";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/syb/0.4.0.nix b/pkgs/development/libraries/haskell/syb/0.4.0.nix
new file mode 100644
index 00000000000..7408d0ac537
--- /dev/null
+++ b/pkgs/development/libraries/haskell/syb/0.4.0.nix
@@ -0,0 +1,15 @@
+{ cabal, HUnit, mtl }:
+
+cabal.mkDerivation (self: {
+  pname = "syb";
+  version = "0.4.0";
+  sha256 = "1wxz8y2dcjl407l596qswcl9cakbb5cs4wzwlyy6qjz7lyd0h0gj";
+  testDepends = [ HUnit mtl ];
+  meta = {
+    homepage = "http://www.cs.uu.nl/wiki/GenericProgramming/SYB";
+    description = "Scrap Your Boilerplate";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.andres ];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix b/pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix
index 77e201ca63d..b944c1e104c 100644
--- a/pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix
+++ b/pkgs/development/libraries/haskell/test-framework-quickcheck2/default.nix
@@ -7,6 +7,7 @@ cabal.mkDerivation (self: {
   buildDepends = [
     extensibleExceptions QuickCheck random testFramework
   ];
+  jailbreak = true;
   meta = {
     homepage = "http://batterseapower.github.com/test-framework/";
     description = "QuickCheck2 support for the test-framework package";
diff --git a/pkgs/development/libraries/haskell/testpack/default.nix b/pkgs/development/libraries/haskell/testpack/default.nix
index 53aa0ee8613..9dc14f2f5ac 100644
--- a/pkgs/development/libraries/haskell/testpack/default.nix
+++ b/pkgs/development/libraries/haskell/testpack/default.nix
@@ -2,10 +2,11 @@
 
 cabal.mkDerivation (self: {
   pname = "testpack";
-  version = "2.1.2";
-  sha256 = "12dhl8svy0wmdwlvkp0p0j6wr6vgv4hrjcpdv48kc5rcwjvh8xif";
+  version = "2.1.2.1";
+  sha256 = "1fm4dy9vs2whc48cr00ncqqzz6r5yp7bvgil86idbbgi8igld5j0";
   buildDepends = [ HUnit mtl QuickCheck random ];
   patches = [ ./support-recent-quickcheck.patch ];
+  jailbreak = true;
   meta = {
     homepage = "http://hackage.haskell.org/cgi-bin/hackage-scripts/package/testpack";
     description = "Test Utililty Pack for HUnit and QuickCheck";
diff --git a/pkgs/development/libraries/haskell/th-extras/default.nix b/pkgs/development/libraries/haskell/th-extras/default.nix
index be78bbaef31..3475ccb804a 100644
--- a/pkgs/development/libraries/haskell/th-extras/default.nix
+++ b/pkgs/development/libraries/haskell/th-extras/default.nix
@@ -2,12 +2,12 @@
 
 cabal.mkDerivation (self: {
   pname = "th-extras";
-  version = "0.0.0.1";
-  sha256 = "13d9fs48z87inma3kg9b7lfjp3h8j85fav6awd1zj3i2nl214hff";
+  version = "0.0.0.2";
+  sha256 = "15sqf2jjnqcssq8hp80fk0ysgwqykjjc31gvvmzg4sypskpjs8cl";
   buildDepends = [ syb ];
   meta = {
     homepage = "https://github.com/mokus0/th-extras";
-    description = "A grab bag of useful functions for use with Template Haskell";
+    description = "A grab bag of functions for use with Template Haskell";
     license = self.stdenv.lib.licenses.publicDomain;
     platforms = self.ghc.meta.platforms;
     maintainers = [ self.stdenv.lib.maintainers.andres ];
diff --git a/pkgs/development/libraries/haskell/threads/default.nix b/pkgs/development/libraries/haskell/threads/default.nix
index 533a67c99c8..d802790da9d 100644
--- a/pkgs/development/libraries/haskell/threads/default.nix
+++ b/pkgs/development/libraries/haskell/threads/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "threads";
-  version = "0.5.0.1";
-  sha256 = "0amyaxa70q6v021nab6v3cfqc40mwj5dr2fwla9d4bm6ppmq6lyy";
+  version = "0.5.0.2";
+  sha256 = "14ccmjg56429a3mzx11ccv18bvkqg56ph9kbpmhdx2ajar80g6jm";
   buildDepends = [ baseUnicodeSymbols stm ];
   testDepends = [
     baseUnicodeSymbols concurrentExtra HUnit stm testFramework
diff --git a/pkgs/development/libraries/haskell/time-compat/default.nix b/pkgs/development/libraries/haskell/time-compat/default.nix
index e42224ace0d..fa7c3ff4185 100644
--- a/pkgs/development/libraries/haskell/time-compat/default.nix
+++ b/pkgs/development/libraries/haskell/time-compat/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "time-compat";
-  version = "0.1.0.2";
-  sha256 = "0687bxkvqs22p7skqb8n289k9nv7cafg8jyx32sswn2h11m7dihb";
+  version = "0.1.0.3";
+  sha256 = "0zqgzr8yjn36rn6gflwh5s0c92vl44xzxiw0jz8d5h0h8lhi21sr";
   buildDepends = [ time ];
   meta = {
     homepage = "http://hub.darcs.net/dag/time-compat";
diff --git a/pkgs/development/libraries/haskell/uu-parsinglib/default.nix b/pkgs/development/libraries/haskell/uu-parsinglib/default.nix
index d28eb827dab..d9477f4233d 100644
--- a/pkgs/development/libraries/haskell/uu-parsinglib/default.nix
+++ b/pkgs/development/libraries/haskell/uu-parsinglib/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "uu-parsinglib";
-  version = "2.7.4.1";
-  sha256 = "1aya95j7dd0yal0ygy6d4w4wmlhgn5ddy3c5f6ncl4k3kg7hjxd1";
+  version = "2.7.4.2";
+  sha256 = "10ddm6x9km3lzs9ahqpsl9krvslsn9glimwzq4hspgsp6izd1dmq";
   buildDepends = [ ListLike time ];
   meta = {
     homepage = "http://www.cs.uu.nl/wiki/bin/view/HUT/ParserCombinators";
diff --git a/pkgs/development/libraries/haskell/uulib/default.nix b/pkgs/development/libraries/haskell/uulib/default.nix
index 991f3808098..2521c44bec6 100644
--- a/pkgs/development/libraries/haskell/uulib/default.nix
+++ b/pkgs/development/libraries/haskell/uulib/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "uulib";
-  version = "0.9.14";
-  sha256 = "0bi62l9fp1ghqq4dagdy4nsxmm08gpsrnfgy6d6k8f4239s3yr0z";
+  version = "0.9.15";
+  sha256 = "0433shh493c04qmi0sd9mfzpy198zi11gxdmcs6nz2gcnxm812zm";
   meta = {
     homepage = "http://www.cs.uu.nl/wiki/HUT/WebHome";
     description = "Haskell Utrecht Tools Library";
diff --git a/pkgs/development/libraries/haskell/void/default.nix b/pkgs/development/libraries/haskell/void/default.nix
index cdf21c78233..91b641c5f9a 100644
--- a/pkgs/development/libraries/haskell/void/default.nix
+++ b/pkgs/development/libraries/haskell/void/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "void";
-  version = "0.5.11";
-  sha256 = "0fi8ccnhg0ckz5v3cgxhdd67p0v3g9yawin917ik4vxfbwz5j3v6";
+  version = "0.5.12";
+  sha256 = "03fqcap94saj7mx3y4pvvfj4z8dy6rsk2kvhgbnk2wvz5xm7xvci";
   buildDepends = [ semigroups ];
   meta = {
     homepage = "http://github.com/ekmett/void";
diff --git a/pkgs/development/libraries/haskell/wai-extra/default.nix b/pkgs/development/libraries/haskell/wai-extra/default.nix
index 53a1ccaf55a..7e331d69da0 100644
--- a/pkgs/development/libraries/haskell/wai-extra/default.nix
+++ b/pkgs/development/libraries/haskell/wai-extra/default.nix
@@ -7,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "wai-extra";
-  version = "1.3.2.4";
-  sha256 = "12hdg5h4bk04nhcmjm5mc62dng9np0dlik4b1w1syd2lxqv6pdb9";
+  version = "1.3.3.1";
+  sha256 = "0ss58s5m8yp326q0651znifbfl6kpimyhm479wx8r3zx3ndl47q9";
   buildDepends = [
     ansiTerminal blazeBuilder blazeBuilderConduit caseInsensitive
     conduit dataDefault dateCache fastLogger httpTypes network
diff --git a/pkgs/development/libraries/haskell/wl-pprint-extras/default.nix b/pkgs/development/libraries/haskell/wl-pprint-extras/default.nix
new file mode 100644
index 00000000000..77670b4f117
--- /dev/null
+++ b/pkgs/development/libraries/haskell/wl-pprint-extras/default.nix
@@ -0,0 +1,14 @@
+{ cabal, nats, semigroupoids, semigroups, text, utf8String }:
+
+cabal.mkDerivation (self: {
+  pname = "wl-pprint-extras";
+  version = "3.4";
+  sha256 = "17vxyckx2pj4sc2d1yw1rcsxn1rp4nzdjp0hgpy78xsp9plccgsy";
+  buildDepends = [ nats semigroupoids semigroups text utf8String ];
+  meta = {
+    homepage = "http://github.com/ekmett/wl-pprint-extras/";
+    description = "A free monad based on the Wadler/Leijen pretty printer";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/wl-pprint-terminfo/default.nix b/pkgs/development/libraries/haskell/wl-pprint-terminfo/default.nix
new file mode 100644
index 00000000000..d2bd35eebd4
--- /dev/null
+++ b/pkgs/development/libraries/haskell/wl-pprint-terminfo/default.nix
@@ -0,0 +1,18 @@
+{ cabal, nats, semigroups, terminfo, text, transformers
+, wlPprintExtras
+}:
+
+cabal.mkDerivation (self: {
+  pname = "wl-pprint-terminfo";
+  version = "3.6";
+  sha256 = "14dq0inv6i8pwjzrpys420iwi6002mard1n73z96k89zq5xhwlbg";
+  buildDepends = [
+    nats semigroups terminfo text transformers wlPprintExtras
+  ];
+  meta = {
+    homepage = "http://github.com/ekmett/wl-pprint-terminfo/";
+    description = "A color pretty printer with terminfo support";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/wl-pprint/default.nix b/pkgs/development/libraries/haskell/wl-pprint/default.nix
new file mode 100644
index 00000000000..9849d4fab0e
--- /dev/null
+++ b/pkgs/development/libraries/haskell/wl-pprint/default.nix
@@ -0,0 +1,12 @@
+{ cabal }:
+
+cabal.mkDerivation (self: {
+  pname = "wl-pprint";
+  version = "1.1";
+  sha256 = "16kp3fkh0x9kgzk6fdqrm8m0v7b5cgbv0m3x63ybbp5vxbhand06";
+  meta = {
+    description = "The Wadler/Leijen Pretty Printer";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/xdot/default.nix b/pkgs/development/libraries/haskell/xdot/default.nix
index 73cc5c6e764..d1702862f42 100644
--- a/pkgs/development/libraries/haskell/xdot/default.nix
+++ b/pkgs/development/libraries/haskell/xdot/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "xdot";
-  version = "0.2.2";
-  sha256 = "1n7lwshfn5rzbk4fxlkn02fxki2xh5m0304hnb1d5mchxyzhfdan";
+  version = "0.2.3";
+  sha256 = "0xb8igsqydiw1w00frn4mxkflhxkayif2vivxmq5fk53am2f43wy";
   buildDepends = [ cairo graphviz gtk mtl polyparse text ];
   meta = {
     description = "Parse Graphviz xdot files and interactively view them using GTK and Cairo";
diff --git a/pkgs/development/libraries/haskell/xml-conduit/default.nix b/pkgs/development/libraries/haskell/xml-conduit/default.nix
index 7ebc0b003e5..b586a6336bc 100644
--- a/pkgs/development/libraries/haskell/xml-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/xml-conduit/default.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self: {
   pname = "xml-conduit";
-  version = "1.1.0.2";
-  sha256 = "17wv4rngmn8jvg6c3ia48w5q9s9dww9aisrmans9llqs7ks3ndqc";
+  version = "1.1.0.3";
+  sha256 = "04mnn6j9bbkhvav04gl9cbd4rldl7bwgcapvykwvf2p3nb3d7bi4";
   buildDepends = [
     attoparsec attoparsecConduit blazeBuilder blazeBuilderConduit
     blazeHtml blazeMarkup conduit dataDefault failure monadControl
diff --git a/pkgs/development/libraries/haskell/yaml/default.nix b/pkgs/development/libraries/haskell/yaml/default.nix
index f1cbb7ee7b8..2c2f39451e6 100644
--- a/pkgs/development/libraries/haskell/yaml/default.nix
+++ b/pkgs/development/libraries/haskell/yaml/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "yaml";
-  version = "0.8.2.1";
-  sha256 = "1p0hi9psm42bsmm14gfdkj4wrbcgzkishcih6rwc2bcvn2i0hyyw";
+  version = "0.8.2.3";
+  sha256 = "1ds6969gbkxgkm2fha0ifmssjl7by9glgix165v0h8i7fx9wx3wa";
   buildDepends = [
     aeson attoparsec conduit resourcet text transformers
     unorderedContainers vector
diff --git a/pkgs/development/libraries/haskell/yesod-json/default.nix b/pkgs/development/libraries/haskell/yesod-json/default.nix
index 4b1777676a8..b395645557b 100644
--- a/pkgs/development/libraries/haskell/yesod-json/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-json/default.nix
@@ -1,16 +1,17 @@
-{ cabal, aeson, attoparsecConduit, blazeBuilder, conduit, safe
-, shakespeareJs, text, transformers, vector, wai, waiExtra
-, yesodCore, yesodRoutes
+{ cabal, aeson, attoparsecConduit, blazeBuilder, conduit, hspec
+, safe, shakespeareJs, text, transformers, vector, wai, waiExtra
+, waiTest, yesodCore, yesodRoutes
 }:
 
 cabal.mkDerivation (self: {
   pname = "yesod-json";
-  version = "1.1.2.1";
-  sha256 = "0vrhn3v26q7cqwds99hqyibq09vyxnviqzgyn7w5ldnl3ycg7dqd";
+  version = "1.1.2.2";
+  sha256 = "1bl4rs3biv2man0n8ijldil32lyswjqk5ykz0nv06qsaaafjpc3g";
   buildDepends = [
     aeson attoparsecConduit blazeBuilder conduit safe shakespeareJs
     text transformers vector wai waiExtra yesodCore yesodRoutes
   ];
+  testDepends = [ hspec text waiTest yesodCore ];
   meta = {
     homepage = "http://www.yesodweb.com/";
     description = "Generate content for Yesod using the aeson package";
diff --git a/pkgs/development/libraries/haskell/yesod-test/default.nix b/pkgs/development/libraries/haskell/yesod-test/default.nix
index 3753067d958..8b32b48af87 100644
--- a/pkgs/development/libraries/haskell/yesod-test/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-test/default.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self: {
   pname = "yesod-test";
-  version = "0.3.3.2";
-  sha256 = "0skr710fqqnna17gywaj30kpj352px2d17fwwqb832j7mj92bmv5";
+  version = "0.3.5";
+  sha256 = "095hwl1dm4mk467la68x3lilj0c056603kl0nn8ra4glcr86273j";
   buildDepends = [
     attoparsec blazeBuilder blazeHtml blazeMarkup caseInsensitive
     cookie hspec htmlConduit httpTypes HUnit monadControl network
diff --git a/pkgs/development/libraries/haskell/yesod/default.nix b/pkgs/development/libraries/haskell/yesod/default.nix
index ebb46f68bc8..9998790ea73 100644
--- a/pkgs/development/libraries/haskell/yesod/default.nix
+++ b/pkgs/development/libraries/haskell/yesod/default.nix
@@ -12,8 +12,8 @@
 
 cabal.mkDerivation (self: {
   pname = "yesod";
-  version = "1.1.9";
-  sha256 = "0fcvf0bg7dsrka639q20dncinqq0fdv21zyvwpx63qfcmilhmjlm";
+  version = "1.1.9.2";
+  sha256 = "1rv9mk842b9qwdzal9y5cn2z5z2rl6490600jg1xbsg0x0nl7hdj";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/yst/default.nix b/pkgs/development/libraries/haskell/yst/default.nix
index 5087bfce12c..d194b1970c8 100644
--- a/pkgs/development/libraries/haskell/yst/default.nix
+++ b/pkgs/development/libraries/haskell/yst/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "yst";
-  version = "0.3.1";
-  sha256 = "1ax3j21b4ac9x4vvvfgnhz0sczd7l7ia6mcxnqhbc3166sn91vig";
+  version = "0.3.1.1";
+  sha256 = "1wc2s5aan4rqdrpqgqvka5pqm3d691si5hdf0m0wpi2hzkwl3qv3";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/zip-archive/default.nix b/pkgs/development/libraries/haskell/zip-archive/default.nix
index 45f2ac96319..38290c8cd54 100644
--- a/pkgs/development/libraries/haskell/zip-archive/default.nix
+++ b/pkgs/development/libraries/haskell/zip-archive/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "zip-archive";
-  version = "0.1.3.3";
-  sha256 = "0zzps6s6lsv35qv1xx1fwipk2nwv255wpa956mvzbwdr47pgqjwi";
+  version = "0.1.3.4";
+  sha256 = "0hvndr3gb7fiv4qjwjvic5mg7wq7h7nw3c3v5xq8fnlr1l943vyb";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ binary digest filepath mtl time utf8String zlib ];
diff --git a/pkgs/development/libraries/haskell/zlib/0.5.4.1.nix b/pkgs/development/libraries/haskell/zlib/0.5.4.1.nix
new file mode 100644
index 00000000000..c1fa7d78d0a
--- /dev/null
+++ b/pkgs/development/libraries/haskell/zlib/0.5.4.1.nix
@@ -0,0 +1,14 @@
+{ cabal, zlib }:
+
+cabal.mkDerivation (self: {
+  pname = "zlib";
+  version = "0.5.4.1";
+  sha256 = "0l550l2qw4gx530h1yjjpdh6rkm59l9l6jbmlm0vx41cqpj6b8yc";
+  extraLibraries = [ zlib ];
+  meta = {
+    description = "Compression and decompression in the gzip and zlib formats";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.andres ];
+  };
+})
diff --git a/pkgs/development/libraries/jbig2dec/default.nix b/pkgs/development/libraries/jbig2dec/default.nix
index 60c6e9922a4..e15c5c8d179 100644
--- a/pkgs/development/libraries/jbig2dec/default.nix
+++ b/pkgs/development/libraries/jbig2dec/default.nix
@@ -1,13 +1,13 @@
-{ stdenv, fetchurl }: 
+{ stdenv, fetchurl }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   name = "jbig2dec-0.11";
-  
+
   src = fetchurl {
-    url = http://ghostscript.com/~giles/jbig2/jbig2dec/jbig2dec-0.11.tar.gz;
-    sha256 = "1ffhgmf2fqzk0h4k736pp06z7q5y4x41fg844bd6a9vgncq86bby";
+    url = "mirror://sourceforge/jbig2dec/${name}.tar.xz";
+    sha256 = "1xddc30garsg5j8p348cz5l8vn8j7723c0sykv0kc1w5ihaghsq1";
   };
-  
+
   meta = {
     homepage = http://jbig2dec.sourceforge.net/;
     description = "Decoder implementation of the JBIG2 image compression format";
diff --git a/pkgs/development/libraries/libchop/default.nix b/pkgs/development/libraries/libchop/default.nix
index 7f3c0257339..9a1b4122365 100644
--- a/pkgs/development/libraries/libchop/default.nix
+++ b/pkgs/development/libraries/libchop/default.nix
@@ -9,7 +9,10 @@ stdenv.mkDerivation rec {
     sha256 = "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g";
   };
 
+  patches = [ ./gets-undeclared.patch ];
+
   nativeBuildInputs = [ pkgconfig gperf ];
+  
   buildInputs =
     [ zlib bzip2 lzo
       libgcrypt
diff --git a/pkgs/development/libraries/libchop/gets-undeclared.patch b/pkgs/development/libraries/libchop/gets-undeclared.patch
new file mode 100644
index 00000000000..b6cdc77caa8
--- /dev/null
+++ b/pkgs/development/libraries/libchop/gets-undeclared.patch
@@ -0,0 +1,71 @@
+This patch is needed to allow builds with newer versions of
+the GNU libc (2.16+).
+
+
+commit 66712c23388e93e5c518ebc8515140fa0c807348
+Author: Eric Blake <eblake@redhat.com>
+Date:   Thu Mar 29 13:30:41 2012 -0600
+
+    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.
+    
+    * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets
+    support.
+    * modules/stdio (Makefile.am): Likewise.
+    * lib/stdio-read.c (gets): Likewise.
+    * tests/test-stdio-c++.cc: Likewise.
+    * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment.
+    * lib/stdio.in.h (gets): Make warning occur in more places.
+    * doc/posix-functions/gets.texi (gets): Update documentation.
+    Reported by Christer Solskogen.
+    
+    Signed-off-by: Eric Blake <eblake@redhat.com>
+
+diff --git a/lib/stdio.in.h b/lib/stdio.in.h
+index aa7b599..c377b6e 100644
+--- a/lib/stdio.in.h
++++ b/lib/stdio.in.h
+@@ -698,22 +698,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
+ # endif
+ #endif
+ 
+-#if @GNULIB_GETS@
+-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-#   undef gets
+-#   define gets rpl_gets
+-#  endif
+-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
+-_GL_CXXALIAS_RPL (gets, char *, (char *s));
+-# else
+-_GL_CXXALIAS_SYS (gets, char *, (char *s));
+-#  undef gets
+-# endif
+-_GL_CXXALIASWARN (gets);
+ /* It is very rare that the developer ever has full control of stdin,
+-   so any use of gets warrants an unconditional warning.  Assume it is
+-   always declared, since it is required by C89.  */
++   so any use of gets warrants an unconditional warning; besides, C11
++   removed it.  */
++#undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+ 
+@@ -1053,9 +1042,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
+ # endif
+ #endif
+ 
+-/* Some people would argue that sprintf should be handled like gets
+-   (for example, OpenBSD issues a link warning for both functions),
+-   since both can cause security holes due to buffer overruns.
++/* Some people would argue that all sprintf uses should be warned about
++   (for example, OpenBSD issues a link warning for it),
++   since it can cause security holes due to buffer overruns.
+    However, we believe that sprintf can be used safely, and is more
+    efficient than snprintf in those safe cases; and as proof of our
+    belief, we use sprintf in several gnulib modules.  So this header
diff --git a/pkgs/development/libraries/libee/default.nix b/pkgs/development/libraries/libee/default.nix
new file mode 100644
index 00000000000..c3c73381acd
--- /dev/null
+++ b/pkgs/development/libraries/libee/default.nix
@@ -0,0 +1,16 @@
+{ stdenv, fetchurl, pkgconfig, libestr }:
+stdenv.mkDerivation {
+  name = "libee-0.4.1";
+
+  src = fetchurl {
+    url = http://www.libee.org/download/files/download/libee-0.4.1.tar.gz;
+    md5 = "7bbf4160876c12db6193c06e2badedb2";
+  };
+
+  buildInputs = [pkgconfig libestr];
+
+  meta = {
+    homepage = "http://www.libee.org/";
+    description = "An Event Expression Library inspired by CEE";
+  };
+}
diff --git a/pkgs/development/libraries/libestr/default.nix b/pkgs/development/libraries/libestr/default.nix
new file mode 100644
index 00000000000..74d86667b5b
--- /dev/null
+++ b/pkgs/development/libraries/libestr/default.nix
@@ -0,0 +1,8 @@
+{ stdenv, fetchurl }:
+stdenv.mkDerivation {
+  name = "libestr-0.1.4";
+  src = fetchurl {
+    url = http://libestr.adiscon.com/files/download/libestr-0.1.4.tar.gz;
+    sha256 = "1qw5vqryawdm434l9ql3r160ap2f5mmp7b6pciac7qli62y0a2z3";
+  };
+}
diff --git a/pkgs/development/libraries/libmcrypt/default.nix b/pkgs/development/libraries/libmcrypt/default.nix
index eac577869e2..79019cbc489 100644
--- a/pkgs/development/libraries/libmcrypt/default.nix
+++ b/pkgs/development/libraries/libmcrypt/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, disablePosixThreads ? false }:
+
+with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "libmcrypt-2.5.8";
@@ -10,7 +12,12 @@ stdenv.mkDerivation rec {
 
   buildInputs = [];
 
+  configureFlags = optional disablePosixThreads
+    [ "--disable-posix-threads" ];
+
   meta = {
+    description = "MCrypt is a replacement for the old crypt() package and crypt(1) command, with extensions.";
     homepage = http://mcrypt.sourceforge.net;
+    license = "GPL";
   };
 }
diff --git a/pkgs/development/libraries/libnotify/default.nix b/pkgs/development/libraries/libnotify/default.nix
index 7bfd8c05104..ab8034c781e 100644
--- a/pkgs/development/libraries/libnotify/default.nix
+++ b/pkgs/development/libraries/libnotify/default.nix
@@ -1,17 +1,34 @@
-{ stdenv, fetchurl, pkgconfig, dbus, dbus_glib, gtk, glib }:
- 
+{ stdenv, fetchurl, pkgconfig, automake, autoconf, libtool, glib, gdk_pixbuf }:
+
 stdenv.mkDerivation rec {
-  name = "libnotify-0.4.5";
+  ver_maj = "0.7";
+  ver_min = "5";
+  name = "libnotify-${ver_maj}.${ver_min}";
 
   src = fetchurl {
-    url = "http://www.galago-project.org/files/releases/source/libnotify/${name}.tar.gz";
-    sha256 = "1ndh7wpm9qh12vm5avjrq2xv1j681j9qq6j2fyj6a2shl67dp687";
+    url = "mirror://gnome/sources/libnotify/${ver_maj}/${name}.tar.xz";
+    sha256 = "0lmnzy16vdjs9vlgdm0b7wfyi1nh526hv2dpb7vxb92bhx3wny23";
+  };
+  src_m4 = fetchurl {
+    url = "mirror://gentoo/distfiles/introspection-20110205.m4.tar.bz2";
+    sha256 = "1cnqh7aaji648nfd5537v7xaak8hgww3bpifhwam7bl0sc3ad523";
   };
 
-  buildInputs = [ pkgconfig dbus.libs dbus_glib gtk glib ];
+  # see Gentoo ebuild - we don't need to depend on gtk+(2/3)
+  preConfigure = ''
+    cd m4
+    tar xvf ${src_m4}
+    cd ..
+
+    sed -i -e 's:noinst_PROG:check_PROG:' tests/Makefile.am || die
+    sed -i -e '/PKG_CHECK_MODULES(TESTS/d' configure.ac || die
+    AT_M4DIR=. autoreconf
+  '';
+
+  buildInputs = [ pkgconfig automake autoconf glib gdk_pixbuf ];
 
   meta = {
-    homepage = http://galago-project.org/;
+    homepage = http://galago-project.org/; # very obsolete but found no better
     description = "A library that sends desktop notifications to a notification daemon";
   };
 }
diff --git a/pkgs/development/libraries/librdf/default.nix b/pkgs/development/libraries/librdf/default.nix
index 1f3e5b40937..21c952b7fb8 100644
--- a/pkgs/development/libraries/librdf/default.nix
+++ b/pkgs/development/libraries/librdf/default.nix
@@ -1,18 +1,30 @@
-{ stdenv, fetchurl, pkgconfig, librdf_raptor, ladspaH, openssl, zlib }:
+{ stdenv, fetchurl, pkgconfig, libtool, automake, autoconf
+, librdf_raptor, librdf_raptor2, ladspaH, openssl, zlib #, swh_lv2
+}:
 
-stdenv.mkDerivation {
-  name = "liblrdf-0.4.0";
+stdenv.mkDerivation rec {
+  version = "0.5.0";
+  name = "liblrdf-${version}";
 
   src = fetchurl {
-    url = mirror://sourceforge/lrdf/liblrdf/0.4.0/liblrdf-0.4.0.tar.gz;
-    sha256 = "015jv7pp0a0qxgljgdvf7d01nj4fx0zgzg0wayjp7v86pa38xscm";
+    url = "http://github.com/swh/LRDF/archive/${version}.tar.gz";
+    sha256 = "18p2flb2sv2hq6w2qkd29z9c7knnwqr3f12i2srshlzx6vwkm05s";
   };
 
-  buildInputs = [ pkgconfig ladspaH openssl zlib ];
+  postPatch = "sed -i -e 's:usr/local:usr:' examples/{instances,remove}_test.c";
 
-  propagatedBuildInputs = [ librdf_raptor ];
+  preConfigure = "rm m4/* && autoreconf -if";
 
-  meta = { 
+  buildInputs = [
+    pkgconfig libtool automake autoconf ladspaH openssl zlib /*swh_lv2*/
+    #librdf_raptor 
+  ];
+
+  propagatedBuildInputs = [ librdf_raptor2 ];
+
+  #doCheck = true; # would need swh_lv2 and some path patching
+
+  meta = {
     description = "A lightweight RDF library with special support for LADSPA plugins.";
     homepage = http://sourceforge.net/projects/lrdf/;
     license = "GPLv2";
diff --git a/pkgs/development/libraries/librdf/raptor2.nix b/pkgs/development/libraries/librdf/raptor2.nix
index 2f956630fa1..4658cf28335 100644
--- a/pkgs/development/libraries/librdf/raptor2.nix
+++ b/pkgs/development/libraries/librdf/raptor2.nix
@@ -1,18 +1,18 @@
 { stdenv, fetchurl, libxml2, libxslt, curl }:
 
 stdenv.mkDerivation rec {
-  name = "raptor2-2.0.4";
+  name = "raptor2-2.0.8"; # 2.0.9 misses a header and so fails liblrdf
 
   src = fetchurl {
     url = "http://download.librdf.org/source/${name}.tar.gz";
-    sha256 = "0viaam60adhsxim2vaq5xs1pfmm6wiidxpkrhwyl7x9mz8x9vx1l";
+    sha256 = "1mz7cxnfw73saf74c9if06n2mlsvn2rnn67vy7j2mq3wkhy0hcb0";
   };
 
   buildInputs = [ libxml2 libxslt ];
 
   postInstall = "rm -rvf $out/share/gtk-doc";
 
-  meta = { 
+  meta = {
     description = "The RDF Parser Toolkit";
     homepage = "http://librdf.org/raptor";
     license = "LGPL-2.1 Apache-2.0";
diff --git a/pkgs/development/libraries/librdf/rasqal.nix b/pkgs/development/libraries/librdf/rasqal.nix
index 9b65487ccfb..6d6f9d05808 100644
--- a/pkgs/development/libraries/librdf/rasqal.nix
+++ b/pkgs/development/libraries/librdf/rasqal.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, librdf_raptor2, gmp, pkgconfig, pcre, libxml2 }:
 
 stdenv.mkDerivation rec {
-  name = "rasqal-0.9.26";
+  name = "rasqal-0.9.30";
 
   src = fetchurl {
     url = "http://download.librdf.org/source/${name}.tar.gz";
-    sha256 = "1drjcy1k9g72iis0ghllzn7n0w03bahhrd2p5hs39anbm6mr0yk9";
+    sha256 = "1z8wifq79kivcwpwzmjnjdrbr65zam190gpxhgrvsyfch0yykw5b";
   };
 
   nativeBuildInputs = [ pkgconfig ];
@@ -15,8 +15,8 @@ stdenv.mkDerivation rec {
   propagatedBuildInputs = [ librdf_raptor2 ];
 
   postInstall = "rm -rvf $out/share/gtk-doc";
-  
-  meta = { 
+
+  meta = {
     description = "Library that handles Resource Description Framework (RDF)";
     homepage = "http://librdf.org/rasqal";
     license = "LGPL-2.1 Apache-2.0";
diff --git a/pkgs/development/libraries/librdf/redland.nix b/pkgs/development/libraries/librdf/redland.nix
index 47e25877be9..26b3de70dcd 100644
--- a/pkgs/development/libraries/librdf/redland.nix
+++ b/pkgs/development/libraries/librdf/redland.nix
@@ -7,11 +7,11 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "redland-1.0.14";
+  name = "redland-1.0.16";
 
   src = fetchurl {
     url = "http://download.librdf.org/source/${name}.tar.gz";
-    sha256 = "1i460q9gslb7l75hjwc6w2kp2wk7fgp8lr7phamg33c6j013y30k";
+    sha256 = "1gcx0h5dxa3c4xhhjk3gr0708zjj0n6zpslvbjfi2qbf13y798nr";
   };
 
   nativeBuildInputs = [ perl pkgconfig ];
diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix
index 3e829dc421a..08784a0f257 100644
--- a/pkgs/development/libraries/libsoup/default.nix
+++ b/pkgs/development/libraries/libsoup/default.nix
@@ -1,29 +1,23 @@
-{ stdenv, fetchurl, glib, libxml2, pkgconfig, intltool, python
+{ stdenv, fetchurl, glib, libxml2, pkgconfig
 , gnomeSupport ? true, libgnome_keyring, sqlite, glib_networking }:
 
 stdenv.mkDerivation {
-  name = "libsoup-2.40.3";
+  name = "libsoup-2.38.1";
 
   src = fetchurl {
-    url = mirror://gnome/sources/libsoup/2.40/libsoup-2.40.3.tar.xz;
-    sha256 = "82c92f1f6f4cbfd501df783ed87e7de9410b4a12a3bb0b19c64722e185d2bbc9";
+    url = mirror://gnome/sources/libsoup/2.38/libsoup-2.38.1.tar.xz;
+    sha256 = "16iza4y8pmc4sn90iid88fgminvgcqypy3s2qnmzkzm5qwzr5f3i";
   };
 
-  nativeBuildInputs = [ pkgconfig intltool python ];
 
+  nativeBuildInputs = [ pkgconfig ];
   propagatedBuildInputs = [ glib libxml2 ]
     ++ stdenv.lib.optionals gnomeSupport [ libgnome_keyring sqlite ];
-
   passthru.propagatedUserEnvPackages = [ glib_networking ];
 
   # glib_networking is a runtime dependency, not a compile-time dependency
   configureFlags = "--disable-tls-check";
 
-  preConfigure = ''
-    substituteInPlace libsoup/tld-parser.py \
-      --replace "/usr/bin/env python" ${python}/bin/python
-  '';
-
   meta = {
     inherit (glib.meta) maintainers platforms;
   };
diff --git a/pkgs/development/libraries/libunique/1.1.6-G_CONST_RETURN.patch b/pkgs/development/libraries/libunique/1.1.6-G_CONST_RETURN.patch
new file mode 100644
index 00000000000..1cc5b6e01be
--- /dev/null
+++ b/pkgs/development/libraries/libunique/1.1.6-G_CONST_RETURN.patch
@@ -0,0 +1,143 @@
+From 557b0e5045c9eadb556ce11e16965cf0d0787438 Mon Sep 17 00:00:00 2001
+From: Stef Walter <stefw@collabora.co.uk>
+Date: Tue, 14 Jun 2011 12:33:45 +0100
+Subject: [PATCH] Remove G_CONST_RETURN usage, now that its gone in glib.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=652545
+
+[Alexandre Rostovtsev <tetromino@gmail.com>: backported to unique-1.1]
+---
+ unique/uniqueapp.c       |    4 ++--
+ unique/uniquebackend.c   |    4 ++--
+ unique/uniquebackend.h   |    4 ++--
+ unique/uniqueinternals.h |    4 ++--
+ unique/uniquemessage.c   |    4 ++--
+ unique/uniquemessage.h   |    4 ++--
+ 6 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/unique/uniqueapp.c b/unique/uniqueapp.c
+index b40a86c..e8edc94 100644
+--- a/unique/uniqueapp.c
++++ b/unique/uniqueapp.c
+@@ -781,7 +781,7 @@ unique_app_watch_window (UniqueApp *app,
+ }
+ 
+ 
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_command_to_string (UniqueApp *app,
+                           gint       command)
+ {
+@@ -863,7 +863,7 @@ unique_command_from_string (UniqueApp   *app,
+   return retval;
+ }
+ 
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_response_to_string (UniqueResponse response)
+ {
+   GEnumClass *enum_class;
+diff --git a/unique/uniquebackend.c b/unique/uniquebackend.c
+index a76e42e..68e2735 100644
+--- a/unique/uniquebackend.c
++++ b/unique/uniquebackend.c
+@@ -111,7 +111,7 @@ unique_backend_set_name (UniqueBackend *backend,
+  *
+  * Return value: FIXME
+  */
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_backend_get_name (UniqueBackend *backend)
+ {
+   g_return_val_if_fail (UNIQUE_IS_BACKEND (backend), NULL);
+@@ -154,7 +154,7 @@ unique_backend_set_startup_id (UniqueBackend *backend,
+  *
+  * Return value: FIXME
+  */
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_backend_get_startup_id (UniqueBackend *backend)
+ {
+   g_return_val_if_fail (UNIQUE_IS_BACKEND (backend), NULL);
+diff --git a/unique/uniquebackend.h b/unique/uniquebackend.h
+index a50ce4e..b19ad3e 100644
+--- a/unique/uniquebackend.h
++++ b/unique/uniquebackend.h
+@@ -94,10 +94,10 @@ GType                 unique_backend_get_type       (void) G_GNUC_CONST;
+ 
+ UniqueBackend *       unique_backend_create         (void);
+ 
+-G_CONST_RETURN gchar *unique_backend_get_name       (UniqueBackend     *backend);
++const gchar *         unique_backend_get_name       (UniqueBackend     *backend);
+ void                  unique_backend_set_name       (UniqueBackend     *backend,
+                                                      const gchar       *name);
+-G_CONST_RETURN gchar *unique_backend_get_startup_id (UniqueBackend     *backend);
++const gchar *         unique_backend_get_startup_id (UniqueBackend     *backend);
+ void                  unique_backend_set_startup_id (UniqueBackend     *backend,
+                                                      const gchar       *startup_id);
+ GdkScreen *           unique_backend_get_screen     (UniqueBackend     *backend);
+diff --git a/unique/uniqueinternals.h b/unique/uniqueinternals.h
+index 3cec152..ccae0cd 100644
+--- a/unique/uniqueinternals.h
++++ b/unique/uniqueinternals.h
+@@ -44,11 +44,11 @@ UniqueResponse unique_app_emit_message_received (UniqueApp         *app,
+  * and then back into an id
+  */
+ UniqueResponse        unique_response_from_string  (const gchar    *response);
+-G_CONST_RETURN gchar *unique_response_to_string    (UniqueResponse  response);
++const gchar *         unique_response_to_string    (UniqueResponse  response);
+ 
+ gint                  unique_command_from_string   (UniqueApp      *app,
+                                                     const gchar    *command);
+-G_CONST_RETURN gchar *unique_command_to_string     (UniqueApp      *app,
++const gchar *         unique_command_to_string     (UniqueApp      *app,
+                                                     gint            command);
+ 
+ G_END_DECLS
+diff --git a/unique/uniquemessage.c b/unique/uniquemessage.c
+index c74392d..2b2a9fc 100644
+--- a/unique/uniquemessage.c
++++ b/unique/uniquemessage.c
+@@ -185,7 +185,7 @@ unique_message_data_set (UniqueMessageData *message_data,
+  *
+  * Since: 1.0.2
+  */
+-G_CONST_RETURN guchar *
++const guchar *
+ unique_message_data_get (UniqueMessageData *message_data,
+                          gsize             *length)
+ {
+@@ -525,7 +525,7 @@ unique_message_data_get_screen (UniqueMessageData *message_data)
+  *   owned by the #UniqueMessageData structure and should not be
+  *   modified or freed
+  */
+-G_CONST_RETURN gchar *
++const gchar *
+ unique_message_data_get_startup_id (UniqueMessageData *message_data)
+ {
+   g_return_val_if_fail (message_data != NULL, NULL);
+diff --git a/unique/uniquemessage.h b/unique/uniquemessage.h
+index d3e9c3c..93eee21 100644
+--- a/unique/uniquemessage.h
++++ b/unique/uniquemessage.h
+@@ -48,7 +48,7 @@ void                   unique_message_data_free           (UniqueMessageData *me
+ void                   unique_message_data_set            (UniqueMessageData *message_data,
+                                                            const guchar      *data,
+                                                            gsize              length);
+-G_CONST_RETURN guchar *unique_message_data_get            (UniqueMessageData *message_data,
++const guchar *         unique_message_data_get            (UniqueMessageData *message_data,
+                                                            gsize             *length);
+ 
+ gboolean               unique_message_data_set_text       (UniqueMessageData *message_data,
+@@ -63,7 +63,7 @@ void                   unique_message_data_set_filename   (UniqueMessageData *me
+ gchar *                unique_message_data_get_filename   (UniqueMessageData *message_data);
+ 
+ GdkScreen *            unique_message_data_get_screen     (UniqueMessageData *message_data);
+-G_CONST_RETURN gchar * unique_message_data_get_startup_id (UniqueMessageData *message_data);
++const gchar *          unique_message_data_get_startup_id (UniqueMessageData *message_data);
+ guint                  unique_message_data_get_workspace  (UniqueMessageData *message_data);
+ 
+ G_END_DECLS
+-- 
+1.7.6
+
diff --git a/pkgs/development/libraries/libunique/1.1.6-compiler-warnings.patch b/pkgs/development/libraries/libunique/1.1.6-compiler-warnings.patch
new file mode 100644
index 00000000000..f47e66267d5
--- /dev/null
+++ b/pkgs/development/libraries/libunique/1.1.6-compiler-warnings.patch
@@ -0,0 +1,50 @@
+From 9df132a70d54b768a8e1d0335d24b85ac9b3fb76 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@linux.intel.com>
+Date: Sun, 27 Mar 2011 08:42:22 +0000
+Subject: Remove compiler warnings
+
+(cherry picked from commit f791ed16b19dddc7fbaf90d8f797520e67883021)
+
+Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
+---
+diff --git a/unique/dbus/uniquebackend-dbus.c b/unique/dbus/uniquebackend-dbus.c
+index 3ae1bed..69faa00 100644
+--- a/unique/dbus/uniquebackend-dbus.c
++++ b/unique/dbus/uniquebackend-dbus.c
+@@ -84,7 +84,6 @@ unique_backend_dbus_register_proxy (UniqueBackendDBus *backend_dbus)
+ static gboolean
+ unique_backend_dbus_request_name (UniqueBackend *backend)
+ {
+-  UniqueBackendDBus *backend_dbus;
+   const gchar *name;
+   DBusGConnection *connection;
+   DBusGProxy *proxy;
+@@ -97,8 +96,6 @@ unique_backend_dbus_request_name (UniqueBackend *backend)
+   if (!connection)
+     return FALSE;
+ 
+-  backend_dbus = UNIQUE_BACKEND_DBUS (backend);
+-
+   retval = TRUE;
+   name = unique_backend_get_name (backend);
+   g_assert (name != NULL);
+@@ -207,10 +204,14 @@ unique_backend_dbus_send_message (UniqueBackend     *backend,
+                                         cmd, data, time_,
+                                         &resp,
+                                         &error);
+-  if (error)
++  if (!res)
+     {
+-      g_warning ("Error while sending message: %s", error->message);
+-      g_error_free (error);
++      if (error)
++        {
++          g_warning ("Error while sending message: %s", error->message);
++          g_error_free (error);
++        }
++
+       g_free (cmd);
+       
+       return UNIQUE_RESPONSE_INVALID;
+--
+cgit v0.9
diff --git a/pkgs/development/libraries/libunique/1.1.6-fix-test.patch b/pkgs/development/libraries/libunique/1.1.6-fix-test.patch
new file mode 100644
index 00000000000..b2e85e4d71a
--- /dev/null
+++ b/pkgs/development/libraries/libunique/1.1.6-fix-test.patch
@@ -0,0 +1,26 @@
+From caf736f4b84808393b0d7030ae6128a3322a71e2 Mon Sep 17 00:00:00 2001
+From: Tobias Mueller <tobiasmue@gnome.org>
+Date: Mon, 12 Apr 2010 13:01:42 +0000
+Subject: test-unique: Resolve format string issues
+
+Provide a proper literal format string to not expose potential vulnerabilites.
+Fixes bug 615522.
+---
+diff --git a/tests/test-unique.c b/tests/test-unique.c
+index b7cde45..c9958c9 100644
+--- a/tests/test-unique.c
++++ b/tests/test-unique.c
+@@ -82,9 +82,11 @@ app_message_cb (UniqueApp         *app,
+                                    GTK_DIALOG_DESTROY_WITH_PARENT,
+                                    GTK_MESSAGE_INFO,
+                                    GTK_BUTTONS_CLOSE,
++                                   "%s",
+                                    title);
+   if (message)
+     gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
++                                              "%s",
+                                               message);
+ 
+   gtk_window_set_urgency_hint (GTK_WINDOW (dialog), TRUE);
+--
+cgit v0.9
diff --git a/pkgs/development/libraries/libunique/1.1.6-include-terminator.patch b/pkgs/development/libraries/libunique/1.1.6-include-terminator.patch
new file mode 100644
index 00000000000..927771e7311
--- /dev/null
+++ b/pkgs/development/libraries/libunique/1.1.6-include-terminator.patch
@@ -0,0 +1,37 @@
+From 30ca2903a8ed4eed974ea744e4b9bd96198c425d Mon Sep 17 00:00:00 2001
+From: Rodney Lorrimar <r.lorrimar@fugro-fsi.com.au>
+Date: Mon, 21 Dec 2009 02:07:46 +0000
+Subject: Include NUL terminator in unique_message_data_get_filename()
+
+https://bugzilla.gnome.org/show_bug.cgi?id=605104
+
+Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
+---
+diff --git a/unique/uniqueinternals.h b/unique/uniqueinternals.h
+index ace40ed..3cec152 100644
+--- a/unique/uniqueinternals.h
++++ b/unique/uniqueinternals.h
+@@ -13,7 +13,7 @@ G_BEGIN_DECLS
+ struct _UniqueMessageData
+ {
+   guchar *data;
+-  gint length;
++  gint length;  /* length of data not including NUL terminator */
+ 
+   GdkScreen *screen;
+   gchar *startup_id;
+diff --git a/unique/uniquemessage.c b/unique/uniquemessage.c
+index 10f6df5..c74392d 100644
+--- a/unique/uniquemessage.c
++++ b/unique/uniquemessage.c
+@@ -493,7 +493,7 @@ unique_message_data_get_filename (UniqueMessageData *message_data)
+ {
+   g_return_val_if_fail (message_data != NULL, NULL);
+ 
+-  return g_memdup (message_data->data, message_data->length);
++  return g_memdup (message_data->data, message_data->length + 1);
+ }
+ 
+ /**
+--
+cgit v0.9
diff --git a/pkgs/development/libraries/libunique/default.nix b/pkgs/development/libraries/libunique/default.nix
new file mode 100644
index 00000000000..603759d47c0
--- /dev/null
+++ b/pkgs/development/libraries/libunique/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, pkgconfig, glib, gtk, dbus_glib }:
+
+stdenv.mkDerivation rec {
+  name = "libunique-1.1.6";
+  src = fetchurl {
+    url = "mirror://gnome/sources/libunique/1.1/${name}.tar.bz2";
+    sha256 = "1fsgvmncd9caw552lyfg8swmsd6bh4ijjsph69bwacwfxwf09j75";
+  };
+
+  # patches from Gentoo portage
+  patches = [
+    ./1.1.6-compiler-warnings.patch
+    ./1.1.6-fix-test.patch
+    ./1.1.6-G_CONST_RETURN.patch
+    ./1.1.6-include-terminator.patch
+  ];
+
+  buildInputs = [ pkgconfig glib gtk dbus_glib ];
+
+  # don't make deprecated usages hard errors
+  preBuildPhases = "preBuild";
+  preBuild = ''substituteInPlace unique/dbus/Makefile --replace -Werror ""'';
+
+  doCheck = true;
+
+  meta = {
+    homepage = http://live.gnome.org/LibUnique;
+    description = "A library for writing single instance applications";
+    license = "LGPLv2.1";
+  };
+}
diff --git a/pkgs/development/libraries/mpc/default.nix b/pkgs/development/libraries/mpc/default.nix
index 586658556db..e5d212dc269 100644
--- a/pkgs/development/libraries/mpc/default.nix
+++ b/pkgs/development/libraries/mpc/default.nix
@@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://www.multiprecision.org/mpc/download/${name}.tar.gz";
-    sha256 = "ed5a815cfea525dc778df0cb37468b9c1b554aaf30d9328b1431ca705b7400ff";
+    sha1 = "vxg0rkyn4cs40wr2cp6bbcyr1nnijzlc";
   };
 
   buildInputs = [ gmp mpfr ];
diff --git a/pkgs/development/libraries/nss/default.nix b/pkgs/development/libraries/nss/default.nix
index 8e4edcad885..d38fc19f40e 100644
--- a/pkgs/development/libraries/nss/default.nix
+++ b/pkgs/development/libraries/nss/default.nix
@@ -22,11 +22,11 @@ let
 
 in stdenv.mkDerivation rec {
   name = "nss-${version}";
-  version = "3.14";
+  version = "3.14.3";
 
   src = fetchurl {
-    url = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_14_RTM/src/${name}.tar.gz";
-    sha1 = "ace3642fb2ca67854ea7075d053ca01a6d81e616";
+    url = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_14_3_RTM/src/${name}.tar.gz";
+    sha1 = "94d8781d1fa29cfbd37453dda3e9488709b82c4c";
   };
 
   buildInputs = [ nspr perl zlib sqlite ];
@@ -38,14 +38,28 @@ in stdenv.mkDerivation rec {
   '';
 
   patches = [
-    ./nss-3.12.5-gentoo-fixups.diff
+    ./nss-3.14.1-gentoo-fixups-r1.patch
     secLoadPatch
     ./nix_secload_fixup.patch
+    ./sync-up-with-upstream-softokn-changes.patch
   ];
 
   postPatch = ''
     sed -i -e 's/^DIRS.*$/& pem/' mozilla/security/nss/lib/ckfw/manifest.mn
-    sed -i -e "/^PREFIX =/s:= /usr:= $out:" mozilla/security/nss/config/Makefile
+
+    # Fix up the patch from Gentoo
+    sed -i \
+      -e "/^PREFIX =/s|= /usr|= $out|" \
+      -e '/@libdir@/s|gentoo/nss|lib|' \
+      -e '/ln -sf/d' \
+      mozilla/security/nss/config/Makefile
+
+    # Note for spacing/tab nazis: The TAB characters are intentional!
+    cat >> mozilla/security/nss/config/Makefile <<INSTALL_TARGET
+    install:
+    	mkdir -p \$(DIST)/lib/pkgconfig
+    	cp nss.pc \$(DIST)/lib/pkgconfig
+    INSTALL_TARGET
   '';
 
   preConfigure = "cd mozilla/security/nss";
diff --git a/pkgs/development/libraries/nss/nss-3.12.5-gentoo-fixups.diff b/pkgs/development/libraries/nss/nss-3.14.1-gentoo-fixups-r1.patch
index 57fbb71ff78..bc3a98ec143 100644
--- a/pkgs/development/libraries/nss/nss-3.12.5-gentoo-fixups.diff
+++ b/pkgs/development/libraries/nss/nss-3.14.1-gentoo-fixups-r1.patch
@@ -1,7 +1,7 @@
-diff -urN nss-3.12.5-orig/mozilla/security/nss/config/Makefile nss-3.12.5/mozilla/security/nss/config/Makefile
---- nss-3.12.5-orig/mozilla/security/nss/config/Makefile	1969-12-31 18:00:00.000000000 -0600
-+++ nss-3.12.5/mozilla/security/nss/config/Makefile	2009-09-14 21:45:45.619639265 -0500
-@@ -0,0 +1,42 @@
+diff -urN a/mozilla/security/nss/config/Makefile b/mozilla/security/nss/config/Makefile
+--- a/mozilla/security/nss/config/Makefile	1969-12-31 18:00:00.000000000 -0600
++++ b/mozilla/security/nss/config/Makefile	2012-12-15 07:27:20.650148987 -0600
+@@ -0,0 +1,40 @@
 +CORE_DEPTH = ../..
 +DEPTH      = ../..
 +
@@ -16,15 +16,17 @@ diff -urN nss-3.12.5-orig/mozilla/security/nss/config/Makefile nss-3.12.5/mozill
 +
 +export:
 +	# Create the nss.pc file
++	mkdir -p $(DIST)/lib/pkgconfig
 +	sed -e "s,@prefix@,$(PREFIX)," \
 +	    -e "s,@exec_prefix@,\$${prefix}," \
-+	    -e "s,@libdir@,\$${prefix}/lib," \
++	    -e "s,@libdir@,\$${prefix}/gentoo/nss," \
 +	    -e "s,@includedir@,\$${prefix}/include/nss," \
 +	    -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
 +	    -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
 +	    -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
 +	    nss.pc.in > nss.pc
 +	chmod 0644 nss.pc
++	ln -sf ../../../../../security/nss/config/nss.pc $(DIST)/lib/pkgconfig
 +
 +	# Create the nss-config script
 +	mkdir -p $(DIST)/bin
@@ -34,19 +36,15 @@ diff -urN nss-3.12.5-orig/mozilla/security/nss/config/Makefile nss-3.12.5/mozill
 +	    -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
 +	    nss-config.in > nss-config
 +	chmod 0755 nss-config
-+	# ln -sf ../../../../security/nss/config/nss-config $(DIST)/bin
++	ln -sf ../../../../security/nss/config/nss-config $(DIST)/bin
 +
 +libs:
 +
 +dummy: all export libs
 +
-+install:
-+	mkdir -p $(DIST)/lib/pkgconfig
-+	cp nss.pc $(DIST)/lib/pkgconfig
-+
-diff -urN nss-3.12.5-orig/mozilla/security/nss/config/nss-config.in nss-3.12.5/mozilla/security/nss/config/nss-config.in
---- nss-3.12.5-orig/mozilla/security/nss/config/nss-config.in	1969-12-31 18:00:00.000000000 -0600
-+++ nss-3.12.5/mozilla/security/nss/config/nss-config.in	2009-09-14 21:47:45.190638078 -0500
+diff -urN a/mozilla/security/nss/config/nss-config.in b/mozilla/security/nss/config/nss-config.in
+--- a/mozilla/security/nss/config/nss-config.in	1969-12-31 18:00:00.000000000 -0600
++++ b/mozilla/security/nss/config/nss-config.in	2012-12-15 07:27:20.651148959 -0600
 @@ -0,0 +1,145 @@
 +#!/bin/sh
 +
@@ -177,7 +175,7 @@ diff -urN nss-3.12.5-orig/mozilla/security/nss/config/nss-config.in nss-3.12.5/m
 +fi
 +
 +if test "$echo_libs" = "yes"; then
-+      libdirs="-Wl,-R$libdir -L$libdir"
++      libdirs=""
 +      if test -n "$lib_ssl"; then
 +	libdirs="$libdirs -lssl${major_version}"
 +      fi
@@ -193,9 +191,9 @@ diff -urN nss-3.12.5-orig/mozilla/security/nss/config/nss-config.in nss-3.12.5/m
 +      echo $libdirs
 +fi      
 +
-diff -urN nss-3.12.5-orig/mozilla/security/nss/config/nss.pc.in nss-3.12.5/mozilla/security/nss/config/nss.pc.in
---- nss-3.12.5-orig/mozilla/security/nss/config/nss.pc.in	1969-12-31 18:00:00.000000000 -0600
-+++ nss-3.12.5/mozilla/security/nss/config/nss.pc.in	2009-09-14 21:45:45.653637310 -0500
+diff -urN a/mozilla/security/nss/config/nss.pc.in b/mozilla/security/nss/config/nss.pc.in
+--- a/mozilla/security/nss/config/nss.pc.in	1969-12-31 18:00:00.000000000 -0600
++++ b/mozilla/security/nss/config/nss.pc.in	2012-12-15 07:27:20.651148959 -0600
 @@ -0,0 +1,12 @@
 +prefix=@prefix@
 +exec_prefix=@exec_prefix@
@@ -206,13 +204,13 @@ diff -urN nss-3.12.5-orig/mozilla/security/nss/config/nss.pc.in nss-3.12.5/mozil
 +Description: Network Security Services
 +Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
 +Requires: nspr >= 4.8
-+Libs: -L${libdir} -lssl3 -lsmime3 -lnssutil3 -lnss3 -Wl,-R${libdir}
++Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
 +Cflags: -I${includedir}
 +
-diff -urN nss-3.12.5-orig/mozilla/security/nss/Makefile nss-3.12.5/mozilla/security/nss/Makefile
---- nss-3.12.5-orig/mozilla/security/nss/Makefile	2008-12-02 17:24:39.000000000 -0600
-+++ nss-3.12.5/mozilla/security/nss/Makefile	2009-09-14 21:45:45.678657145 -0500
-@@ -78,7 +78,7 @@
+diff -urN a/mozilla/security/nss/Makefile b/mozilla/security/nss/Makefile
+--- a/mozilla/security/nss/Makefile	2012-11-13 19:14:07.000000000 -0600
++++ b/mozilla/security/nss/Makefile	2012-12-15 07:27:57.235162137 -0600
+@@ -44,7 +44,7 @@
  # (7) Execute "local" rules. (OPTIONAL).                              #
  #######################################################################
  
@@ -221,27 +219,25 @@ diff -urN nss-3.12.5-orig/mozilla/security/nss/Makefile nss-3.12.5/mozilla/secur
  
  nss_clean_all: clobber_coreconf clobber_nspr clobber_dbm clobber
  
-@@ -140,12 +140,6 @@
+@@ -106,12 +106,6 @@
  	--with-dist-prefix='$(NSPR_PREFIX)' \
  	--with-dist-includedir='$(NSPR_PREFIX)/include'
  
 -build_nspr: $(NSPR_CONFIG_STATUS)
--	cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE)
+-	$(MAKE) -C $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME)
 -
 -clobber_nspr: $(NSPR_CONFIG_STATUS)
--	cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE) clobber
+-	$(MAKE) -C $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) clobber
 -
  build_dbm:
- ifndef NSS_DISABLE_DBM
- 	cd $(CORE_DEPTH)/dbm ; $(MAKE) export libs
-diff -urN nss-3.12.5-orig/mozilla/security/nss/manifest.mn nss-3.12.5/mozilla/security/nss/manifest.mn
---- nss-3.12.5-orig/mozilla/security/nss/manifest.mn	2008-04-04 15:36:59.000000000 -0500
-+++ nss-3.12.5/mozilla/security/nss/manifest.mn	2009-09-14 21:45:45.703656167 -0500
-@@ -42,6 +42,6 @@
+ ifdef NSS_DISABLE_DBM
+ 	@echo "skipping the build of DBM"
+diff -urN a/mozilla/security/nss/manifest.mn b/mozilla/security/nss/manifest.mn
+--- a/mozilla/security/nss/manifest.mn	2012-03-20 09:46:49.000000000 -0500
++++ b/mozilla/security/nss/manifest.mn	2012-12-15 07:27:20.652148933 -0600
+@@ -10,6 +10,6 @@
  
  RELEASE = nss
  
 -DIRS = lib cmd
 +DIRS = lib cmd config
- 
- 
diff --git a/pkgs/development/libraries/nss/sync-up-with-upstream-softokn-changes.patch b/pkgs/development/libraries/nss/sync-up-with-upstream-softokn-changes.patch
new file mode 100644
index 00000000000..4942debcd30
--- /dev/null
+++ b/pkgs/development/libraries/nss/sync-up-with-upstream-softokn-changes.patch
@@ -0,0 +1,406 @@
+From d6dbecfea317a468be12423595e584f43d84d8ec Mon Sep 17 00:00:00 2001
+From: Elio Maldonado <emaldona@redhat.com>
+Date: Sat, 9 Feb 2013 17:11:00 -0500
+Subject: [PATCH] Sync up with upstream softokn changes
+
+- Disable RSA OEP case in FormatBlock, RSA_OAEP support is experimental and in a state of flux
+- Numerous change upstream due to the work for TLS/DTLS 'Lucky 13' vulnerability CVE-2013-0169
+- It now compiles with the NSS_3_14_3_BETA1 source
+---
+ mozilla/security/nss/lib/ckfw/pem/rsawrapr.c |  338 +++++++-------------------
+ 1 files changed, 82 insertions(+), 256 deletions(-)
+
+diff --git a/mozilla/security/nss/lib/ckfw/pem/rsawrapr.c b/mozilla/security/nss/lib/ckfw/pem/rsawrapr.c
+index 5ac4f39..3780d30 100644
+--- a/mozilla/security/nss/lib/ckfw/pem/rsawrapr.c
++++ b/mozilla/security/nss/lib/ckfw/pem/rsawrapr.c
+@@ -46,6 +46,7 @@
+ #include "sechash.h"
+ #include "base.h"
+ 
++#include "lowkeyi.h"
+ #include "secerr.h"
+ 
+ #define RSA_BLOCK_MIN_PAD_LEN		8
+@@ -54,9 +55,8 @@
+ #define RSA_BLOCK_PRIVATE_PAD_OCTET	0xff
+ #define RSA_BLOCK_AFTER_PAD_OCTET	0x00
+ 
+-#define OAEP_SALT_LEN		8
+-#define OAEP_PAD_LEN		8
+-#define OAEP_PAD_OCTET		0x00
++/* Needed for RSA-PSS functions */
++static const unsigned char eightZeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ 
+ #define FLAT_BUFSIZE 512        /* bytes to hold flattened SHA1Context. */
+ 
+@@ -78,127 +78,39 @@ pem_PublicModulusLen(NSSLOWKEYPublicKey *pubk)
+     return 0;
+ }
+ 
+-static SHA1Context *SHA1_CloneContext(SHA1Context * original)
+-{
+-    SHA1Context *clone = NULL;
+-    unsigned char *pBuf;
+-    int sha1ContextSize = SHA1_FlattenSize(original);
+-    SECStatus frv;
+-    unsigned char buf[FLAT_BUFSIZE];
+-
+-    PORT_Assert(sizeof buf >= sha1ContextSize);
+-    if (sizeof buf >= sha1ContextSize) {
+-        pBuf = buf;
+-    } else {
+-        pBuf = nss_ZAlloc(NULL, sha1ContextSize);
+-        if (!pBuf)
+-            goto done;
+-    }
+-
+-    frv = SHA1_Flatten(original, pBuf);
+-    if (frv == SECSuccess) {
+-        clone = SHA1_Resurrect(pBuf, NULL);
+-        memset(pBuf, 0, sha1ContextSize);
+-    }
+-  done:
+-    if (pBuf != buf)
+-        nss_ZFreeIf(pBuf);
+-    return clone;
++/* Constant time comparison of a single byte.
++ * Returns 1 iff a == b, otherwise returns 0.
++ * Note: For ranges of bytes, use constantTimeCompare.
++ */
++static unsigned char constantTimeEQ8(unsigned char a, unsigned char b) {
++    unsigned char c = ~(a - b | b - a);
++    c >>= 7;
++    return c;
+ }
+ 
+-/*
+- * Modify data by XORing it with a special hash of salt.
++/* Constant time comparison of a range of bytes.
++ * Returns 1 iff len bytes of a are identical to len bytes of b, otherwise
++ * returns 0.
+  */
+-static SECStatus
+-oaep_xor_with_h1(unsigned char *data, unsigned int datalen,
+-                 unsigned char *salt, unsigned int saltlen)
+-{
+-    SHA1Context *sha1cx;
+-    unsigned char *dp, *dataend;
+-    unsigned char end_octet;
+-
+-    sha1cx = SHA1_NewContext();
+-    if (sha1cx == NULL) {
+-        return SECFailure;
+-    }
+-
+-    /*
+-     * Get a hash of salt started; we will use it several times,
+-     * adding in a different end octet (x00, x01, x02, ...).
+-     */
+-    SHA1_Begin(sha1cx);
+-    SHA1_Update(sha1cx, salt, saltlen);
+-    end_octet = 0;
+-
+-    dp = data;
+-    dataend = data + datalen;
+-
+-    while (dp < dataend) {
+-        SHA1Context *sha1cx_h1;
+-        unsigned int sha1len, sha1off;
+-        unsigned char sha1[SHA1_LENGTH];
+-
+-        /*
+-         * Create hash of (salt || end_octet)
+-         */
+-        sha1cx_h1 = SHA1_CloneContext(sha1cx);
+-        SHA1_Update(sha1cx_h1, &end_octet, 1);
+-        SHA1_End(sha1cx_h1, sha1, &sha1len, sizeof(sha1));
+-        SHA1_DestroyContext(sha1cx_h1, PR_TRUE);
+-        PORT_Assert(sha1len == SHA1_LENGTH);
+-
+-        /*
+-         * XOR that hash with the data.
+-         * When we have fewer than SHA1_LENGTH octets of data
+-         * left to xor, use just the low-order ones of the hash.
+-         */
+-        sha1off = 0;
+-        if ((dataend - dp) < SHA1_LENGTH)
+-            sha1off = SHA1_LENGTH - (dataend - dp);
+-        while (sha1off < SHA1_LENGTH)
+-            *dp++ ^= sha1[sha1off++];
+-
+-        /*
+-         * Bump for next hash chunk.
+-         */
+-        end_octet++;
+-    }
+-
+-    SHA1_DestroyContext(sha1cx, PR_TRUE);
+-    return SECSuccess;
++static unsigned char constantTimeCompare(const unsigned char *a,
++                                         const unsigned char *b,
++                                         unsigned int len) {
++    unsigned char tmp = 0;
++    unsigned int i;
++    for (i = 0; i < len; ++i, ++a, ++b)
++        tmp |= *a ^ *b;
++    return constantTimeEQ8(0x00, tmp);
+ }
+ 
+-/*
+- * Modify salt by XORing it with a special hash of data.
++/* Constant time conditional.
++ * Returns a if c is 1, or b if c is 0. The result is undefined if c is
++ * not 0 or 1.
+  */
+-static SECStatus
+-oaep_xor_with_h2(unsigned char *salt, unsigned int saltlen,
+-                 unsigned char *data, unsigned int datalen)
++static unsigned int constantTimeCondition(unsigned int c,
++                                          unsigned int a,
++                                          unsigned int b)
+ {
+-    unsigned char sha1[SHA1_LENGTH];
+-    unsigned char *psalt, *psha1, *saltend;
+-    SECStatus rv;
+-
+-    /*
+-     * Create a hash of data.
+-     */
+-    rv = SHA1_HashBuf(sha1, data, datalen);
+-    if (rv != SECSuccess) {
+-        return rv;
+-    }
+-
+-    /*
+-     * XOR the low-order octets of that hash with salt.
+-     */
+-    PORT_Assert(saltlen <= SHA1_LENGTH);
+-    saltend = salt + saltlen;
+-    psalt = salt;
+-    psha1 = sha1 + SHA1_LENGTH - saltlen;
+-    while (psalt < saltend) {
+-        *psalt++ ^= *psha1++;
+-    }
+-
+-    return SECSuccess;
++    return (~(c - 1) & a) | ((c - 1) & b);
+ }
+ 
+ /*
+@@ -212,7 +124,7 @@ static unsigned char *rsa_FormatOneBlock(unsigned modulusLen,
+     unsigned char *block;
+     unsigned char *bp;
+     int padLen;
+-    int i;
++    int i, j;
+     SECStatus rv;
+ 
+     block = (unsigned char *) nss_ZAlloc(NULL, modulusLen);
+@@ -260,124 +172,58 @@ static unsigned char *rsa_FormatOneBlock(unsigned modulusLen,
+          */
+     case RSA_BlockPublic:
+ 
+-        /*
+-         * 0x00 || BT || Pad || 0x00 || ActualData
+-         *   1      1   padLen    1      data->len
+-         * Pad is all non-zero random bytes.
+-         */
+-        padLen = modulusLen - data->len - 3;
+-        PORT_Assert(padLen >= RSA_BLOCK_MIN_PAD_LEN);
+-        if (padLen < RSA_BLOCK_MIN_PAD_LEN) {
+-            nss_ZFreeIf(block);
+-            return NULL;
+-        }
+-        for (i = 0; i < padLen; i++) {
+-            /* Pad with non-zero random data. */
+-            do {
+-                rv = RNG_GenerateGlobalRandomBytes(bp + i, 1);
+-            } while (rv == SECSuccess
+-                     && bp[i] == RSA_BLOCK_AFTER_PAD_OCTET);
+-            if (rv != SECSuccess) {
+-                nss_ZFreeIf(block);
+-                return NULL;
+-            }
+-        }
+-        bp += padLen;
+-        *bp++ = RSA_BLOCK_AFTER_PAD_OCTET;
+-        nsslibc_memcpy(bp, data->data, data->len);
+-
+-        break;
+-
+-        /*
+-         * Blocks intended for public-key operation, using
+-         * Optimal Asymmetric Encryption Padding (OAEP).
+-         */
+-    case RSA_BlockOAEP:
+-        /*
+-         * 0x00 || BT || Modified2(Salt) || Modified1(PaddedData)
+-         *   1      1     OAEP_SALT_LEN     OAEP_PAD_LEN + data->len [+ N]
+-         *
+-         * where:
+-         *   PaddedData is "Pad1 || ActualData [|| Pad2]"
+-         *   Salt is random data.
+-         *   Pad1 is all zeros.
+-         *   Pad2, if present, is random data.
+-         *   (The "modified" fields are all the same length as the original
+-         * unmodified values; they are just xor'd with other values.)
+-         *
+-         *   Modified1 is an XOR of PaddedData with a special octet
+-         * string constructed of iterated hashing of Salt (see below).
+-         *   Modified2 is an XOR of Salt with the low-order octets of
+-         * the hash of Modified1 (see farther below ;-).
+-         *
+-         * Whew!
+-         */
+-
+-
+-        /*
+-         * Salt
+-         */
+-        rv = RNG_GenerateGlobalRandomBytes(bp, OAEP_SALT_LEN);
+-        if (rv != SECSuccess) {
+-            nss_ZFreeIf(block);
+-            return NULL;
+-        }
+-        bp += OAEP_SALT_LEN;
+-
+-        /*
+-         * Pad1
+-         */
+-        nsslibc_memset(bp, OAEP_PAD_OCTET, OAEP_PAD_LEN);
+-        bp += OAEP_PAD_LEN;
+-
+-        /*
+-         * Data
+-         */
+-        nsslibc_memcpy(bp, data->data, data->len);
+-        bp += data->len;
+-
+-        /*
+-         * Pad2
+-         */
+-        if (bp < (block + modulusLen)) {
+-            rv = RNG_GenerateGlobalRandomBytes(bp,
+-                                               block - bp + modulusLen);
+-            if (rv != SECSuccess) {
+-                nss_ZFreeIf(block);
+-                return NULL;
+-            }
+-        }
+-
+-        /*
+-         * Now we have the following:
+-         * 0x00 || BT || Salt || PaddedData
+-         * (From this point on, "Pad1 || Data [|| Pad2]" is treated
+-         * as the one entity PaddedData.)
+-         *
+-         * We need to turn PaddedData into Modified1.
+-         */
+-        if (oaep_xor_with_h1(block + 2 + OAEP_SALT_LEN,
+-                             modulusLen - 2 - OAEP_SALT_LEN,
+-                             block + 2, OAEP_SALT_LEN) != SECSuccess) {
+-            nss_ZFreeIf(block);
+-            return NULL;
+-        }
+-
+-        /*
+-         * Now we have:
+-         * 0x00 || BT || Salt || Modified1(PaddedData)
+-         *
+-         * The remaining task is to turn Salt into Modified2.
+-         */
+-        if (oaep_xor_with_h2(block + 2, OAEP_SALT_LEN,
+-                             block + 2 + OAEP_SALT_LEN,
+-                             modulusLen - 2 - OAEP_SALT_LEN) !=
+-            SECSuccess) {
+-            nss_ZFreeIf(block);
+-            return NULL;
+-        }
+-
+-        break;
++	/*
++	 * 0x00 || BT || Pad || 0x00 || ActualData
++	 *   1      1   padLen    1      data->len
++	 * Pad is all non-zero random bytes.
++	 *
++	 * Build the block left to right.
++	 * Fill the entire block from Pad to the end with random bytes.
++	 * Use the bytes after Pad as a supply of extra random bytes from 
++	 * which to find replacements for the zero bytes in Pad.
++	 * If we need more than that, refill the bytes after Pad with 
++	 * new random bytes as necessary.
++	 */
++	padLen = modulusLen - (data->len + 3);
++	PORT_Assert (padLen >= RSA_BLOCK_MIN_PAD_LEN);
++	if (padLen < RSA_BLOCK_MIN_PAD_LEN) {
++	    nss_ZFreeIf (block);
++	    return NULL;
++	}
++	j = modulusLen - 2;
++	rv = RNG_GenerateGlobalRandomBytes(bp, j);
++	if (rv == SECSuccess) {
++	    for (i = 0; i < padLen; ) {
++		unsigned char repl;
++		/* Pad with non-zero random data. */
++		if (bp[i] != RSA_BLOCK_AFTER_PAD_OCTET) {
++		    ++i;
++		    continue;
++		}
++		if (j <= padLen) {
++		    rv = RNG_GenerateGlobalRandomBytes(bp + padLen,
++					  modulusLen - (2 + padLen));
++		    if (rv != SECSuccess)
++		    	break;
++		    j = modulusLen - 2;
++		}
++		do {
++		    repl = bp[--j];
++		} while (repl == RSA_BLOCK_AFTER_PAD_OCTET && j > padLen);
++		if (repl != RSA_BLOCK_AFTER_PAD_OCTET) {
++		    bp[i++] = repl;
++		}
++	    }
++	}
++	if (rv != SECSuccess) {
++	    /*sftk_fatalError = PR_TRUE;*/
++	    nss_ZFreeIf (block);
++	    return NULL;
++	}
++	bp += padLen;
++	*bp++ = RSA_BLOCK_AFTER_PAD_OCTET;
++	nsslibc_memcpy(bp, data->data, data->len);
++	break;
+ 
+     default:
+         PORT_Assert(0);
+@@ -427,26 +273,6 @@ rsa_FormatBlock(SECItem * result, unsigned modulusLen,
+ 
+         break;
+ 
+-    case RSA_BlockOAEP:
+-        /*
+-         * 0x00 || BT || M1(Salt) || M2(Pad1||ActualData[||Pad2])
+-         *
+-         * The "2" below is the first octet + the second octet.
+-         * (The other fields do not contain the clear values, but are
+-         * the same length as the clear values.)
+-         */
+-        PORT_Assert(data->len <= (modulusLen - (2 + OAEP_SALT_LEN
+-                                                + OAEP_PAD_LEN)));
+-
+-        result->data = rsa_FormatOneBlock(modulusLen, blockType, data);
+-        if (result->data == NULL) {
+-            result->len = 0;
+-            return SECFailure;
+-        }
+-        result->len = modulusLen;
+-
+-        break;
+-
+     case RSA_BlockRaw:
+         /*
+          * Pad || ActualData
+-- 
+1.7.1
+
diff --git a/pkgs/development/libraries/opencascade/oce.nix b/pkgs/development/libraries/opencascade/oce.nix
new file mode 100644
index 00000000000..500e6229050
--- /dev/null
+++ b/pkgs/development/libraries/opencascade/oce.nix
@@ -0,0 +1,26 @@
+{stdenv, fetchurl, mesa, tcl, tk, file, libXmu, cmake, libtool, qt4,
+ftgl, freetype}:
+
+stdenv.mkDerivation rec {
+  name = "opencascade-oce-0.13-dev";
+  src = fetchurl {
+    url = https://api.github.com/repos/tpaviot/oce/tarball/bd77743bfa0e765c3a57d116a62d75b50e1a455;
+    name = "${name}.tar.gz";
+    sha256 = "1w7z326la9427yb23hbalsksk6w4ma5xil4jscnvi8mk6g48wyxv";
+  };
+
+  buildInputs = [ mesa tcl tk file libXmu libtool qt4 ftgl freetype cmake ];
+
+  preConfigure = ''
+    cmakeFlags="$cmakeFlags -DOCE_INSTALL_PREFIX=$out"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation";
+    homepage = http://www.opencascade.org/;
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}
diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix
index 6de49846c2d..d32cbd51606 100644
--- a/pkgs/development/libraries/openmpi/default.nix
+++ b/pkgs/development/libraries/openmpi/default.nix
@@ -1,11 +1,16 @@
 {stdenv, fetchurl, gfortran}:
 
 stdenv.mkDerivation {
-  name = "openmpi-1.4.2";
+  name = "openmpi-1.6.4";
   src = fetchurl {
-    url = http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.2.tar.bz2 ;
-    sha1 = "3e85092433d0e399cc7a51c018f9d13562f78b80";
+    url = http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.4.tar.bz2 ;
+    sha1 = "38095d3453519177272f488d5058a98f7ebdbf10";
   };
   buildInputs = [ gfortran ];
+  meta = {
+    homePage = http://www.open-mpi.org/;
+    description = "Open source MPI-2 implementation";
+    longDescription = "The Open MPI Project is an open source MPI-2 implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.";
+  };
 }
 
diff --git a/pkgs/development/libraries/pango/1.30.x.nix b/pkgs/development/libraries/pango/1.30.x.nix
index 2fd828a8737..c32891b95cf 100644
--- a/pkgs/development/libraries/pango/1.30.x.nix
+++ b/pkgs/development/libraries/pango/1.30.x.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, gettext, x11, glib, cairo, libpng }:
+{ stdenv, fetchurl, pkgconfig, gettext, x11, glib, cairo, libpng, fontconfig }:
 
 stdenv.mkDerivation rec {
   name = "pango-1.30.1";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "3a8c061e143c272ddcd5467b3567e970cfbb64d1d1600a8f8e62435556220cbe";
   };
 
-  buildInputs = stdenv.lib.optional stdenv.isDarwin gettext;
+  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ gettext fontconfig ];
 
   nativeBuildInputs = [ pkgconfig ];
 
diff --git a/pkgs/development/libraries/ppl/default.nix b/pkgs/development/libraries/ppl/default.nix
index 0e1948b2fd0..39a24764eef 100644
--- a/pkgs/development/libraries/ppl/default.nix
+++ b/pkgs/development/libraries/ppl/default.nix
@@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "http://bugseng.com/products/ppl/download/ftp/releases/${version}/ppl-${version}.tar.bz2";
-    sha256 = "c169e962b8a0f7b7bcde5c5e0e2235248f1d78b155dfad684591d1a57e330b54";
+    sha256 = "0m0b6dzablci8mlavpsmn5w1v3r46li0wpjwvsybgxx0p1ifjsf1";
   };
 
   nativeBuildInputs = [ perl gnum4 ];
diff --git a/pkgs/development/libraries/sodium/default.nix b/pkgs/development/libraries/sodium/default.nix
new file mode 100644
index 00000000000..0d40df40574
--- /dev/null
+++ b/pkgs/development/libraries/sodium/default.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchurl}:
+let
+  s = # Generated upstream information
+  rec {
+    baseName="sodium";
+    version="0.3";
+    name="${baseName}-${version}";
+    hash="0l1p0d7ag186hhs65kifp8jfgf4mm9rngv41bhq35d7d9gw2d2lh";
+    url="http://download.dnscrypt.org/libsodium/releases/libsodium-0.3.tar.gz";
+    sha256="0l1p0d7ag186hhs65kifp8jfgf4mm9rngv41bhq35d7d9gw2d2lh";
+  };
+  buildInputs = [
+  ];
+in
+stdenv.mkDerivation {
+  inherit (s) name version;
+  inherit buildInputs;
+  src = fetchurl {
+    inherit (s) url sha256;
+  };
+  meta = {
+    inherit (s) version;
+    description = ''A cryptography library with simple API'';
+    license = stdenv.lib.licenses.mit ;
+    maintainers = [stdenv.lib.maintainers.raskin];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/development/libraries/sodium/default.upstream b/pkgs/development/libraries/sodium/default.upstream
new file mode 100644
index 00000000000..ccc02cd8978
--- /dev/null
+++ b/pkgs/development/libraries/sodium/default.upstream
@@ -0,0 +1 @@
+url http://download.dnscrypt.org/libsodium/releases/
diff --git a/pkgs/development/libraries/sword/default.nix b/pkgs/development/libraries/sword/default.nix
index 3486981463f..f62bc2eb11d 100644
--- a/pkgs/development/libraries/sword/default.nix
+++ b/pkgs/development/libraries/sword/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ pkgconfig icu cluceneCore curl ];
 
   # because curl/types.h disappeared since at least curl 7.21.7
-  patches = [ ./dont_include_curl_types_h.patch ];
+  patches = [ ./dont_include_curl_types_h.patch ./gcc47.patch ];
 
   prePatch = ''
     patchShebangs .;
diff --git a/pkgs/development/libraries/sword/gcc47.patch b/pkgs/development/libraries/sword/gcc47.patch
new file mode 100644
index 00000000000..7b55de75b64
--- /dev/null
+++ b/pkgs/development/libraries/sword/gcc47.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/419505
+
+
+--- a/include/multimapwdef.h
++++ b/include/multimapwdef.h
+@@ -12,21 +12,21 @@ class multimapwithdefault : public std::multimap<Key, T, Compare> {
+ public:
+ 	typedef std::pair<const Key, T> value_type;
+ 	T& getWithDefault(const Key& k, const T& defaultValue) {
+-		if (find(k) == this->end()) {
+-			insert(value_type(k, defaultValue));
++		if (this->find(k) == this->end()) {
++			this->insert(value_type(k, defaultValue));
+ 		}
+-		return (*(find(k))).second;
++		return (*(this->find(k))).second;
+ 	}
+ 
+ 	T& operator[](const Key& k) {
+-		if (find(k) == this->end()) {
+-			insert(value_type(k, T()));
++		if (this->find(k) == this->end()) {
++			this->insert(value_type(k, T()));
+ 		}
+-		return (*(find(k))).second;
++		return (*(this->find(k))).second;
+ 	}
+ 	bool has(const Key& k, const T &val) const {
+-		typename std::multimap<Key, T, Compare>::const_iterator start = lower_bound(k);
+-		typename std::multimap<Key, T, Compare>::const_iterator end = upper_bound(k);
++		typename std::multimap<Key, T, Compare>::const_iterator start = this->lower_bound(k);
++		typename std::multimap<Key, T, Compare>::const_iterator end = this->upper_bound(k);
+ 		for (; start!=end; start++) {
+ 			if (start->second == val)
+ 				return true;
diff --git a/pkgs/development/libraries/tinyxml/2.6.2.nix b/pkgs/development/libraries/tinyxml/2.6.2.nix
index 8770859817c..fde30a98fe9 100644
--- a/pkgs/development/libraries/tinyxml/2.6.2.nix
+++ b/pkgs/development/libraries/tinyxml/2.6.2.nix
@@ -20,6 +20,10 @@ in stdenv.mkDerivation {
   
   buildInputs = [ unzip ];
   buildPhase = ''
+    # use STL (xbmc requires it)
+    sed '1i#define TIXML_USE_STL 1' -i tinyxml.h
+    sed '1i#define TIXML_USE_STL 1' -i xmltest.cpp
+
     # build xmltest
     make
     
diff --git a/pkgs/development/libraries/ustr/default.nix b/pkgs/development/libraries/ustr/default.nix
index ebf9628126e..b016a6f715c 100644
--- a/pkgs/development/libraries/ustr/default.nix
+++ b/pkgs/development/libraries/ustr/default.nix
@@ -8,8 +8,11 @@ stdenv.mkDerivation rec {
     url = "http://www.and.org/ustr/${version}/${name}.tar.bz2";
     sha256 = "1i623ygdj7rkizj7985q9d6vj5amwg686aqb5j3ixpkqkyp6xbrx";
   };
+
   prePatch = "substituteInPlace Makefile --replace /usr/include/ ${glibc}/include/";
 
+  patches = [ ./va_args.patch ]; # fixes bogus warnings that failed libsemanage
+
   makeFlags = "DESTDIR=$(out) prefix= LDCONFIG=echo";
 
   configurePhase = "make ustr-import";
@@ -21,4 +24,4 @@ stdenv.mkDerivation rec {
     license = licenses.bsd2;
     maintainers = [ maintainers.phreedom ];
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/development/libraries/ustr/va_args.patch b/pkgs/development/libraries/ustr/va_args.patch
new file mode 100644
index 00000000000..f75b537485d
--- /dev/null
+++ b/pkgs/development/libraries/ustr/va_args.patch
@@ -0,0 +1,23 @@
+diff --git a/ustr-compiler.h b/ustr-compiler.h
+index 9e71276..c5f847a 100644
+--- a/ustr-compiler.h
++++ b/ustr-compiler.h
+@@ -11,17 +11,11 @@
+ #define USTR_CONF_HAVE_ATTR_FMT 1
+ #endif
+ 
++#include <stdarg.h>
+ /* We assume this is enough,
+  * C99 specifies that va_copy() exists and is a macro */
+-#ifdef va_copy
+ # define USTR_CONF_HAVE_VA_COPY 1
+ # define USTR__VA_COPY(x, y)   va_copy(x, y)
+-#elif __va_copy
+-# define USTR_CONF_HAVE_VA_COPY 1
+-# define USTR__VA_COPY(x, y) __va_copy(x, y)
+-#else
+-# define USTR_CONF_HAVE_VA_COPY 0
+-#endif
+ 
+ #ifndef USTR_CONF_HAVE_ATTR_NONNULL
+ #if defined(__GNUC__) && (__GNUC__ > 3) /* not sure */
diff --git a/pkgs/development/libraries/webkit/default.nix b/pkgs/development/libraries/webkit/default.nix
index 47bdcabd514..ef4d259cb02 100644
--- a/pkgs/development/libraries/webkit/default.nix
+++ b/pkgs/development/libraries/webkit/default.nix
@@ -1,6 +1,6 @@
 args : with args; 
 let 
-  s = import ./src-for-default.nix; # 1.10 needs newer gtk3, wait for x-updates
+  s = import ./src-for-default.nix; # 1.8.3 needs newer gtk3, wait for x-updates
   version = lib.attrByPath ["version"] s.version args;
 in
 rec {
@@ -9,12 +9,13 @@ rec {
     sha256 = s.hash;
   };
 
-  buildInputs = [gtk gtk2 glib atk cairo curl fontconfig freetype
-    gettext libjpeg libpng libtiff libxml2 libxslt pango
-    sqlite icu gperf bison flex autoconf automake libtool 
-    perl intltool pkgconfig libsoup gtkdoc libXt libproxy
-    enchant python ruby which renderproto libXrender geoclue
-    kbproto mesa
+  buildInputs = with xlibs; [
+    pkgconfig libtool intltool autoconf automake gperf bison flex
+    gtk3 gtk2 glib atk cairo pango fontconfig freetype libsoup gtkdoc
+    libjpeg libpng libtiff libxml2 libxslt sqlite icu curl
+    which libproxy geoclue enchant python ruby perl
+    mesa libXt libXrender renderproto libXcomposite compositeproto
+    libXdamage damageproto kbproto
     ];
 
   propagatedBuildInputs = [
@@ -22,19 +23,22 @@ rec {
     ];
 
   configureFlags = [
-    "--enable-3D-transforms"
+    # "--enable-3D-transforms" # no longer recognized
     "--enable-web-sockets"
     "--enable-web-timing"
-    
+
+    # https://bugs.webkit.org/show_bug.cgi?id=55294
+    "--enable-image-resizer"
+
     "--enable-geolocation"
 
     # Not implemented?
-    #"--enable-web-audio"
+    # "--enable-web-audio"
 
     "--enable-mathml"
 
     #"--enable-wml"
-    
+
     # https://bugs.webkit.org/show_bug.cgi?id=45110
     #"--enable-indexed-database"
 
@@ -43,27 +47,30 @@ rec {
 
     # "--enable-input-speech"
 
-    "--enable-file-writer"
+    #"--enable-file-writer" # no longer recognized
     "--enable-blob"
 
     # https://bugs.webkit.org/show_bug.cgi?id=59430
-    #"--enable-directory-upload"
+    # "--enable-directory-upload"
 
     # https://bugs.webkit.org/show_bug.cgi?id=58443
-    #"--enable-file-system"
+    # "--enable-file-system"
+
+    "--enable-dependency-tracking" # to fix parallel building
     ];
 
+  # instead of enableParallelBuilding = true;
+  makeFlags = "-j$NIX_BUILD_CORES";
+
   /* doConfigure should be specified separately */
-  phaseNames = ["setVars" "doPatch" "fixConfigure" /* "paranoidFixComments" */ "doConfigure" (doPatchShebangs ".") 
+  phaseNames = ["doPatch" "fixConfigure" /* "paranoidFixComments" */ "doConfigure" (doPatchShebangs ".") 
     "doReplaceUsrBin" "doMakeInstall" "doAddPrograms"];
 
-  setVars = fullDepEntry (''
-    export NIX_LDFLAGS="$NIX_LDFLAGS -lXt"
-  '') ["minInit"];
-
   patches = [ ./bison26.patch ]; # http://trac.webkit.org/changeset/124099
   patchFlags = "-p2";
 
+  #doCheck = true; # tests still have problems
+
   doReplaceUsrBin = fullDepEntry (''
     for i in $(find . -name '*.pl') $(find . -name '*.pm'); do 
         sed -e 's@/usr/bin/gcc@gcc@' -i $i
diff --git a/pkgs/development/libraries/webkit/gtk2.nix b/pkgs/development/libraries/webkit/gtk2.nix
index 0b836cd08f0..c2e3b9b06dd 100644
--- a/pkgs/development/libraries/webkit/gtk2.nix
+++ b/pkgs/development/libraries/webkit/gtk2.nix
@@ -10,11 +10,13 @@ rec {
     sha256 = s.hash;
   };
 
-  buildInputs = [gtk glib atk cairo curl fontconfig freetype
-    gettext libjpeg libpng libtiff libxml2 libxslt pango
-    sqlite icu gperf bison flex autoconf automake libtool 
-    intltool pkgconfig libsoup gtkdoc libXt libproxy
-    enchant python ruby which renderproto libXrender geoclue perl
+  buildInputs = with xlibs; [
+    pkgconfig libtool intltool autoconf automake gperf bison flex
+    gtk2 glib atk cairo pango fontconfig freetype libsoup gtkdoc
+    libjpeg libpng libtiff libxml2 libxslt sqlite icu curl
+    which libproxy geoclue enchant python ruby perl
+    mesa libXt libXrender renderproto libXcomposite compositeproto
+    libXdamage damageproto kbproto
     ];
 
   propagatedBuildInputs = [
@@ -22,12 +24,14 @@ rec {
     ];
 
   configureFlags = [
-    "--enable-3D-transforms"
+    "--with-gtk=2.0"
+
+    # "--enable-3D-transforms" # no longer recognized
     "--enable-web-sockets"
     "--enable-web-timing"
-    
+
     # https://bugs.webkit.org/show_bug.cgi?id=55294
-    # "--enable-image-resizer"
+    "--enable-image-resizer"
 
     "--enable-geolocation"
 
@@ -37,15 +41,16 @@ rec {
     "--enable-mathml"
 
     #"--enable-wml"
-    
+
     # https://bugs.webkit.org/show_bug.cgi?id=45110
-    # "--enable-indexed-database"
+    #"--enable-indexed-database"
 
-    "--enable-xhtmlmp"
+    # Doesn't work in release...
+    #"--enable-xhtmlmp"
 
     # "--enable-input-speech"
 
-    "--enable-file-writer"
+    #"--enable-file-writer" # no longer recognized
     "--enable-blob"
 
     # https://bugs.webkit.org/show_bug.cgi?id=59430
@@ -53,16 +58,21 @@ rec {
 
     # https://bugs.webkit.org/show_bug.cgi?id=58443
     # "--enable-file-system"
+
+    "--enable-dependency-tracking" # to fix parallel building
     ];
 
+  # instead of enableParallelBuilding = true;
+  makeFlags = "-j$NIX_BUILD_CORES";
+
   /* doConfigure should be specified separately */
-  phaseNames = ["setVars" /* "paranoidFixComments" */ "doConfigure" (doPatchShebangs ".") 
+  phaseNames = ["doPatch" "fixConfigure" /* "paranoidFixComments" */ "doConfigure" (doPatchShebangs ".") 
     "doReplaceUsrBin" "doMakeInstall" "doAddPrograms"];
 
-  setVars = fullDepEntry (''
-    export NIX_LDFLAGS="$NIX_LDFLAGS -lXt"
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fpermissive"
-  '') ["minInit"];
+  patches = [ ./bison26.patch ]; # http://trac.webkit.org/changeset/124099
+  patchFlags = "-p2";
+
+  #doCheck = true; # tests still have problems
 
   doReplaceUsrBin = fullDepEntry (''
     for i in $(find . -name '*.pl') $(find . -name '*.pm'); do 
@@ -81,12 +91,19 @@ rec {
     sed -re 's@( |^)//.*@/* & */@' -i $(find . -name '*.c' -o -name '*.h')
   '') ["minInit" "doUnpack"];
 
+  # See http://archive.linuxfromscratch.org/mail-archives/blfs-dev/2012-April/022893.html
+  fixConfigure = fullDepEntry (''
+    sed   -i -e 's/=GSTREAMER_0_10_REQUIRED_VERSION/=\$GSTREAMER_0_10_REQUIRED_VERSION/' \
+      -e 's/=GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION/=\$GSTREAMER_0_10_PLUGINS_BASE_REQUIRED_VERSION/' \
+      configure{,.ac}
+  '') ["minInit" "doUnpack"];
+
   name = s.name;
   meta = {
     description = "WebKit - a fast and correct HTML renderer";
     maintainers = [stdenv.lib.maintainers.raskin];
   };
   passthru = {
-    inherit gstreamer gst_plugins_base gst_plugins_good gst_ffmpeg;
+    inherit gstreamer gst_plugins_base gst_plugins_good gst_ffmpeg libsoup;
   };
 }
diff --git a/pkgs/development/libraries/webkit/src-for-gtk2.nix b/pkgs/development/libraries/webkit/src-for-gtk2.nix
index 5f5149fedfe..65bcd435096 100644
--- a/pkgs/development/libraries/webkit/src-for-gtk2.nix
+++ b/pkgs/development/libraries/webkit/src-for-gtk2.nix
@@ -1,9 +1,10 @@
 rec {
-   version="1.4.0";
-   name="webkit-1.4.0";
-   hash="123zllzlnkjgw4d2ag73dvrjmkikbapxlz5730ps6y4qm43gxc1y";
-   url="http://webkitgtk.org/webkit-1.4.0.tar.gz";
-   advertisedUrl="http://webkitgtk.org/webkit-1.4.0.tar.gz";
+   version="1.8.1";
+   name="webkit-1.8.1";
+   hash="0a1v3v8dp2cl332qr51j4fpl0rwpgxbf29hn3zdim9hcniv6l4ls";
+   url="http://webkitgtk.org/releases/webkit-1.8.1.tar.xz";
+   advertisedUrl="http://webkitgtk.org/releases/webkit-1.8.1.tar.xz";
   
   
 }
+
diff --git a/pkgs/development/mobile/androidenv/build-app.nix b/pkgs/development/mobile/androidenv/build-app.nix
index d4df64e79c0..3f8af65f3bd 100644
--- a/pkgs/development/mobile/androidenv/build-app.nix
+++ b/pkgs/development/mobile/androidenv/build-app.nix
@@ -37,5 +37,8 @@ stdenv.mkDerivation {
   installPhase = ''
     mkdir -p $out
     mv bin/*-${if release then "release" else "debug"}.apk $out
+    
+    mkdir -p $out/nix-support
+    echo "file binary-dist $(echo $out/*.apk)" > $out/nix-support/hydra-build-products
   '';
 }
diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix
index c05bf88ffbf..8fe9846c15a 100644
--- a/pkgs/development/mobile/titaniumenv/build-app.nix
+++ b/pkgs/development/mobile/titaniumenv/build-app.nix
@@ -113,6 +113,11 @@ stdenv.mkDerivation {
            "cp -av build/iphone/build/* $out"
         else if target == "iphone" then ""
         else throw "Target: ${target} is not supported!"}
+    
+    ${if target == "android" then ''
+        mkdir -p $out/nix-support
+        echo "file binary-dist $(ls $out/*.apk)" > $out/nix-support/hydra-build-products
+    '' else ""}
   '';
   
   failureHook = stdenv.lib.optionalString (release && target == "iphone") deleteKeychain;
diff --git a/pkgs/development/mobile/titaniumenv/examples/default.nix b/pkgs/development/mobile/titaniumenv/examples/default.nix
index 1526d4c4359..f5fbf79e86d 100644
--- a/pkgs/development/mobile/titaniumenv/examples/default.nix
+++ b/pkgs/development/mobile/titaniumenv/examples/default.nix
@@ -1,37 +1,35 @@
+{ nixpkgs ? <nixpkgs>
+, system ? builtins.currentSystem
+}:
+
 let
-  pkgs = import <nixpkgs> {};
-  pkgs_i686 = import <nixpkgs> { system = "i686-linux"; };
+  pkgs = import nixpkgs { inherit system; };
+  pkgs_darwin_x86_64 = import nixpkgs { system = "x86_64-darwin"; };
 in
 rec {
-  titaniumenv = import ./.. {
-    inherit pkgs pkgs_i686;
-  };
-  
   kitchensink_android = import ./kitchensink {
-    inherit titaniumenv;
-    inherit (pkgs) fetchgit;
+    inherit (pkgs) fetchgit titaniumenv;
     target = "android";
   };
   
   kitchensink_iphone = import ./kitchensink {
-    inherit titaniumenv;
-    inherit (pkgs) fetchgit;
+    inherit (pkgs_darwin_x86_64) fetchgit titaniumenv;
     target = "iphone";
   };
   
   emulate_kitchensink = import ./emulate-kitchensink {
-    inherit (titaniumenv) androidenv;
+    inherit (pkgs.titaniumenv) androidenv;
     kitchensink = kitchensink_android;
   };
   
   simulate_kitchensink_iphone = import ./simulate-kitchensink {
-    inherit (titaniumenv) xcodeenv;
+    inherit (pkgs_darwin_x86_64.titaniumenv) xcodeenv;
     kitchensink = kitchensink_iphone;
     device = "iPhone";
   };
   
   simulate_kitchensink_ipad = import ./simulate-kitchensink {
-    inherit (titaniumenv) xcodeenv;
+    inherit (pkgs_darwin_x86_64.titaniumenv) xcodeenv;
     kitchensink = kitchensink_iphone;
     device = "iPad";
   };
diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix
index 3ac9e4bb958..535ec0992c1 100644
--- a/pkgs/development/mobile/xcodeenv/build-app.nix
+++ b/pkgs/development/mobile/xcodeenv/build-app.nix
@@ -1,6 +1,7 @@
 {stdenv, xcodewrapper}:
 { name
 , src
+, sdkVersion ? "6.1"
 , target ? null
 , configuration ? null
 , scheme ? null
@@ -36,7 +37,7 @@ let
 
   _sdk = if sdk == null
     then
-      if release then "iphoneos6.0" else "iphonesimulator6.0"
+      if release then "iphoneos" + sdkVersion else "iphonesimulator" + sdkVersion
     else sdk;
 
   # The following is to prevent repetition
@@ -79,6 +80,10 @@ stdenv.mkDerivation {
       ${stdenv.lib.optionalString generateIPA ''
         # Produce an IPA file
         xcrun -sdk iphoneos PackageApplication -v $out/*.app -o $out/${name}.ipa
+        
+        # Add IPA to Hydra build products
+        mkdir -p $out/nix-support
+        echo "file binary-dist $(echo $out/*.ipa)" > $out/nix-support/hydra-build-products
       ''}
       
       # Delete our temp keychain
diff --git a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
index 39804b1a248..77d2c4c867e 100644
--- a/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
+++ b/pkgs/development/mobile/xcodeenv/xcodewrapper.nix
@@ -1,8 +1,5 @@
-{stdenv}:
+{stdenv, version ? "4.6"}:
 
-let
-  version = "4.5.2";
-in
 stdenv.mkDerivation {
   name = "xcode-wrapper-"+version;
   buildCommand = ''
diff --git a/pkgs/development/perl-modules/catalyst-plugin-static-simple-etag.patch b/pkgs/development/perl-modules/catalyst-plugin-static-simple-etag.patch
new file mode 100644
index 00000000000..06207a8b733
--- /dev/null
+++ b/pkgs/development/perl-modules/catalyst-plugin-static-simple-etag.patch
@@ -0,0 +1,37 @@
+Send an ETag header, and honour the If-None-Match request header
+
+diff -ru -x '*~' Catalyst-Plugin-Static-Simple-0.30-orig/lib/Catalyst/Plugin/Static/Simple.pm Catalyst-Plugin-Static-Simple-0.30/lib/Catalyst/Plugin/Static/Simple.pm
+--- Catalyst-Plugin-Static-Simple-0.30-orig/lib/Catalyst/Plugin/Static/Simple.pm	2012-05-04 18:49:30.000000000 +0200
++++ Catalyst-Plugin-Static-Simple-0.30/lib/Catalyst/Plugin/Static/Simple.pm	2013-02-25 22:57:18.667150181 +0100
+@@ -187,16 +187,27 @@
+     my $type      = $c->_ext_to_type( $full_path );
+     my $stat      = stat $full_path;
+ 
+-    $c->res->headers->content_type( $type );
+-    $c->res->headers->content_length( $stat->size );
+-    $c->res->headers->last_modified( $stat->mtime );
+     # Tell Firefox & friends its OK to cache, even over SSL:
+-    $c->res->headers->header('Cache-control' => 'public');
++    #$c->res->headers->header('Cache-control' => 'public');
++
++    $c->res->headers->last_modified( $stat->mtime );
+     # Optionally, set a fixed expiry time:
+     if ($config->{expires}) {
+         $c->res->headers->expires(time() + $config->{expires});
+     }
+ 
++    if ($config->{send_etag}) {
++        my $etag = '"' . $stat->mtime . '-' . $stat->ino . '-'. $stat->size . '"';
++        $c->res->headers->header('ETag' => $etag);
++        if (($c->req->header('If-None-Match') // "") eq $etag) {
++            $c->res->status(304);
++            return 1;
++        }
++    }
++
++    $c->res->headers->content_type( $type );
++    $c->res->headers->content_length( $stat->size );
++
+     my $fh = IO::File->new( $full_path, 'r' );
+     if ( defined $fh ) {
+         binmode $fh;
diff --git a/pkgs/development/python-modules/dbus/default.nix b/pkgs/development/python-modules/dbus/default.nix
index 0183944e201..bfce358a2aa 100644
--- a/pkgs/development/python-modules/dbus/default.nix
+++ b/pkgs/development/python-modules/dbus/default.nix
@@ -1,16 +1,22 @@
-{ stdenv, fetchurl, python, pkgconfig, dbus, dbus_glib }:
+{ stdenv, fetchurl, python, pkgconfig, dbus, dbus_glib, dbus_tools }:
 
 stdenv.mkDerivation rec {
-  name = "dbus-python-0.84.0";
+  name = "dbus-python-1.1.1";
 
   src = fetchurl {
     url = "http://dbus.freedesktop.org/releases/dbus-python/${name}.tar.gz";
-    sha256 = "01jrmj7ps79dkd6f8bzm17vxzpad1ixwmcb1liy64xm9y6mcfnxq";
+    sha256 = "122yj5y0mndk9axh735qvwwckck6s6x0q84dw6p97mplp17wl5w9";
   };
 
-  buildInputs = [ python pkgconfig dbus dbus_glib ];
+  postPatch = "patchShebangs .";
+
+  buildInputs = [ python pkgconfig dbus dbus_glib ]
+    ++ stdenv.lib.optional doCheck dbus_tools;
+
+  doCheck = false; # https://bugs.freedesktop.org/show_bug.cgi?id=57140
 
   meta = {
     description = "Python DBus bindings";
+    license = "MIT";
   };
 }
diff --git a/pkgs/development/python-modules/pycrypto/2.5.nix b/pkgs/development/python-modules/pycrypto/2.5.nix
new file mode 100644
index 00000000000..de192c64b72
--- /dev/null
+++ b/pkgs/development/python-modules/pycrypto/2.5.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, python, buildPythonPackage, gmp }:
+
+buildPythonPackage rec {
+  name = "pycrypto-2.5";
+  namePrefix = "";
+
+  src = fetchurl {
+    url = "http://pypi.python.org/packages/source/p/pycrypto/${name}.tar.gz";
+    md5 = "783e45d4a1a309e03ab378b00f97b291";
+  };
+
+  buildInputs = [ python gmp ];
+
+  buildPhase =
+    ''
+      python ./setup.py build_ext --library-dirs=${gmp}/lib
+    '';
+
+#  installPhase =
+#    ''
+#      python ./setup.py install --prefix=$out
+#    '';
+
+  meta = {
+    homepage = "http://www.pycrypto.org/";
+    description = "Python Cryptography Toolkit";
+    platforms = stdenv.lib.platforms.gnu;
+  };
+}
diff --git a/pkgs/development/python-modules/pygobject/default.nix b/pkgs/development/python-modules/pygobject/default.nix
index 5575243bd9f..8d6a1368d8b 100644
--- a/pkgs/development/python-modules/pygobject/default.nix
+++ b/pkgs/development/python-modules/pygobject/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, python, pkgconfig, glib }:
 
 stdenv.mkDerivation rec {
-  name = "pygobject-2.27.0";
+  name = "pygobject-2.28.6";
   
   src = fetchurl {
-    url = "http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.27/${name}.tar.bz2";
-    sha256 = "18mq4mj9s9sw12m6gbbc4iffrq993c7q09v9yahlnamrqn3bv53m";
+    url = "http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/${name}.tar.xz";
+    sha256 = "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv";
   };
 
   configureFlags = "--disable-introspection";
diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh
index 0a47ee6aa99..175e538e519 100755
--- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh
@@ -42,7 +42,7 @@ cmakeConfigurePhase() {
 
     echo "cmake flags: $cmakeFlags ${cmakeFlagsArray[@]}"
 
-    cmake ${cmakeDir:-.} $cmakeFlags ${cmakeFlagsArray[@]}
+    cmake ${cmakeDir:-.} $cmakeFlags "${cmakeFlagsArray[@]}"
 
     eval "$postConfigure"
 }
diff --git a/pkgs/development/tools/haskell/cabal2nix/default.nix b/pkgs/development/tools/haskell/cabal2nix/default.nix
index ed26e335870..22dde229a2b 100644
--- a/pkgs/development/tools/haskell/cabal2nix/default.nix
+++ b/pkgs/development/tools/haskell/cabal2nix/default.nix
@@ -3,8 +3,8 @@
 
 cabal.mkDerivation (self: {
   pname = "cabal2nix";
-  version = "1.44";
-  sha256 = "1j2w5g75nir0ax9pvn1fyj5l1c4s84mbj400any9v0bpv624mffm";
+  version = "1.47";
+  sha256 = "1ba0ny610ibynwvzqnk5h2461sdkmza5jqrizqxvhp9wknn50fc6";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [ Cabal filepath hackageDb HTTP mtl regexPosix ];
diff --git a/pkgs/development/tools/haskell/packunused/default.nix b/pkgs/development/tools/haskell/packunused/default.nix
new file mode 100644
index 00000000000..814c2774cb2
--- /dev/null
+++ b/pkgs/development/tools/haskell/packunused/default.nix
@@ -0,0 +1,16 @@
+{ cabal, Cabal, cmdargs, filepath, haskellSrcExts }:
+
+cabal.mkDerivation (self: {
+  pname = "packunused";
+  version = "0.1.0.0";
+  sha256 = "131x99id3jcxglj24p5sjb6mnhphj925pp4jdjy09y6ai7wss3rs";
+  isLibrary = false;
+  isExecutable = true;
+  buildDepends = [ Cabal cmdargs filepath haskellSrcExts ];
+  meta = {
+    homepage = "https://github.com/hvr/packunused";
+    description = "Tool for detecting redundant Cabal package dependencies";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/tools/misc/ctags/default.nix b/pkgs/development/tools/misc/ctags/default.nix
index 57718088080..80def733cf8 100644
--- a/pkgs/development/tools/misc/ctags/default.nix
+++ b/pkgs/development/tools/misc/ctags/default.nix
@@ -1,24 +1,26 @@
-{stdenv, fetchurl, sourceFromHead, automake, autoconf}:
+{ stdenv, fetchsvn, automake, autoconf}:
 
 stdenv.mkDerivation rec {
-  name = "ctags-svn";
-  # REGION AUTO UPDATE:      { name="ctags"; type = "svn"; url = "https://ctags.svn.sourceforge.net/svnroot/ctags/trunk"; }
-  src= sourceFromHead "ctags-749.tar.gz"
-               (fetchurl { url = "http://mawercer.de/~nix/repos/ctags-749.tar.gz"; sha256 = "01dd4bf2e55dbedc38def81febef60eece912cb7624df1c0a2cf1ed6e4bc4ecf"; });
-  # END
+  name = "ctags-${revision}";
+  revision = "804";
 
-  preConfigure = ''
-    autoheader
-    autoconf
-  '';
+  src = fetchsvn {
+    url = "http://ctags.svn.sourceforge.net/svnroot/ctags/trunk";
+    rev = revision;
+    sha256 = "16gln1mah2jqp32ki1z0187dwkbjx1xcnmyiardcq6c9w3p4qwcr";
+  };
 
   buildInputs = [ automake autoconf ];
 
+  preConfigure = "autoreconf -i";
+
   # don't use $T(E)MP which is set to the build directory
   configureFlags="--enable-tmpdir=/tmp";
 
   meta = {
+    homepage = "http://ctags.sourceforge.net/";
     description = "Exuberant Ctags, a tool for fast source code browsing";
+    license = stdenv.lib.licenses.gpl2Plus;
 
     longDescription = ''
       Ctags generates an index (or tag) file of language objects found
@@ -29,9 +31,8 @@ stdenv.mkDerivation rec {
       programming languages are supported.
     '';
 
-    homepage = http://ctags.sourceforge.net/;
-
-    license = "GPLv2+";
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = [ stdenv.lib.maintainers.simons ];
   };
 
 }
diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix
index 5a1a19068a7..ef1e7e781fa 100644
--- a/pkgs/development/tools/misc/elfutils/default.nix
+++ b/pkgs/development/tools/misc/elfutils/default.nix
@@ -3,20 +3,20 @@
 # TODO: Look at the hardcoded paths to kernel, modules etc.
 stdenv.mkDerivation rec {
   name = "elfutils-${version}";
-  version = "0.152";
-  
+  version = "0.155";
+
   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 = "1n0fsg2q961i0lj355w2ad3cmp7d1jjcdhrfhmlgsvs14r2lli38";
   };
 
   patches = [
     (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 = "0w8i94x9hqirgs2lwcd1g36s77r5svh4j1fgcrd6lx5w18vch0di";
     }) ];
 
   # We need bzip2 in NativeInputs because otherwise we can't unpack the src,
diff --git a/pkgs/development/tools/misc/gob2/default.nix b/pkgs/development/tools/misc/gob2/default.nix
index 4308a559268..c86a65f33b6 100644
--- a/pkgs/development/tools/misc/gob2/default.nix
+++ b/pkgs/development/tools/misc/gob2/default.nix
@@ -1,10 +1,11 @@
-{ stdenv, fetchurl, pkgconfig, glib, bison, flex }:
+{ stdenv, fetchurl_gnome, pkgconfig, glib, bison, flex }:
 
 stdenv.mkDerivation rec {
-  name = "gob2-2.0.18";
+  name = src.pkgname;
 
-  src = fetchurl {
-    url = "http://ftp.5z.com/pub/gob/${name}.tar.gz";
+  src = fetchurl_gnome {
+    project = "gob2";
+    major = "2"; minor = "0"; patchlevel = "18"; extension = "gz";
     sha256 = "1r242s3rsxyqiw2ic2gdpvvrx903jgjd1aa4mkl26in5k9zk76fa";
   };
 
diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix
index a7d5ad0e393..bdd35dc50f0 100644
--- a/pkgs/development/tools/misc/lsof/default.nix
+++ b/pkgs/development/tools/misc/lsof/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl}:
 
 stdenv.mkDerivation {
-  name = "lsof-4.86";
+  name = "lsof-4.87";
 
   src = fetchurl {
-    url = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.86.tar.bz2;
-    sha256 = "13e52b8e87dddf1b2e219004e315d755c659217ce6ffc6a5f1102969f1c4dd0c";
+    url = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.87.tar.bz2;
+    sha256 = "0b6si72sml7gr9784ak491cxxbm9mx5bh174yg6rrirbv04kgpfz";
   };
 
   unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); ";
diff --git a/pkgs/development/tools/misc/texinfo/5.0.nix b/pkgs/development/tools/misc/texinfo/5.1.nix
index a4fb2e9b468..807a3388b4b 100644
--- a/pkgs/development/tools/misc/texinfo/5.0.nix
+++ b/pkgs/development/tools/misc/texinfo/5.1.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, ncurses, perl }:
 
 stdenv.mkDerivation rec {
-  name = "texinfo-5.0";
+  name = "texinfo-5.1";
 
   src = fetchurl {
     url = "mirror://gnu/texinfo/${name}.tar.xz";
-    sha256 = "1p34f68h9ggfj6ckgj0p62qlj7pmz3ha3vc91kh4hr44pnwm1pla";
+    sha256 = "0864v5i488x3mb3v5p6nhy2kw0mqkzpa3b0453iibj81zlpq078q";
   };
 
   buildInputs = [ ncurses perl ];
diff --git a/pkgs/development/tools/ocaml/opam/default.nix b/pkgs/development/tools/ocaml/opam/default.nix
new file mode 100644
index 00000000000..0a0dd4e6fe2
--- /dev/null
+++ b/pkgs/development/tools/ocaml/opam/default.nix
@@ -0,0 +1,60 @@
+{ stdenv, fetchgit, fetchurl, ocaml, unzip, ncurses, curl }:
+
+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/OCamlPro/opam/archive/0.9.5.zip";
+      sha256 = "2ec706330a3283b4d057abc562c6078351988d0ae98ad507fe51cae598b43afd";
+    };
+  };
+in
+stdenv.mkDerivation rec {
+  name = "opam-0.9.5";
+
+  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}
+  '';
+
+  makeFlags = ["HOME=$(TMPDIR)"];
+
+  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/parsing/alex/3.0.4.nix b/pkgs/development/tools/parsing/alex/3.0.5.nix
index 3160570b240..f85aa42d165 100644
--- a/pkgs/development/tools/parsing/alex/3.0.4.nix
+++ b/pkgs/development/tools/parsing/alex/3.0.5.nix
@@ -1,14 +1,14 @@
-{ cabal, perl, QuickCheck }:
+{ cabal, fetchurl, perl, QuickCheck }:
 
 cabal.mkDerivation (self: {
   pname = "alex";
-  version = "3.0.4";
-  sha256 = "0fgh7ziwxyb140wghh7dpndh41sixcssnba0q942cvkg77m6ah6d";
+  version = "3.0.5";
+  sha256 = "0ncnp7cl7dlfcrwzzcp8j59i9j5r66wim1yib9g3b3jkl0bn8cn3";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [ QuickCheck ];
   buildTools = [ perl ];
-  doCheck = false;
+  patches = [ (fetchurl { url="https://github.com/simonmar/alex/pull/21.patch"; sha256="0apv3rk00gwkf5rqw3467bg6pnamr07zdksbp9khhzzi73k9aq4f"; }) ];
   meta = {
     homepage = "http://www.haskell.org/alex/";
     description = "Alex is a tool for generating lexical analysers in Haskell";
diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix
new file mode 100644
index 00000000000..063af69a7f3
--- /dev/null
+++ b/pkgs/development/tools/selenium/chromedriver/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, cairo, fontconfig, freetype, gdk_pixbuf, glib
+, glibc, gtk, libX11, makeWrapper, nspr, nss, pango, unzip
+}:
+
+# note: there is a i686 version available as well
+assert stdenv.system == "x86_64-linux";
+
+stdenv.mkDerivation rec {
+  name = "chromedriver_linux64_26.0.1383.0";
+
+  src = fetchurl {
+    url = "http://chromedriver.googlecode.com/files/${name}.zip";
+    sha256 = "0fh4r2rcpjc3nfrdyj256kjlyc0b6mhxqwxcah73q4vm1kjax8rs";
+  };
+
+  buildInputs = [
+    cairo fontconfig freetype gdk_pixbuf glib gtk libX11 makeWrapper
+    nspr nss pango unzip
+  ];
+
+  unpackPhase = "unzip $src";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    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:\$LD_LIBRARY_PATH"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://code.google.com/p/chromedriver/;
+    description = "A WebDriver server for running Selenium tests on Chrome";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/web/nodejs/default.nix b/pkgs/development/web/nodejs/default.nix
index 7f1aafa64f7..138b4180b89 100644
--- a/pkgs/development/web/nodejs/default.nix
+++ b/pkgs/development/web/nodejs/default.nix
@@ -12,26 +12,36 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--openssl-includes=${openssl}/include"
     "--openssl-libpath=${openssl}/lib"
+  ]
+  ++ (if !stdenv.isDarwin then [ # Shared V8 is broken on Mac OS X. Who can fix V8 on Darwin makes me very happy, but I gave up studying python-gyp.
     "--shared-v8"
     "--shared-v8-includes=${v8}/includes"
     "--shared-v8-libpath=${v8}/lib"
-  ];
+  ] else []);
 
   #patches = stdenv.lib.optional stdenv.isDarwin ./no-arch-flag.patch;
 
+  # Expose the host compiler on darwin, which is the only compiler capable of building it
+  preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
+    export OLDPATH=$PATH
+    export PATH=/usr/bin:$PATH
+  '';
+
   prePatch = ''
     sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i tools/{*.py,waf-light,node-waf} configure
   '';
 
-  postInstall = ''
-
+  postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
+    export PATH=$OLDPATH
+  '' + ''
     sed -e 's|^#!/usr/bin/env node$|#!'$out'/bin/node|' -i $out/lib/node_modules/npm/bin/npm-cli.js
-  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+  '' /*+ stdenv.lib.optionalString stdenv.isDarwin ''
     install_name_tool -change libv8.dylib ${v8}/lib/libv8.dylib $out/bin/node
-  '';
+  ''*/;
 
-  buildInputs = [ python openssl v8 zlib ] ++ stdenv.lib.optional stdenv.isLinux utillinux;
-  
+  buildInputs = [ python openssl zlib ]
+    ++ stdenv.lib.optional stdenv.isLinux utillinux
+    ++ stdenv.lib.optional (!stdenv.isDarwin) v8;
   setupHook = ./setup-hook.sh;
 
   meta = with stdenv.lib; {
diff --git a/pkgs/games/asc/default.nix b/pkgs/games/asc/default.nix
index 86cf929aede..bf2fb1e89c2 100644
--- a/pkgs/games/asc/default.nix
+++ b/pkgs/games/asc/default.nix
@@ -10,6 +10,10 @@ stdenv.mkDerivation rec {
     sha256 = "1r011l4gsliky6szjvda8xzyhkkc50ahrr7p14911v5ydar0w3hh";
   };
 
+  configureFlags = [ "--disable-paragui" "--disable-paraguitest" ];
+
+  NIX_CFLAGS_COMPILE = "-fpermissive"; # I'm too lazy to catch all gcc47-related problems
+
   buildInputs = [
     SDL SDL_image SDL_mixer SDL_sound libsigcxx physfs boost expat freetype
     libjpeg wxGTK lua perl pkgconfig zlib zip bzip2 libpng
diff --git a/pkgs/games/eduke32/default.nix b/pkgs/games/eduke32/default.nix
index 6eab8acce75..b8a215e3b49 100644
--- a/pkgs/games/eduke32/default.nix
+++ b/pkgs/games/eduke32/default.nix
@@ -1,14 +1,14 @@
-{stdenv, fetchurl, SDL, SDL_mixer, libvorbis, mesa, gtk, pkgconfig, nasm, makeDesktopItem}:
+{stdenv, fetchurl, SDL, SDL_mixer, libvorbis, mesa, gtk, pkgconfig, nasm, libvpx, flac, makeDesktopItem}:
 
 stdenv.mkDerivation rec {
-  name = "eduke32-1944";
+  name = "eduke32-3542";
   
   src = fetchurl {
-    url = http://dukeworld.duke4.net/eduke32/synthesis/20110724-1944/eduke32_src_20110724-1944.tar.bz2;
-    sha256 = "0y2y9agydfkdq4krp4lz22br3p23as6hrqhq7l9djw0pm2y76fqh";
+    url = http://dukeworld.duke4.net/eduke32/synthesis/20130303-3542/eduke32_src_20130303-3542.tar.bz2;
+    sha256 = "0v1q2bkmpnac5l9x97nnlhrrb95518vmhxx48zv3ncvmpafl1mqc";
   };
   
-  buildInputs = [ SDL SDL_mixer libvorbis mesa gtk pkgconfig ]
+  buildInputs = [ SDL SDL_mixer libvorbis mesa gtk pkgconfig libvpx flac ]
     ++ stdenv.lib.optional (stdenv.system == "i686-linux") nasm;
   
   NIX_CFLAGS_COMPILE = "-I${SDL}/include/SDL";
diff --git a/pkgs/games/unvanquished/default.nix b/pkgs/games/unvanquished/default.nix
index 03069f9fe14..6d1c8e5607c 100644
--- a/pkgs/games/unvanquished/default.nix
+++ b/pkgs/games/unvanquished/default.nix
@@ -3,10 +3,10 @@
 , makeWrapper }:
 stdenv.mkDerivation rec {
   name = "unvanquished-${version}";
-  version = "0.12.0";
+  version = "0.13.1";
   src = fetchurl {
     url = "https://github.com/Unvanquished/Unvanquished/archive/v${version}.tar.gz";
-    sha256 = "0spwin0vms1zzkbgzkm423k804nqr5d54xppjbwhdnrd5fdv0gyl";
+    sha256 = "1k7mlpwalimn6xb2s760f124xncpg455qvls6z3x0ii5x0wc1mp2";
   };
   buildInputs = [ cmake mesa SDL libjpeg libpng glew libwebp ncurses gmp curl
                   nettle openal speex libogg libvorbis libtheora xvidcore 
diff --git a/pkgs/games/vdrift/default.nix b/pkgs/games/vdrift/default.nix
index 0f9da888382..63a8f508684 100644
--- a/pkgs/games/vdrift/default.nix
+++ b/pkgs/games/vdrift/default.nix
@@ -2,13 +2,21 @@
   asio, boost, SDL_gfx, pkgconfig, bullet, curl, libarchive }:
 
 stdenv.mkDerivation rec {
-  name = "vdrift-2011-10-22";
+  version = "2012-07-22";
+  name = "vdrift-${version}";
+  patch = "c"; # see https://github.com/VDrift/vdrift/issues/110
 
   src = fetchurl {
     url = "mirror://sourceforge/vdrift/${name}.tar.bz2";
-    sha256 = "0vg1v1590jbln6k236kxn2sfgclvc6g34kykhh4nq9q3l1xgy38s";
+    sha256 = "1yqkc7y4s4g5ylw501bf0c03la7kfddjdk4yyi1xkcwy3pmgw2al";
   };
 
+  patches = fetchurl {
+    url = "mirror://sourceforge/vdrift/${name}${patch}_patch.diff";
+    sha256 = "08mfg4xxkzyp6602cgqyjzc3rn0zsaa3ddjkpd44b83drv19lriy";
+  };
+  patchFlags = "-p0";
+
   buildInputs = [ scons mesa SDL freeglut SDL_image glew libvorbis asio boost
     SDL_gfx pkgconfig bullet curl libarchive ];
 
diff --git a/pkgs/games/xboard/default.nix b/pkgs/games/xboard/default.nix
index ab74d56dbcc..a21911f4067 100644
--- a/pkgs/games/xboard/default.nix
+++ b/pkgs/games/xboard/default.nix
@@ -1,19 +1,20 @@
 {stdenv, fetchurl, libX11, xproto, libXt, libXaw, libSM, libICE, libXmu
-, libXext, gnuchess, texinfo, libXpm
+, libXext, gnuchess, texinfo, libXpm, pkgconfig, librsvg, cairo
 }:
 let
   s = # Generated upstream information
   rec {
     baseName="xboard";
-    version="4.6.2";
+    version="4.7.0";
     name="${baseName}-${version}";
-    hash="1pw90fh1crf0nkqyql54z728vn2093hwdh2v5i5703z9qv9g4mrf";
-    url="http://ftp.gnu.org/gnu/xboard/xboard-4.6.2.tar.gz";
-    sha256="1pw90fh1crf0nkqyql54z728vn2093hwdh2v5i5703z9qv9g4mrf";
+    hash="15azbnyfapjppfni9k99sk68af1kg60nnh95rz8jgb3i2xv5y5m7";
+    url="http://ftp.gnu.org/gnu/xboard/xboard-4.7.0.tar.gz";
+    sha256="15azbnyfapjppfni9k99sk68af1kg60nnh95rz8jgb3i2xv5y5m7";
   };
   buildInputs = [
     libX11 xproto libXt libXaw libSM libICE libXmu 
-    libXext gnuchess texinfo libXpm
+    libXext gnuchess texinfo libXpm pkgconfig librsvg 
+    cairo
   ];
 in
 stdenv.mkDerivation {
diff --git a/pkgs/lib/attrsets.nix b/pkgs/lib/attrsets.nix
index fcdc3c31f29..f562a2f7df4 100644
--- a/pkgs/lib/attrsets.nix
+++ b/pkgs/lib/attrsets.nix
@@ -194,7 +194,7 @@ rec {
          (as: !(as ? "type" && as.type == "derivation"))
          (x: ... do something ...)
          attrs
-     */
+  */
   mapAttrsRecursiveCond = cond: f: set:
     let
       recurse = path: set:
@@ -208,6 +208,17 @@ rec {
     in recurse [] set;
 
 
+  /* Generate an attribute set by mapping a function over a list of
+     attribute names.
+
+     Example:
+       genAttrs [ "foo" "bar" ] (name: "x_" + name)
+       => { foo = "x_foo"; bar = "x_bar"; }
+  */
+  genAttrs = names: f:
+    listToAttrs (map (n: nameValuePair n (f n)) names);
+
+
   /* Check whether the argument is a derivation. */
   isDerivation = x: isAttrs x && x ? type && x.type == "derivation";
 
diff --git a/pkgs/lib/maintainers.nix b/pkgs/lib/maintainers.nix
index 76aa2de723d..a2e8b50c10e 100644
--- a/pkgs/lib/maintainers.nix
+++ b/pkgs/lib/maintainers.nix
@@ -27,6 +27,7 @@
   marcweber = "Marc Weber <marco-oweber@gmx.de>";
   mornfall = "Petr Ročkai <me@mornfall.net>";
   neznalek = "Vladimír Čunát <vcunat@gmail.com>";
+  orbitz = "Malcolm Matalka <mmatalka@gmail.com>";
   page = "Carles Pagès <page@cubata.homelinux.net>";
   phreedom = "Evgeny Egorochkin <phreedom.stdin@gmail.com>";
   pierron = "Nicolas B. Pierron <nixos@nbp.name>";
diff --git a/pkgs/lib/meta.nix b/pkgs/lib/meta.nix
index 0c5841dd717..a5afce9e0cb 100644
--- a/pkgs/lib/meta.nix
+++ b/pkgs/lib/meta.nix
@@ -43,6 +43,6 @@ rec {
   /* Increase the nix-env priority of the package, i.e., this
      version/variant of the package will be preferred.
   */
-  hiPrio = drv: addMetaAttrs { priority = "110"; } drv;
+  hiPrio = drv: addMetaAttrs { priority = "-10"; } drv;
   
 }
diff --git a/pkgs/misc/emulators/wine/default.nix b/pkgs/misc/emulators/wine/default.nix
index 010e65f62eb..fd6d1a6cc7f 100644
--- a/pkgs/misc/emulators/wine/default.nix
+++ b/pkgs/misc/emulators/wine/default.nix
@@ -7,12 +7,12 @@ assert stdenv.isLinux;
 assert stdenv.gcc.gcc != null;
 
 stdenv.mkDerivation rec {
-  version = "1.5.23";
+  version = "1.5.25";
   name = "wine-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/wine/${name}.tar.bz2";
-    sha256 = "1wgs2bdl3sn3j0za7fk9zfjlii1x6qkvmyw4jxzz1mfw6nizswzr";
+    sha256 = "0812ryv1v0gqr13vmvjci09k89qhcr1qs0n052z4zw0vpipjd4rx";
   };
 
   gecko = fetchurl {
@@ -49,6 +49,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://www.winehq.org/";
     license = "LGPL";
+    inherit version;
     description = "An Open Source implementation of the Windows API on top of X, OpenGL, and Unix";
     maintainers = [stdenv.lib.maintainers.raskin stdenv.lib.maintainers.simons];
     platforms = stdenv.lib.platforms.linux;
diff --git a/pkgs/os-specific/linux/bbswitch/default.nix b/pkgs/os-specific/linux/bbswitch/default.nix
index 04fba890bc5..dccfeeb8a69 100644
--- a/pkgs/os-specific/linux/bbswitch/default.nix
+++ b/pkgs/os-specific/linux/bbswitch/default.nix
@@ -1,9 +1,14 @@
 { stdenv, fetchurl, kernel }:
 
 let
-  baseName = "bbswitch-0.4.2";
+  baseName = "bbswitch-0.5";
   name = "${baseName}-${kernel.version}";
 
+  linux38Compatibility = fetchurl {
+    url = "http://github.com/Bumblebee-Project/bbswitch/commit/5593d95.patch";
+    sha256 = "0m6y5sdagf4brhk1lsp86rx94xf628sixzf6j71bn7jnqs4jslr6";
+  };
+
 in
 
 stdenv.mkDerivation {
@@ -11,15 +16,17 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://github.com/downloads/Bumblebee-Project/bbswitch/${baseName}.tar.gz";
-    sha256 = "06j3cm1rk3lcbv54k0magrijykrzmkrna8n5cc274iz59842lga3";
+    sha256 = "19775r3bsf5l3ssbayr30fij09gavj2qjrr438hdcmzswvlj2dpv";
   };
 
+  patches = [ linux38Compatibility ];
+
   preBuild = ''
     substituteInPlace Makefile \
       --replace "\$(shell uname -r)" "${kernel.modDirVersion}" \
       --replace "/lib/modules" "${kernel}/lib/modules"
   '';
- 
+
   installPhase = ''
     ensureDir $out/lib/modules/${kernel.modDirVersion}/misc
     cp bbswitch.ko $out/lib/modules/${kernel.modDirVersion}/misc
diff --git a/pkgs/os-specific/linux/checkpolicy/default.nix b/pkgs/os-specific/linux/checkpolicy/default.nix
index a69249b216d..9125c84bd7a 100644
--- a/pkgs/os-specific/linux/checkpolicy/default.nix
+++ b/pkgs/os-specific/linux/checkpolicy/default.nix
@@ -2,11 +2,12 @@
 stdenv.mkDerivation rec {
 
   name = "checkpolicy-${version}";
-  version = "2.0.23";
+  version = "2.1.11";
+  inherit (libsepol) se_release se_url;
 
   src = fetchurl {
-    url = "http://userspace.selinuxproject.org/releases/20101221/devel/checkpolicy-2.0.23.tar.gz";
-    sha256 = "1n34ggacds7xap039r6hqkxmkd4g2wgfkxjdnv3lirq3cqqi8cnd";
+    url = "${se_url}/${se_release}/checkpolicy-${version}.tar.gz";
+    sha256 = "1wahs32l4jjlg0s3lyihdhvwmsy7yyvq5pk96q9lsiilc5vvrb06";
   };
 
   buildInputs = [ libsepol libselinux bison flex ];
@@ -14,10 +15,8 @@ stdenv.mkDerivation rec {
   preBuild = '' makeFlags="$makeFlags LEX=flex LIBDIR=${libsepol}/lib PREFIX=$out" '';
 
   meta = with stdenv.lib; {
-    homepage = http://userspace.selinuxproject.org/;
     description = "SELinux policy compiler";
     license = licenses.gpl2;
-    maintainers = [ maintainers.phreedom ];
-    platforms = platforms.linux;
+    inherit (libsepol.meta) homepage platforms maintainers;
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/os-specific/linux/cifs-utils/default.nix b/pkgs/os-specific/linux/cifs-utils/default.nix
index 9e761b90a05..0f8801ef58e 100644
--- a/pkgs/os-specific/linux/cifs-utils/default.nix
+++ b/pkgs/os-specific/linux/cifs-utils/default.nix
@@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "0f619nw1163bcmfc83mmqj31qdkl68wfm81vynx3d8q0m0k1ll7i";
   };
 
+  patches = [ ./find-systemd-ask-password-via-path.patch ];
+
   makeFlags = "root_sbindir=$(out)/sbin";
 
   meta = {
diff --git a/pkgs/os-specific/linux/cifs-utils/find-systemd-ask-password-via-path.patch b/pkgs/os-specific/linux/cifs-utils/find-systemd-ask-password-via-path.patch
new file mode 100644
index 00000000000..428cb75edad
--- /dev/null
+++ b/pkgs/os-specific/linux/cifs-utils/find-systemd-ask-password-via-path.patch
@@ -0,0 +1,22 @@
+diff -ubr cifs-utils-5.9-orig/mount.cifs.c cifs-utils-5.9/mount.cifs.c
+--- cifs-utils-5.9-orig/mount.cifs.c	2013-03-05 10:53:19.375464790 +0100
++++ cifs-utils-5.9/mount.cifs.c	2013-03-05 11:41:40.704946110 +0100
+@@ -1634,7 +1634,7 @@
+ }
+ 
+ /*
+- * If systemd is running and /bin/systemd-ask-password --
++ * If systemd is running and systemd-ask-password --
+  * is available, then use that else fallback on getpass(..)
+  *
+  * Returns: @input or NULL on error
+@@ -1657,7 +1657,7 @@
+ 		FILE *ask_pass_fp = NULL;
+ 
+ 		cmd = ret = NULL;
+-		if (asprintf(&cmd, "/bin/systemd-ask-password \"%s\"", prompt) >= 0) {
++		if (asprintf(&cmd, "/run/current-system/sw/bin/systemd-ask-password \"%s\"", prompt) >= 0) {
+ 			ask_pass_fp = popen (cmd, "re");
+ 			free (cmd);
+ 		}
+Only in cifs-utils-5.9/: mount.cifs.c.orig
diff --git a/pkgs/os-specific/linux/firmware/bcm43xx/default.nix b/pkgs/os-specific/linux/firmware/bcm43xx/default.nix
index edc15a360ff..fb43c7d67e1 100644
--- a/pkgs/os-specific/linux/firmware/bcm43xx/default.nix
+++ b/pkgs/os-specific/linux/firmware/bcm43xx/default.nix
@@ -2,13 +2,13 @@
 
 let
   src1 = fetchurl {
-    url = "https://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=brcm/bcm43xx_hdr-0.fw;hb=15888a2eab052ac3d3f49334e4f6f05f347a516e";
+    url = "http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=blob_plain;f=brcm/bcm43xx_hdr-0.fw;hb=15888a2eab052ac3d3f49334e4f6f05f347a516e";
     sha256 = "d02549964d21dd90fc35806483b9fc871d93d7d38ae1a70a9ce006103c2a3de3";
     name = "bcm43xx_hdr-0.fw";
   };
 
   src2 = fetchurl {
-    url = "https://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=brcm/bcm43xx-0.fw;hb=15888a2eab052ac3d3f49334e4f6f05f347a516e";
+    url = "https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=blob_plain;f=brcm/bcm43xx-0.fw;hb=15888a2eab052ac3d3f49334e4f6f05f347a516e";
     sha256 = "f90f685903127e4db431fe1efccefebf77272712bd4bfe46d1d1d5825ee52797";
     name = "bcm43xx-0.fw";
   };
diff --git a/pkgs/os-specific/linux/firmware/iwlwifi-4965-ucode/version-2.nix b/pkgs/os-specific/linux/firmware/iwlwifi-4965-ucode/version-2.nix
index e1771c7a5cf..3e15374c65f 100644
--- a/pkgs/os-specific/linux/firmware/iwlwifi-4965-ucode/version-2.nix
+++ b/pkgs/os-specific/linux/firmware/iwlwifi-4965-ucode/version-2.nix
@@ -1,11 +1,12 @@
 {stdenv, fetchurl}:
 
 stdenv.mkDerivation rec {
-  name = "iwlwifi-4965-ucode-228.57.2.21";
+  name = "iwlwifi-4965-ucode-228.61.2.24";
   
   src = fetchurl {
-    url = "http://intellinuxwireless.org/iwlwifi/downloads/" + name + ".tgz";
-    sha256 = "1ss8r9l8j28n4zplpcwf81n74yy7p4q9dldnblmh4g0h9nyr8nf0";
+    url = "http://wireless.kernel.org/en/users/Drivers/iwlegacy?action=AttachFile&do=get&target=iwlwifi-4965-ucode-228.61.2.24.tgz";
+    name = "iwlwifi-4965-ucode-228.61.2.24.tgz";
+    sha256 = "1n5af3cci0v40w4gr0hplqr1lfvhghlbzdbf60d6185vpcny2l5m";
   };
   
   buildPhase = "true";
diff --git a/pkgs/os-specific/linux/firmware/iwlwifi-5000-ucode/default.nix b/pkgs/os-specific/linux/firmware/iwlwifi-5000-ucode/default.nix
index 49269fffe47..8805f1393fb 100644
--- a/pkgs/os-specific/linux/firmware/iwlwifi-5000-ucode/default.nix
+++ b/pkgs/os-specific/linux/firmware/iwlwifi-5000-ucode/default.nix
@@ -4,8 +4,9 @@ stdenv.mkDerivation rec {
   name = "iwlwifi-5000-ucode-8.83.5.1-1";
   
   src = fetchurl {
-    url = "http://www.intellinuxwireless.org/iwlwifi/downloads/${name}.tar.gz";
-    sha256 = "0n4f6wsppspvvdpcab52n2piczhgfq7a4y7gazxzzlj5halchnx3";
+    url = "http://wireless.kernel.org/en/users/Drivers/iwlwifi?action=AttachFile&do=get&target=iwlwifi-5000-ucode-8.83.5.1-1.tgz";
+    name = "iwlwifi-5000-ucode-8.83.5.1-1.tgz";
+    sha256 = "0pkzr4gflp3j0jm4rw66jypk3xn4bvpgdsnxjqwanyd64aj6naxg";
   };
   
   buildPhase = "true";
diff --git a/pkgs/os-specific/linux/firmware/rtl8168e-2/default.nix b/pkgs/os-specific/linux/firmware/rtl8168e-2/default.nix
index a73ae978597..dbd2fa45b7b 100644
--- a/pkgs/os-specific/linux/firmware/rtl8168e-2/default.nix
+++ b/pkgs/os-specific/linux/firmware/rtl8168e-2/default.nix
@@ -1,8 +1,9 @@
 { stdenv, fetchurl }:
 
+# http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git
 let
   src = fetchurl {
-    url = "http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=rtl_nic/rtl8168e-2.fw";
+    url = "http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=blob_plain;f=rtl_nic/rtl8168e-2.fw";
     sha256 = "11lkwc6r6f5pi8clxajp43j6dzapydgxaxaschribpvhn8lrjj0a";
     name = "rtl8168e-2.fw";
   };
diff --git a/pkgs/os-specific/linux/hostapd/default.nix b/pkgs/os-specific/linux/hostapd/default.nix
index f13a1033f8b..b8e5055f056 100644
--- a/pkgs/os-specific/linux/hostapd/default.nix
+++ b/pkgs/os-specific/linux/hostapd/default.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
     substituteInPlace Makefile --replace "/usr/local/bin" "$out/bin"
     mv defconfig .config
     echo CONFIG_LIBNL32=y | tee -a .config
+    echo CONFIG_IEEE80211N=y | tee -a .config
     export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags libnl-3.0)"
   '';
   preInstall = "mkdir -p $out/bin";
@@ -27,4 +28,4 @@ stdenv.mkDerivation rec {
     maintainers = [ maintainers.phreedom ];
     platforms = platforms.linux;
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix
index fad84e180bd..50469eb5383 100644
--- a/pkgs/os-specific/linux/kernel/generic.nix
+++ b/pkgs/os-specific/linux/kernel/generic.nix
@@ -39,6 +39,8 @@
 , # After the builder did a 'make all' (kernel + modules)
   # we force building the target asked: bzImage/zImage/uImage/...
   postBuild ? "make $makeFlags $kernelTarget; make $makeFlags -C scripts unifdef"
+
+, extraNativeBuildInputs ? []
 , ...
 }:
 
@@ -83,7 +85,8 @@ stdenv.mkDerivation {
   # For UML and non-PC, just ignore all options that don't apply (We are lazy).
   ignoreConfigErrors = stdenv.platform.name != "pc";
 
-  nativeBuildInputs = [ perl mktemp ];
+  nativeBuildInputs = [ perl mktemp ] ++ extraNativeBuildInputs;
+
   buildInputs = lib.optional (stdenv.platform.uboot != null)
     (ubootChooser stdenv.platform.uboot);
 
@@ -130,6 +133,7 @@ stdenv.mkDerivation {
         " (with patches: "
         + lib.concatStrings (lib.intersperse ", " (map (x: x.name) kernelPatches))
         + ")");
+    inherit version;
     license = "GPLv2";
     homepage = http://www.kernel.org/;
     maintainers = [
diff --git a/pkgs/os-specific/linux/kernel/linux-3.0.nix b/pkgs/os-specific/linux/kernel/linux-3.0.nix
index b7ccdde367c..adaef56e55f 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.0.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.0.nix
@@ -230,7 +230,7 @@ in
 import ./generic.nix (
 
   rec {
-    version = "3.0.65";
+    version = "3.0.68";
 
     preConfigure = ''
       substituteInPlace scripts/depmod.sh --replace '-b "$INSTALL_MOD_PATH"' ""
@@ -238,7 +238,7 @@ import ./generic.nix (
 
     src = fetchurl {
       url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-      sha256 = "1vmk0bmg0djwbh9scrhpyljan01ygkwn4q0j1ydn8snag7sn4x8y";
+      sha256 = "1l9ifmwfxh17r2yv5sscar46r46lc1lar1k0cyvn4hd594xmf5cw";
     };
 
     config = configWithPlatform stdenv.platform;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.2.nix b/pkgs/os-specific/linux/kernel/linux-3.2.nix
index afa62fe7798..f567fe084ef 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.2.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.2.nix
@@ -239,8 +239,7 @@ in
 import ./generic.nix (
 
   rec {
-    version = "3.2.38";
-    testing = false;
+    version = "3.2.39";
 
     modDirVersion = version;
 
@@ -249,8 +248,8 @@ import ./generic.nix (
     '';
 
     src = fetchurl {
-      url = "mirror://kernel/linux/kernel/v3.0/${if testing then "testing/" else ""}linux-${version}.tar.xz";
-      sha256 = "10hm4cy56xjl5ckv3jj3grw31qfhwrgia0wq71c34dw0mv3bix8w";
+      url = "mirror://kernel/linux/kernel/v3.0/linux-${version}.tar.xz";
+      sha256 = "066vgyz37jxxwmdskwzazg7xa09mirk4krlyxpvsx68ai5rjf826";
     };
 
     config = configWithPlatform stdenv.platform;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.4.nix b/pkgs/os-specific/linux/kernel/linux-3.4.nix
index 0e032935900..ec80aabef0c 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.4.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.4.nix
@@ -244,7 +244,7 @@ in
 import ./generic.nix (
 
   rec {
-    version = "3.4.32";
+    version = "3.4.35";
     testing = false;
 
     preConfigure = ''
@@ -253,7 +253,7 @@ import ./generic.nix (
 
     src = fetchurl {
       url = "mirror://kernel/linux/kernel/v3.x/${if testing then "testing/" else ""}linux-${version}.tar.xz";
-      sha256 = "0z218ibz36lpdyjjch94jx12fcghj376x3fkmgxmwdjaz7zngn4i";
+      sha256 = "1gyl0zgrbvx5w7qwh7amr4f3gl35hdm21zniksgsyx9cbyfxf8a4";
     };
 
     config = configWithPlatform stdenv.platform;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.7.nix b/pkgs/os-specific/linux/kernel/linux-3.7.nix
index df6387b1f81..a522c90a10f 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.7.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.7.nix
@@ -251,7 +251,7 @@ in
 import ./generic.nix (
 
   rec {
-    version = "3.7.9";
+    version = "3.7.10";
     testing = false;
 
     preConfigure = ''
@@ -260,7 +260,7 @@ import ./generic.nix (
 
     src = fetchurl {
       url = "mirror://kernel/linux/kernel/v3.x/${if testing then "testing/" else ""}linux-${version}.tar.xz";
-      sha256 = "1d9834flw0jyfn0lq1l0ahp8v12p227qn6z39v1pk53dap1zl0v1";
+      sha256 = "1l8b40z95ahc2v9babmhrbi8jn2bhwkapq0libq0z21iipqsya4v";
     };
 
     config = configWithPlatform stdenv.platform;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.8.nix b/pkgs/os-specific/linux/kernel/linux-3.8.nix
index 1c59a2ff486..9aaa2e80aab 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.8.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.8.nix
@@ -251,8 +251,7 @@ in
 import ./generic.nix (
 
   rec {
-    version = "3.8";
-    modDirVersion = "3.8.0";
+    version = "3.8.2";
     testing = false;
 
     preConfigure = ''
@@ -261,7 +260,7 @@ import ./generic.nix (
 
     src = fetchurl {
       url = "mirror://kernel/linux/kernel/v3.x/${if testing then "testing/" else ""}linux-${version}.tar.xz";
-      sha256 = "0jqqhfskd88480hkwnkc8rlwkwb56p322irp9xm6gmfyzfyx2w70";
+      sha256 = "1i7r89ba79x6irr95gq1b0cnkbmdz3llh72vdamn83s3zh6cy1fv";
     };
 
     config = configWithPlatform stdenv.platform;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.9.nix b/pkgs/os-specific/linux/kernel/linux-3.9.nix
new file mode 100644
index 00000000000..cd21d694396
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/linux-3.9.nix
@@ -0,0 +1,280 @@
+args @ { stdenv, fetchurl, extraConfig ? ""
+, perl, mktemp, module_init_tools, bc
+, ... }:
+
+let
+  configWithPlatform = kernelPlatform :
+    ''
+      # Power management and debugging for powertop.
+      DEBUG_KERNEL y
+      PM_ADVANCED_DEBUG y
+      PM_RUNTIME y
+      TIMER_STATS y
+      USB_SUSPEND y
+      BACKTRACE_SELF_TEST n
+      CPU_NOTIFIER_ERROR_INJECT? n
+      DEBUG_DEVRES n
+      DEBUG_NX_TEST n
+      DEBUG_STACK_USAGE n
+      DEBUG_STACKOVERFLOW n
+      RCU_TORTURE_TEST n
+      SCHEDSTATS n
+
+      # Support drivers that need external firmware.
+      STANDALONE n
+
+      # Make /proc/config.gz available.
+      IKCONFIG_PROC y
+
+      # Optimize with -O2, not -Os.
+      CC_OPTIMIZE_FOR_SIZE n
+
+      # Enable the kernel's built-in memory tester.
+      MEMTEST y
+
+      # Include the CFQ I/O scheduler in the kernel, rather than as a
+      # module, so that the initrd gets a good I/O scheduler.
+      IOSCHED_CFQ y
+      BLK_CGROUP y # required by CFQ
+
+      # Enable NUMA.
+      NUMA? y
+
+      # Disable some expensive (?) features.
+      FTRACE n
+      KPROBES n
+      PM_TRACE_RTC n
+
+      # Enable various subsystems.
+      ACCESSIBILITY y # Accessibility support
+      AUXDISPLAY y # Auxiliary Display support
+      DONGLE y # Serial dongle support
+      HIPPI? y
+      MTD_COMPLEX_MAPPINGS y # needed for many devices
+      SCSI_LOWLEVEL y # enable lots of SCSI devices
+      SCSI_LOWLEVEL_PCMCIA y
+      SPI y # needed for many devices
+      SPI_MASTER y
+      WAN y
+
+      # Networking options.
+      IP_PNP n
+      IPV6_PRIVACY y
+      NETFILTER_ADVANCED y
+      IP_VS_PROTO_TCP y
+      IP_VS_PROTO_UDP y
+      IP_VS_PROTO_ESP y
+      IP_VS_PROTO_AH y
+      IP_DCCP_CCID3 n # experimental
+      CLS_U32_PERF y
+      CLS_U32_MARK y
+
+      # Wireless networking.
+      IPW2100_MONITOR y # support promiscuous mode
+      IPW2200_MONITOR? y # support promiscuous mode
+      HOSTAP_FIRMWARE y # Support downloading firmware images with Host AP driver
+      HOSTAP_FIRMWARE_NVRAM y
+      ATH9K_PCI y # Detect Atheros AR9xxx cards on PCI(e) bus
+      ATH9K_AHB y # Ditto, AHB bus
+      B43_PHY_HT y
+      BCMA_HOST_PCI y
+      CFG80211_WEXT y # Without it, ipw2200 drivers don't build
+
+      # Some settings to make sure that fbcondecor works - in particular,
+      # disable tileblitting and the drivers that need it.
+
+      # Enable various FB devices.
+      FB y
+      FB_EFI y
+      FB_NVIDIA_I2C y # Enable DDC Support
+      FB_RIVA_I2C y
+      FB_ATY_CT y # Mach64 CT/VT/GT/LT (incl. 3D RAGE) support
+      FB_ATY_GX y # Mach64 GX support
+      FB_SAVAGE_I2C y
+      FB_SAVAGE_ACCEL y
+      FB_SIS_300 y
+      FB_SIS_315 y
+      FB_3DFX_ACCEL y
+      FB_GEODE y
+
+      # Video configuration
+      # Enable KMS for devices whose X.org driver supports it.
+      DRM_I915_KMS y
+      DRM_RADEON_KMS? y
+      # Hybrid graphics support
+      VGA_SWITCHEROO y
+
+      # Sound.
+      SND_AC97_POWER_SAVE y # AC97 Power-Saving Mode
+      SND_HDA_INPUT_BEEP y # Support digital beep via input layer
+      SND_USB_CAIAQ_INPUT y
+      PSS_MIXER y # Enable PSS mixer (Beethoven ADSP-16 and other compatible)
+
+      # USB serial devices.
+      USB_SERIAL_GENERIC y # USB Generic Serial Driver
+      USB_SERIAL_KEYSPAN_MPR y # include firmware for various USB serial devices
+      USB_SERIAL_KEYSPAN_USA28 y
+      USB_SERIAL_KEYSPAN_USA28X y
+      USB_SERIAL_KEYSPAN_USA28XA y
+      USB_SERIAL_KEYSPAN_USA28XB y
+      USB_SERIAL_KEYSPAN_USA19 y
+      USB_SERIAL_KEYSPAN_USA18X y
+      USB_SERIAL_KEYSPAN_USA19W y
+      USB_SERIAL_KEYSPAN_USA19QW y
+      USB_SERIAL_KEYSPAN_USA19QI y
+      USB_SERIAL_KEYSPAN_USA49W y
+      USB_SERIAL_KEYSPAN_USA49WLC y
+
+      # Filesystem options - in particular, enable extended attributes and
+      # ACLs for all filesystems that support them.
+      EXT2_FS_XATTR y # Ext2 extended attributes
+      EXT2_FS_POSIX_ACL y # Ext2 POSIX Access Control Lists
+      EXT2_FS_SECURITY y # Ext2 Security Labels
+      EXT2_FS_XIP y # Ext2 execute in place support
+      EXT4_FS_POSIX_ACL y
+      EXT4_FS_SECURITY y
+      REISERFS_FS_XATTR y
+      REISERFS_FS_POSIX_ACL y
+      REISERFS_FS_SECURITY y
+      JFS_POSIX_ACL y
+      JFS_SECURITY y
+      XFS_QUOTA y
+      XFS_POSIX_ACL y
+      XFS_RT y # XFS Realtime subvolume support
+      OCFS2_DEBUG_MASKLOG n
+      BTRFS_FS_POSIX_ACL y
+      UBIFS_FS_XATTR? y
+      UBIFS_FS_ADVANCED_COMPR y
+      NFSD_V2_ACL y
+      NFSD_V3 y
+      NFSD_V3_ACL y
+      NFSD_V4 y
+      NFS_FSCACHE y
+      CIFS_XATTR y
+      CIFS_POSIX y
+      CIFS_FSCACHE y
+
+      # Security related features.
+      STRICT_DEVMEM y # Filter access to /dev/mem
+      SECURITY_SELINUX_BOOTPARAM_VALUE 0 # disable SELinux by default
+
+      # Misc. options.
+      8139TOO_8129 y
+      8139TOO_PIO n # PIO is slower
+      AIC79XX_DEBUG_ENABLE n
+      AIC7XXX_DEBUG_ENABLE n
+      AIC94XX_DEBUG n
+      B43_PCMCIA y
+      BLK_DEV_CMD640_ENHANCED y # CMD640 enhanced support
+      BLK_DEV_IDEACPI y # IDE ACPI support
+      BLK_DEV_INTEGRITY y
+      BSD_PROCESS_ACCT_V3 y
+      BT_HCIUART_BCSP y
+      BT_HCIUART_H4 y # UART (H4) protocol support
+      BT_HCIUART_LL y
+      BT_RFCOMM m
+      BT_RFCOMM_TTY y # RFCOMM TTY support
+      CRASH_DUMP n
+      DMAR? n # experimental
+      DVB_DYNAMIC_MINORS? y # we use udev
+      EFI_STUB y # EFI bootloader in the bzImage itself
+      FUSION y # Fusion MPT device support
+      IDE_GD_ATAPI y # ATAPI floppy support
+      IRDA_ULTRA y # Ultra (connectionless) protocol
+      JOYSTICK_IFORCE_232 y # I-Force Serial joysticks and wheels
+      JOYSTICK_IFORCE_USB y # I-Force USB joysticks and wheels
+      JOYSTICK_XPAD_FF y # X-Box gamepad rumble support
+      JOYSTICK_XPAD_LEDS y # LED Support for Xbox360 controller 'BigX' LED
+      LDM_PARTITION y # Windows Logical Disk Manager (Dynamic Disk) support
+      LEDS_TRIGGER_IDE_DISK y # LED IDE Disk Trigger
+      LOGIRUMBLEPAD2_FF y # Logitech Rumblepad 2 force feedback
+      LOGO n # not needed
+      MEDIA_ATTACH? y
+      MEGARAID_NEWGEN y
+      MICROCODE_AMD y
+      MODVERSIONS y
+      MOUSE_PS2_ELANTECH y # Elantech PS/2 protocol extension
+      MTRR_SANITIZER y
+      NET_FC y # Fibre Channel driver support
+      PPP_MULTILINK y # PPP multilink support
+      REGULATOR y # Voltage and Current Regulator Support
+      SCSI_LOGGING y # SCSI logging facility
+      SERIAL_8250 y # 8250/16550 and compatible serial support
+      SLIP_COMPRESSED y # CSLIP compressed headers
+      SLIP_SMART y
+      THERMAL_HWMON y # Hardware monitoring support
+      USB_DEBUG n
+      USB_EHCI_ROOT_HUB_TT y # Root Hub Transaction Translators
+      USB_EHCI_TT_NEWSCHED y # Improved transaction translator scheduling
+      X86_CHECK_BIOS_CORRUPTION y
+      X86_MCE y
+      XEN_DOM0 y
+
+      # Linux Containers
+      RT_GROUP_SCHED? y
+      CGROUP_DEVICE? y
+      CGROUP_MEM_RES_CTLR? y
+      CGROUP_MEM_RES_CTLR_SWAP? y
+      DEVPTS_MULTIPLE_INSTANCES? y
+
+      # Enable staging drivers.  These are somewhat experimental, but
+      # they generally don't hurt.
+      STAGING y
+
+      # PROC_EVENTS requires that the netlink connector is not built
+      # as a module.  This is required by libcgroup's cgrulesengd.
+      CONNECTOR y
+      PROC_EVENTS y
+
+      # Tracing
+      FTRACE y
+      FUNCTION_TRACER y
+      FTRACE_SYSCALLS y
+      SCHED_TRACER y
+
+      # Devtmpfs support.
+      DEVTMPFS y
+
+      # Media support
+      MEDIA_CAMERA_SUPPORT? y
+      MEDIA_RC_SUPPORT? y
+      MEDIA_USB_SUPPORT y
+
+      # Easier debug of NFS issues
+      SUNRPC_DEBUG y
+
+      ${if kernelPlatform ? kernelExtraConfig then kernelPlatform.kernelExtraConfig else ""}
+      ${extraConfig}
+    '';
+in
+
+import ./generic.nix (
+
+  rec {
+    version = "3.9-rc1";
+    modDirVersion = "3.9.0-rc1";
+    testing = true;
+
+    preConfigure = ''
+      substituteInPlace scripts/depmod.sh --replace '-b "$INSTALL_MOD_PATH"' ""
+    '';
+
+    src = fetchurl {
+      url = "mirror://kernel/linux/kernel/v3.x/${if testing then "testing/" else ""}linux-${version}.tar.xz";
+      sha256 = "1bm4fdk1v3dlhcqrzwzrf6fscvq7p7493f5ld5lbspaw8vb08690";
+    };
+
+    config = configWithPlatform stdenv.platform;
+    configCross = configWithPlatform stdenv.cross.platform;
+
+    features.iwlwifi = true;
+    features.efiBootStub = true;
+    features.needsCifsUtils = true;
+    features.canDisableNetfilterConntrackHelpers = true;
+    features.netfilterRPFilter = true;
+
+    extraNativeBuildInputs = [bc];
+  }
+
+  // removeAttrs args ["extraConfig"]
+)
diff --git a/pkgs/os-specific/linux/kernel/linux.upstream.template b/pkgs/os-specific/linux/kernel/linux.upstream.template
new file mode 100644
index 00000000000..624b83d45b3
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/linux.upstream.template
@@ -0,0 +1,13 @@
+url "http://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_VERSION_RC:+testing/}"
+version_link "linux-${LINUX_VERSION}.*tar[.]xz\$"
+version '.*linux-([0-9.]+(-rc[0-9]+)?)[.]tar.*' '\1'
+target "linux-${LINUX_VERSION}.nix"
+name "linux_${LINUX_VERSION/./_}"
+
+do_overwrite() {
+  ensure_hash
+  set_var_value version "$CURRENT_VERSION"
+  set_var_value sha256 "$CURRENT_HASH"
+  [ -n "$LINUX_VERSION_RC" ] && set_var_value testing true '' '' 1
+  [ -z "$LINUX_VERSION_RC" ] && set_var_value testing false '' '' 1
+}
diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix
index 5d84dee0a28..29eb170287a 100644
--- a/pkgs/os-specific/linux/kernel/manual-config.nix
+++ b/pkgs/os-specific/linux/kernel/manual-config.nix
@@ -1,4 +1,4 @@
-{ stdenv, runCommand, nettools, perl, kmod, writeTextFile }:
+{ stdenv, runCommand, nettools, bc, perl, kmod, writeTextFile }:
 
 with stdenv.lib;
 
@@ -75,16 +75,6 @@ let
     "INSTALL_PATH=$(out)"
   ] ++ (optional isModular "INSTALL_MOD_PATH=$(out)")
   ++ optional installsFirmware "INSTALL_FW_PATH=$(out)/lib/firmware";
-in
-
-stdenv.mkDerivation {
-  name = "linux-${version}";
-
-  enableParallelBuilding = true;
-
-  passthru = {
-    inherit version modDirVersion config kernelPatches src;
-  };
 
   sourceRoot = stdenv.mkDerivation {
     name = "linux-${version}-source";
@@ -108,21 +98,35 @@ stdenv.mkDerivation {
       mv $sourceRoot $out
     '';
   };
+in
+
+stdenv.mkDerivation {
+  name = "linux-${version}";
+
+  enableParallelBuilding = true;
+
+  outputs = if isModular then [ "out" "dev" ] else null;
+
+  passthru = {
+    inherit version modDirVersion config kernelPatches src;
+  };
+
+  inherit sourceRoot;
 
   unpackPhase = ''
     mkdir build
     export buildRoot="$(pwd)/build"
-    ln -sv ${configfile} $buildRoot/.config
-    cd $sourceRoot
+    cd ${sourceRoot}
   '';
 
   configurePhase = ''
     runHook preConfigure
+    ln -sv ${configfile} $buildRoot/.config
     make $makeFlags "''${makeFlagsArray[@]}" oldconfig
     runHook postConfigure
   '';
 
-  nativeBuildInputs = [ perl nettools ];
+  nativeBuildInputs = [ perl bc nettools ];
 
   makeFlags = commonMakeFlags ++ [
    "INSTALLKERNEL=${installkernel stdenv.platform.kernelTarget}"
@@ -140,17 +144,23 @@ stdenv.mkDerivation {
     make modules_install $makeFlags "''${makeFlagsArray[@]}" \
       $installFlags "''${installFlagsArray[@]}"
     rm -f $out/lib/modules/${modDirVersion}/build
-    mv $buildRoot $out/lib/modules/${modDirVersion}/build
+    mkdir -p $dev/lib/modules/${modDirVersion}
+    mv $out/lib/modules/${modDirVersion}/source $dev/lib/modules/${modDirVersion}/source
+    mv $buildRoot $dev/lib/modules/${modDirVersion}/build
   '' else optionalString installsFirmware ''
     make firmware_install $makeFlags "''${makeFlagsArray[@]}" \
       $installFlags "''${installFlagsArray[@]}"
   '');
 
-  postFixup = optionalString isModular ''
+  postFixup = if isModular then ''
     if [ -z "$dontStrip" ]; then
         find $out -name "*.ko" -print0 | xargs -0 -r strip -S
+        # Remove all references to the source directory to avoid unneeded
+        # runtime dependencies
+        find $out -name "*.ko" -print0 | xargs -0 -r sed -i \
+          "s|${sourceRoot}|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${sourceRoot.name}|g"
     fi
-  '';
+  '' else null;
 
   meta = {
     description = "The Linux kernel";
diff --git a/pkgs/os-specific/linux/libcap-ng/default.nix b/pkgs/os-specific/linux/libcap-ng/default.nix
new file mode 100644
index 00000000000..bbeb2851ea3
--- /dev/null
+++ b/pkgs/os-specific/linux/libcap-ng/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, python }:
+
+assert stdenv.isLinux;
+
+stdenv.mkDerivation rec {
+  name = "libcap-ng-${version}";
+  version = "0.7.3";
+
+  src = fetchurl {
+    url = "${meta.homepage}/${name}.tar.gz";
+    sha256 = "1cavlcrpqi4imkmagjhw65br8rv2fsbhf68mm3lczr51sg44392w";
+  };
+
+  buildInputs = [ python ]; # ToDo? optional swig for python bindings
+
+  meta = {
+    description = "Library for working with POSIX capabilities";
+    homepage = http://people.redhat.com/sgrubb/libcap-ng/;
+    platforms = stdenv.lib.platforms.linux;
+    license = "LGPLv2.1";
+  };
+}
diff --git a/pkgs/os-specific/linux/libselinux/default.nix b/pkgs/os-specific/linux/libselinux/default.nix
index 4be88a20e24..873065d5424 100644
--- a/pkgs/os-specific/linux/libselinux/default.nix
+++ b/pkgs/os-specific/linux/libselinux/default.nix
@@ -1,15 +1,34 @@
-{stdenv, fetchurl, libsepol}:
+{ stdenv, fetchurl, pkgconfig, libsepol, pcre }:
 
 stdenv.mkDerivation rec {
   name = "libselinux-${version}";
-  version = "2.0.98";
+  version = "2.1.12";
+  inherit (libsepol) se_release se_url;
 
   src = fetchurl {
-    url = "http://userspace.selinuxproject.org/releases/20101221/devel/${name}.tar.gz";
-    sha256 = "00irm7nyakgi4z8d6dlm6c70fkbl6rzk5w1w0ny2c564yw0d0dlz";
+    url = "${se_url}/${se_release}/libselinux-${version}.tar.gz";
+    sha256 = "17navgvljgq35bljzcdwjdj3khajc27s15binr51xkp0h29qgbcd";
   };
 
-  buildInputs = [ libsepol ];
+  patch_src = fetchurl {
+    url = "http://dev.gentoo.org/~swift/patches/libselinux/patchbundle-${name}-r2.tar.gz";
+    sha256 = "08zaas8iwyf4w9ll1ylyv4gril1nfarckd5h1l53563sxzyf7dqh";
+  };
+
+  patches = [ ./fPIC.patch ]; # libsemanage seems to need -fPIC everywhere
+
+  buildInputs = [ pkgconfig libsepol pcre ];
 
-  preBuild = '' makeFlags="$makeFlags PREFIX=$out DESTDIR=$out" '';
+  prePatch = ''
+    tar xvf ${patch_src}
+    for p in gentoo-patches/*.patch; do
+      patch -p1 < "$p"
+    done
+  '';
+
+  preInstall = '' makeFlags="$makeFlags PREFIX=$out DESTDIR=$out" '';
+
+  meta = {
+    inherit (libsepol.meta) homepage platforms maintainers;
+  };
 }
diff --git a/pkgs/os-specific/linux/libselinux/fPIC.patch b/pkgs/os-specific/linux/libselinux/fPIC.patch
new file mode 100644
index 00000000000..fdc1fa41a33
--- /dev/null
+++ b/pkgs/os-specific/linux/libselinux/fPIC.patch
@@ -0,0 +1,13 @@
+diff --git a/src/Makefile b/src/Makefile
+index ac019df..00432b9 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -132,7 +132,7 @@ $(AUDIT2WHYSO): $(AUDIT2WHYLOBJ)
+ 	$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux $(LIBDIR)/libsepol.a -L$(LIBDIR)
+ 
+ %.o:  %.c policy.h
+-	$(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
++	$(CC) $(CFLAGS) $(TLSFLAGS) -fPIC -c -o $@ $<
+ 
+ %.lo:  %.c policy.h
+ 	$(CC) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
diff --git a/pkgs/os-specific/linux/libsemanage/default.nix b/pkgs/os-specific/linux/libsemanage/default.nix
index 22e177191a5..28908189cf3 100644
--- a/pkgs/os-specific/linux/libsemanage/default.nix
+++ b/pkgs/os-specific/linux/libsemanage/default.nix
@@ -2,24 +2,24 @@
 stdenv.mkDerivation rec {
 
   name = "libsemanage-${version}";
-  version = "2.0.46";
+  version = "2.1.9";
+  inherit (libsepol) se_release se_url;
 
   src = fetchurl {
-    url = "http://userspace.selinuxproject.org/releases/20101221/devel/${name}.tar.gz";
-    sha256 = "03ljdw48pn8vlk4h26w8z247c9wykp2198s1ksmxrai3avyz87wf";
+    url = "${se_url}/${se_release}/libsemanage-${version}.tar.gz";
+    sha256 = "1k1my3n1pj30c5887spykcdk1brgxfpxmrz6frxjyhaijxzx20bg";
   };
 
-  NIX_LDFLAGS = "-lsepol";
-
   makeFlags = "PREFIX=$(out) DESTDIR=$(out)";
 
+  NIX_CFLAGS_COMPILE = "-fstack-protector-all";
+  NIX_CFLAGS_LINK = "-lsepol";
+
   buildInputs = [ libsepol libselinux ustr bzip2 bison flex ];
 
   meta = with stdenv.lib; {
-    homepage = http://userspace.selinuxproject.org/;
+    inherit (libsepol.meta) homepage platforms maintainers;
     description = "Policy management tools for SELinux";
     license = licenses.lgpl21;
-    maintainers = [ maintainers.phreedom ];
-    platforms = platforms.linux;
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/os-specific/linux/libsepol/default.nix b/pkgs/os-specific/linux/libsepol/default.nix
index 1751994e3de..d41d1cbe752 100644
--- a/pkgs/os-specific/linux/libsepol/default.nix
+++ b/pkgs/os-specific/linux/libsepol/default.nix
@@ -1,13 +1,24 @@
-{stdenv, fetchurl}:
+{ stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
   name = "libsepol-${version}";
-  version = "2.0.42";
+  version = "2.1.8";
+  se_release = "20120924";
+  se_url = "${meta.homepage}/releases";
 
   src = fetchurl {
-    url = "http://userspace.selinuxproject.org/releases/20101221/devel/${name}.tar.gz";
-    sha256 = "0sg61mb9qhyh4vplasar6nwd6j123v453zss93qws3h95fhrfc08";
+    url = "${se_url}/${se_release}/libsepol-${version}.tar.gz";
+    sha256 = "1w38q3lmha5m9aps9w844i51yw4b8q1vhpng2kdywn2n8cpdvvk3";
   };
 
   preBuild = '' makeFlags="$makeFlags PREFIX=$out DESTDIR=$out" '';
+
+  passthru = { inherit se_release se_url meta; };
+
+  meta = with stdenv.lib; {
+    homepage = http://userspace.selinuxproject.org;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.phreedom ];
+    license = "GPLv2";
+  };
 }
diff --git a/pkgs/os-specific/linux/policycoreutils/default.nix b/pkgs/os-specific/linux/policycoreutils/default.nix
index b75405b4272..e49525a42bf 100644
--- a/pkgs/os-specific/linux/policycoreutils/default.nix
+++ b/pkgs/os-specific/linux/policycoreutils/default.nix
@@ -1,25 +1,39 @@
-{ stdenv, fetchurl, libsepol, libselinux }:
+{ stdenv, fetchurl, intltool, pcre, libcap_ng, libcgroup
+, libsepol, libselinux, libsemanage
+, python, sepolgen }:
 stdenv.mkDerivation rec {
 
   name = "policycoreutils-${version}";
-  version = "2.0.85";
+  version = "2.1.13";
+  inherit (libsepol) se_release se_url;
 
   src = fetchurl {
-    url = http://userspace.selinuxproject.org/releases/20101221/devel/policycoreutils-2.0.85.tar.gz;
-    sha256 = "01q5ifacg24k9jdz85j9m17ps2l1p7abvh8pzy6qz55y68rycifb";
+    url = "${se_url}/${se_release}/policycoreutils-${version}.tar.gz";
+    sha256 = "1145nbpwndmhma08vvj1j75bjd8xhjal0vjpazlrw78iyc30y11l";
   };
 
-  buildInputs = [ libsepol libselinux ];
+  patchPhase = ''
+    substituteInPlace po/Makefile --replace /usr/bin/install install
+  '';
 
-  NIX_LDFLAGS = "-lsepol";
+  buildInputs = [ intltool pcre libcap_ng libcgroup
+    libsepol libselinux  libsemanage
+    python sepolgen # ToDo? these are optional
+  ];
 
-  makeFlags = "LOCALEDIR=$(out)/share/locale";
+  preBuild = ''
+    mkdir -p "$out/lib" && cp -s "${libsepol}/lib/libsepol.a" "$out/lib"
+  '';
+
+  NIX_CFLAGS_COMPILE = "-fstack-protector-all";
+  NIX_LDFLAGS = "-lsepol -lpcre";
+
+  makeFlags = "PREFIX=$(out) DESTDIR=$(out) LOCALEDIR=$(out)/share/locale";
 
   meta = with stdenv.lib; {
-    homepage = http://userspace.selinuxproject.org/;
     description = "SELinux policy core utilities";
     license = licenses.gpl2;
-    maintainers = [ maintainers.phreedom ];
-    platforms = platforms.linux;
+    inherit (libsepol.meta) homepage platforms maintainers;
   };
-}
\ No newline at end of file
+}
+
diff --git a/pkgs/os-specific/linux/qemu-kvm/default.nix b/pkgs/os-specific/linux/qemu-kvm/default.nix
index a26ea540808..6c2c8d57fc5 100644
--- a/pkgs/os-specific/linux/qemu-kvm/default.nix
+++ b/pkgs/os-specific/linux/qemu-kvm/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, attr, zlib, SDL, alsaLib, pkgconfig, pciutils, libuuid, vde2
-, libjpeg, libpng, ncurses, python, glib, libaio, mesa
+, libjpeg, libpng, ncurses, python, glib, libaio, mesa, perl, texinfo
 , spice, spice_protocol, spiceSupport ? false }:
 
 assert stdenv.isLinux;
@@ -14,19 +14,16 @@ stdenv.mkDerivation rec {
     sha256 = "018vb5nmk2fsm143bs2bl2wirhasd4b10d7jchl32zik4inbk2p9";
   };
 
+  buildInputs =
+    [ attr zlib SDL alsaLib pkgconfig pciutils libuuid vde2 libjpeg libpng
+      ncurses python glib libaio mesa texinfo perl
+    ] ++ stdenv.lib.optionals spiceSupport [ spice_protocol spice ];
+
   patches = [ ./fix-librt-check.patch ];
 
-  postPatch =
-    '' for i in $(find . -type f)
-       do
-         sed -i "$i" \
-             -e 's|/bin/bash|/bin/sh|g ;
-                 s|/usr/bin/python|${python}/bin/python|g ;
-                 s|/bin/rm|rm|g'
-       done
-    '' + stdenv.lib.optionalString spiceSupport ''
-       for i in configure spice-qemu-char.c ui/spice-input.c ui/spice-core.c ui/qemu-spice.h
-       do
+  postPatch = "patchShebangs .;"
+    + stdenv.lib.optionalString spiceSupport ''
+       for i in configure spice-qemu-char.c ui/spice-input.c ui/spice-core.c ui/qemu-spice.h; do
          substituteInPlace $i --replace '#include <spice.h>' '#include <spice/spice.h>'
        done
     '';
@@ -34,15 +31,10 @@ stdenv.mkDerivation rec {
   configureFlags =
     [ "--audio-drv-list=alsa"
       "--smbd=smbd"                               # use `smbd' from $PATH
+      "--enable-docs"
+      "--python=${python}/bin/python"
     ] ++ stdenv.lib.optional spiceSupport "--enable-spice";
 
-  enableParallelBuilding = true;
-
-  buildInputs =
-    [ attr zlib SDL alsaLib pkgconfig pciutils libuuid vde2 libjpeg libpng
-      ncurses python glib libaio mesa
-    ] ++ stdenv.lib.optionals spiceSupport [ spice_protocol spice ];
-
   postInstall =
     ''
       # Libvirt expects us to be called `qemu-kvm'.  Otherwise it will
@@ -51,6 +43,10 @@ stdenv.mkDerivation rec {
       ln -sv $(cd $out/bin && echo qemu-system-*) $out/bin/qemu-kvm
     '';
 
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
   meta = {
     homepage = http://www.linux-kvm.org/;
     description = "A full virtualization solution for Linux on x86 hardware containing virtualization extensions";
diff --git a/pkgs/os-specific/linux/sepolgen/default.nix b/pkgs/os-specific/linux/sepolgen/default.nix
new file mode 100644
index 00000000000..7139ec98c28
--- /dev/null
+++ b/pkgs/os-specific/linux/sepolgen/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, libsepol, python }:
+
+stdenv.mkDerivation rec {
+  name = "sepolgen-${version}";
+  version = "1.1.8";
+  inherit (libsepol) se_release se_url;
+
+  src = fetchurl {
+    url = "${se_url}/${se_release}/sepolgen-${version}.tar.gz";
+    sha256 = "1sssc9d4wz7l23yczlzplsmdr891sqr9w34ccn1bfwlnc4q63xdm";
+  };
+
+  makeFlags = "PREFIX=$(out) DESTDIR=$(out) PYTHONLIBDIR=lib/${python.libPrefix}/site-packages";
+
+  buildInputs = [ python ];
+
+  meta = with stdenv.lib; {
+    inherit (libsepol.meta) homepage platforms maintainers;
+    description = "SELinux policy generation library";
+    license = licenses.gpl2;
+  };
+}
diff --git a/pkgs/os-specific/linux/xf86-input-wacom/default.nix b/pkgs/os-specific/linux/xf86-input-wacom/default.nix
index e043b12e820..63e4fb1ca73 100644
--- a/pkgs/os-specific/linux/xf86-input-wacom/default.nix
+++ b/pkgs/os-specific/linux/xf86-input-wacom/default.nix
@@ -3,11 +3,11 @@
 , ncurses, pkgconfig, randrproto, xorgserver, xproto, udev, libXinerama, pixman }:
 
 stdenv.mkDerivation rec {
-  name = "xf86-input-wacom-0.16.0";
+  name = "xf86-input-wacom-0.19.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/linuxwacom/${name}.tar.bz2";
-    sha256 = "0sc0hmbs3l3ad68iwglbwjv9lg1vd333n1lv72j4nqmk7g57yrii";
+    sha256 = "1lkvhirjysx0d2154jrwqc2i8jrqdjrlzjv7grbnm2cg5vpg7n53";
   };
 
   buildInputs = [ inputproto libX11 libXext libXi libXrandr libXrender
diff --git a/pkgs/os-specific/linux/xf86-video-nested/default.nix b/pkgs/os-specific/linux/xf86-video-nested/default.nix
index b3cad227d27..0d0639390a7 100644
--- a/pkgs/os-specific/linux/xf86-video-nested/default.nix
+++ b/pkgs/os-specific/linux/xf86-video-nested/default.nix
@@ -23,8 +23,8 @@ stdenv.mkDerivation {
   '';
 
   meta = {
-    homepage = git://anongit.freedesktop.org/xorg/driver/xf86-video-nested;
-    description = "Driver to run Xorg on top of Xorg or something else";
+    homepage = http://cgit.freedesktop.org/xorg/driver/xf86-video-nested;
+    description = "A driver to run Xorg on top of Xorg or something else";
     maintainers = [ stdenv.lib.maintainers.goibhniu ];
     platforms = stdenv.lib.platforms.linux;
   };
diff --git a/pkgs/servers/amqp/rabbitmq-server/default.nix b/pkgs/servers/amqp/rabbitmq-server/default.nix
index 45ccfc22de7..043c69d5cc0 100644
--- a/pkgs/servers/amqp/rabbitmq-server/default.nix
+++ b/pkgs/servers/amqp/rabbitmq-server/default.nix
@@ -2,12 +2,11 @@
 , docbook_xml_dtd_45, docbook_xsl, zip, unzip }:
 
 stdenv.mkDerivation rec {
-  version = "3.0.2";
-  name = "rabbitmq-server-${version}";
+  name = "rabbitmq-server-3.0.3";
 
   src = fetchurl {
-    url = "http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/${name}.tar.gz";
-    sha256 = "1xcqv8jmpj768rl3219ksmpsm64imys7h9f3phvmpjfqdw6lnr9x";
+    url = "http://www.rabbitmq.com/releases/rabbitmq-server/v3.0.3/${name}.tar.gz";
+    sha256 = "07mp57xvszdrlgw8rgn9r9dpa6vdqdjk7f1dyh6a9sdg8s9fby38";
   };
 
   buildInputs =
diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix
index 507ced85998..da353212657 100644
--- a/pkgs/servers/http/apache-httpd/2.4.nix
+++ b/pkgs/servers/http/apache-httpd/2.4.nix
@@ -14,12 +14,12 @@ assert sslSupport -> aprutil.sslSupport && openssl != null;
 assert ldapSupport -> aprutil.ldapSupport && openldap != null;
 
 stdenv.mkDerivation rec {
-  version = "2.4.3";
+  version = "2.4.4";
   name = "apache-httpd-${version}";
 
   src = fetchurl {
     url = "mirror://apache/httpd/httpd-${version}.tar.bz2";
-    sha256 = "17i4zdcjfvxks0p1fbqvab37kr8d6zscqaqan8pqkw8iq6wh48fq";
+    sha256 = "0p35jy6mkb1q48bia719qxs5bwxv0wadyhxi61rsr93nrbgbvalj";
   };
 
   buildInputs = [perl] ++
diff --git a/pkgs/servers/search/elasticsearch/default.nix b/pkgs/servers/search/elasticsearch/default.nix
new file mode 100644
index 00000000000..9afbc62ce8c
--- /dev/null
+++ b/pkgs/servers/search/elasticsearch/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl }:
+stdenv.mkDerivation rec {
+  name = "elasticsearch-0.20.5";
+
+  src = fetchurl {
+    url = "https://download.elasticsearch.org/elasticsearch/elasticsearch/${name}.tar.gz";
+    sha256 = "0r0h9znyflajps1k8hl9naixhg1gqmhz7glc009pzzv94ncdzrq1";
+  };
+
+  patches = [ ./es-home.patch ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -R bin config lib $out
+  '';
+
+  meta = {
+    description = "Open Source, Distributed, RESTful Search Engine";
+    license = "ASL2.0";
+  };
+}
diff --git a/pkgs/servers/search/elasticsearch/es-home.patch b/pkgs/servers/search/elasticsearch/es-home.patch
new file mode 100644
index 00000000000..f9e460198a9
--- /dev/null
+++ b/pkgs/servers/search/elasticsearch/es-home.patch
@@ -0,0 +1,20 @@
+diff -rc elasticsearch-0.20.5/bin/elasticsearch elasticsearch-0.20.5-new/bin/elasticsearch
+*** elasticsearch-0.20.5/bin/elasticsearch	2013-03-07 12:16:31.152494626 +0100
+--- elasticsearch-0.20.5-new/bin/elasticsearch	2013-03-07 12:24:41.076081272 +0100
+***************
+*** 62,68 ****
+  done
+  
+  # determine elasticsearch home
+! ES_HOME=`dirname "$SCRIPT"`/..
+  
+  # make ELASTICSEARCH_HOME absolute
+  ES_HOME=`cd "$ES_HOME"; pwd`
+--- 62,68 ----
+  done
+  
+  # determine elasticsearch home
+! ES_HOME=${ES_HOME:=`dirname "$SCRIPT"`/..}
+  
+  # make ELASTICSEARCH_HOME absolute
+  ES_HOME=`cd "$ES_HOME"; pwd`
diff --git a/pkgs/servers/sql/oracle-xe/default.nix b/pkgs/servers/sql/oracle-xe/default.nix
new file mode 100644
index 00000000000..940e57ab8fb
--- /dev/null
+++ b/pkgs/servers/sql/oracle-xe/default.nix
@@ -0,0 +1,83 @@
+{ stdenv, makeWrapper, requireFile, patchelf, rpm, cpio, libaio }:
+
+assert stdenv.system == "x86_64-linux";
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "oracle-xe-${version}";
+  version = "11.2.0";
+
+  src = requireFile {
+    name = "${name}-1.0.x86_64.rpm";
+    sha256 = "0s2jj2xn56v5ys6hxb7l7045hw9c1mm1lhj4p2fvqbs02kqchab6";
+
+    url = "http://www.oracle.com/technetwork/"
+        + "products/express-edition/downloads/";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  unpackCmd = ''
+    (mkdir -p "${name}" && cd "${name}" &&
+      ${rpm}/bin/rpm2cpio "$curSrc" | ${cpio}/bin/cpio -id)
+  '';
+
+  buildPhase = let
+    libs = makeLibraryPath [ libaio ];
+  in ''
+    basedir="u01/app/oracle/product/${version}/xe"
+    cat > "$basedir/network/admin/listener.ora" <<SQL
+    # listener.ora Network Configuration File:
+
+    SID_LIST_LISTENER =
+      (SID_LIST =
+        (SID_DESC =
+          (SID_NAME = PLSExtProc)
+          (ORACLE_HOME = ''${out}/libexec/oracle)
+          (PROGRAM = extproc)
+        )
+      )
+
+    LISTENER =
+      (DESCRIPTION_LIST =
+        (DESCRIPTION =
+          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
+          (ADDRESS = (PROTOCOL = TCP)(HOST = %hostname%)(PORT = %port%))
+        )
+      )
+
+    DEFAULT_SERVICE_LISTENER = (XE)
+    SQL
+
+    find u01 \
+      \( -name '*.sh' \
+      -o -path "$basedir/bin/*" \
+      \) -print -exec "${patchelf}/bin/patchelf" \
+           --interpreter "$(cat "$NIX_GCC/nix-support/dynamic-linker")" \
+           --set-rpath "${libs}:$out/libexec/oracle/lib" \
+           --force-rpath '{}' \;
+  '';
+
+  dontStrip = true;
+  dontPatchELF = true;
+
+  installPhase = ''
+    mkdir -p "$out/libexec"
+    cp -r "u01/app/oracle/product/${version}/xe" "$out/libexec/oracle"
+
+    for i in "$out/libexec/oracle/bin"/*; do
+      makeWrapper "$i" "$out/bin/''${i##*/}" \
+        --set ORACLE_HOME "$out/libexec/oracle" \
+        --set ORACLE_SID XE \
+        --set NLS_LANG '$("'"$out"'/libexec/oracle/bin/nls_lang.sh")' \
+        --prefix PATH : "$out/libexec/oracle/bin"
+    done
+  '';
+
+  meta = {
+    description = "Oracle Database Express Edition";
+    homepage = "http://www.oracle.com/technetwork/products/express-edition/";
+    license = licenses.proprietary;
+  };
+}
diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix
index 23600b0e014..dc8eb85fa7b 100644
--- a/pkgs/servers/x11/xorg/default.nix
+++ b/pkgs/servers/x11/xorg/default.nix
@@ -1518,11 +1518,11 @@ let
   })) // {inherit fontsproto libpciaccess randrproto renderproto videoproto xextproto xorgserver xproto ;};
     
   xf86videointel = (stdenv.mkDerivation ((if overrides ? xf86videointel then overrides.xf86videointel else x: x) {
-    name = "xf86-video-intel-2.20.10";
+    name = "xf86-video-intel-2.20.19";
     builder = ./builder.sh;
     src = fetchurl {
-      url = mirror://xorg/individual/driver/xf86-video-intel-2.20.10.tar.bz2;
-      sha256 = "1kfd6qiqxyqhjp8g1xcipkldsf7xa47q8zfdhxg3qzw77n6a4hfz";
+      url = mirror://xorg/individual/driver/xf86-video-intel-2.20.19.tar.bz2;
+      sha256 = "0k67vcf0aqhv9zmy1arxyjdl7fsrg90cjm0ryyhamghq67z0xcmr";
     };
     buildInputs = [pkgconfig dri2proto fontsproto libdrm udev libpciaccess pixman randrproto renderproto libX11 xcbutil libxcb libXext xextproto xf86driproto libXfixes xorgserver xproto libXrender libXvMC ];
   })) // {inherit dri2proto fontsproto libdrm udev libpciaccess pixman randrproto renderproto libX11 xcbutil libxcb libXext xextproto xf86driproto libXfixes xorgserver xproto libXrender libXvMC ;};
diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix
index cf8c4737471..cba6a6d0cf4 100644
--- a/pkgs/servers/x11/xorg/overrides.nix
+++ b/pkgs/servers/x11/xorg/overrides.nix
@@ -192,6 +192,11 @@ in
     buildInputs = attrs.buildInputs ++ [xorg.pixman];
   };
 
+  xf86videovmware = attrs: attrs // {
+    NIX_CFLAGS_COMPILE = "-I${xorg.pixman}/include/pixman-1";
+    buildInputs = attrs.buildInputs ++ [xorg.pixman xorg.glproto args.mesa];
+  };
+
   xdriinfo = attrs: attrs // {
     buildInputs = attrs.buildInputs ++ [xorg.glproto args.mesa];
   };
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index 843bf580b6a..eb5b6c014b2 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -6,6 +6,12 @@
   fetchurlBoot
 }:
 
+if ! builtins ? langVersion then
+
+  abort "This version of Nixpkgs requires Nix >= 1.2, please upgrade!"
+
+else
+
 let
 
   lib = import ../../lib;
@@ -30,6 +36,8 @@ let
 
         propagatedUserEnvPkgs = [gcc] ++
           lib.filter lib.isDerivation initialPath;
+
+        __ignoreNulls = true;
       }
 
       // rec {
@@ -44,43 +52,59 @@ let
           if !allowUnfree && (let l = attrs.meta.license or ""; in l == "unfree" || l == "unfree-redistributable" || l == lib.licenses.proprietary) then
             throw "package ‘${attrs.name}’ has an unfree license, refusing to evaluate"
           else
-          (derivation (
-            (removeAttrs attrs ["meta" "passthru" "crossAttrs"])
-            // (let
-              buildInputs = attrs.buildInputs or [];
-              nativeBuildInputs = attrs.nativeBuildInputs or [];
-              propagatedBuildInputs = attrs.propagatedBuildInputs or [];
-              propagatedNativeBuildInputs = attrs.propagatedNativeBuildInputs or [];
-              crossConfig = attrs.crossConfig or null;
-            in
-            {
-              builder = attrs.realBuilder or shell;
-              args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
-              stdenv = result;
-              system = result.system;
-              userHook = config.stdenv.userHook or null;
-
-              # Inputs built by the cross compiler.
-              buildInputs = lib.optionals (crossConfig != null) buildInputs;
-              propagatedBuildInputs = lib.optionals (crossConfig != null)
-                  propagatedBuildInputs;
-              # Inputs built by the usual native compiler.
-              nativeBuildInputs = nativeBuildInputs ++ lib.optionals
-                (crossConfig == null) buildInputs;
-              propagatedNativeBuildInputs = propagatedNativeBuildInputs ++
-                lib.optionals (crossConfig == null) propagatedBuildInputs;
-            }))
-          )
-          # The meta attribute is passed in the resulting attribute set,
-          # but it's not part of the actual derivation, i.e., it's not
-          # passed to the builder and is not a dependency.  But since we
-          # include it in the result, it *is* available to nix-env for
-          # queries.
-          // { meta = attrs.meta or {}; }
-          # Pass through extra attributes that are not inputs, but
-          # should be made available to Nix expressions using the
-          # derivation (e.g., in assertions).
-          // (attrs.passthru or {});
+            let
+              drv = derivation (
+                (removeAttrs attrs ["meta" "passthru" "crossAttrs"])
+                // (let
+                  buildInputs = attrs.buildInputs or [];
+                  nativeBuildInputs = attrs.nativeBuildInputs or [];
+                  propagatedBuildInputs = attrs.propagatedBuildInputs or [];
+                  propagatedNativeBuildInputs = attrs.propagatedNativeBuildInputs or [];
+                  crossConfig = attrs.crossConfig or null;
+                in
+                {
+                  builder = attrs.realBuilder or shell;
+                  args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
+                  stdenv = result;
+                  system = result.system;
+                  userHook = config.stdenv.userHook or null;
+
+                  # Inputs built by the cross compiler.
+                  buildInputs = lib.optionals (crossConfig != null) buildInputs;
+                  propagatedBuildInputs = lib.optionals (crossConfig != null)
+                      propagatedBuildInputs;
+                  # Inputs built by the usual native compiler.
+                  nativeBuildInputs = nativeBuildInputs ++ lib.optionals
+                    (crossConfig == null) buildInputs;
+                  propagatedNativeBuildInputs = propagatedNativeBuildInputs ++
+                    lib.optionals (crossConfig == null) propagatedBuildInputs;
+              }));
+
+              outputs = drv.outputs or [ "out" ];
+
+              commonAttrs = drv // (builtins.listToAttrs outputsList) //
+                ({ all = map (x: x.value) outputsList;
+                  # The meta attribute is passed in the resulting attribute set,
+                  # but it's not part of the actual derivation, i.e., it's not
+                  # passed to the builder and is not a dependency.  But since we
+                  # include it in the result, it *is* available to nix-env for
+                  # queries.
+                  meta = attrs.meta or {};
+                }) //
+                # Pass through extra attributes that are not inputs, but
+                # should be made available to Nix expressions using the
+                # derivation (e.g., in assertions).
+                (attrs.passthru or {});
+
+              outputToAttrListElement = outputName:
+                { name = outputName;
+                  value = commonAttrs // {
+                    inherit (builtins.getAttr outputName drv) outPath drvPath type outputName;
+                  };
+                };
+
+              outputsList = map outputToAttrListElement outputs;
+            in (builtins.head outputsList).value;
 
         # Utility flags to test the type of platform.
         isDarwin = result.system == "x86_64-darwin";
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index 84af23a263c..3e71ac46739 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -17,7 +17,7 @@ rec {
     else if system == "powerpc-linux" then import ./bootstrap/powerpc
     else if system == "armv5tel-linux" then import ./bootstrap/armv5tel
     else if system == "armv6l-linux" then import ./bootstrap/armv6l
-    else if system == "armv7l-linux" then import ./bootstrap/armv5tel
+    else if system == "armv7l-linux" then import ./bootstrap/armv6l
     else if system == "mips64el-linux" then import ./bootstrap/loongson2f
     else abort "unsupported platform for the pure Linux stdenv";
 
@@ -58,7 +58,8 @@ rec {
     builder = bootstrapFiles.sh;
 
     args =
-      if (system == "armv5tel-linux" || system == "armv6l-linux")
+      if system == "armv5tel-linux" || system == "armv6l-linux" 
+        || system == "armv7l-linux"
       then [ ./scripts/unpack-bootstrap-tools-arm.sh ]
       else [ ./scripts/unpack-bootstrap-tools.sh ];
 
@@ -215,6 +216,9 @@ rec {
       cloog = pkgs.cloog.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
       ppl = pkgs.ppl.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
     };
+    extraAttrs = {
+      glibc = stdenvLinuxGlibc;   # Required by gcc47 build
+    };
     inherit fetchurl;
   };
 
diff --git a/pkgs/tools/X11/virtualgl/default.nix b/pkgs/tools/X11/virtualgl/default.nix
index 57df08c1e2b..3ae0920b9a7 100644
--- a/pkgs/tools/X11/virtualgl/default.nix
+++ b/pkgs/tools/X11/virtualgl/default.nix
@@ -2,19 +2,19 @@
 , libjpeg_turbo, cmake }:
 
 let
-  libDir = if stdenv.is64bit then "lib64" else "lib";
+  version = "2.3.2";
 in
 stdenv.mkDerivation {
-  name = "virtualgl-2.1.4";
+  name = "virtualgl-${version}";
   src = fetchurl {
-    url = mirror://sourceforge/virtualgl/VirtualGL-2.3.tar.gz;
-    sha256 = "2f00c4eb20b0ae88e957a23fb66882e4ade2faa208abd30aa8c4f61570ecd4b9";
+    url = "mirror://sourceforge/virtualgl/VirtualGL-${version}.tar.gz";
+    sha256 = "062lrhd8yr13ch4wpgzxdabqs92j4q7fcl3a0c3sdlav4arspqmy";
   };
 
   patches = [ ./xshm.patch ./fixturbopath.patch ];
 
   prePatch = ''
-    sed -i s,LD_PRELOAD=lib,LD_PRELOAD=$out/${libDir}/lib, rr/vglrun
+    sed -i s,LD_PRELOAD=lib,LD_PRELOAD=$out/lib/lib, server/vglrun
   '';
 
   cmakeFlags = [ "-DTJPEG_LIBRARY=${libjpeg_turbo}/lib/libturbojpeg.so" ];
diff --git a/pkgs/tools/X11/xchainkeys/default.nix b/pkgs/tools/X11/xchainkeys/default.nix
new file mode 100644
index 00000000000..42e26825e33
--- /dev/null
+++ b/pkgs/tools/X11/xchainkeys/default.nix
@@ -0,0 +1,18 @@
+{ stdenv, fetchurl, libX11 }:
+
+stdenv.mkDerivation rec {
+  name = "xchainkeys-0.11";
+
+  src = fetchurl {
+    url = "https://xchainkeys.googlecode.com/files/${name}.tar.gz";
+    sha256 = "1rpqs7h5krral08vqxwb0imy33z17v5llvrg5hy8hkl2ap7ya0mn";
+  };
+
+  buildInputs = [ libX11 ];
+
+  meta = {
+    homepage = "https://code.google.com/p/xchainkeys/";
+    description = "A standalone X11 program to create chained key bindings";
+    license = "GPLv3";
+  };
+}
diff --git a/pkgs/tools/archivers/zpaq/default.nix b/pkgs/tools/archivers/zpaq/default.nix
new file mode 100644
index 00000000000..2188668d3bf
--- /dev/null
+++ b/pkgs/tools/archivers/zpaq/default.nix
@@ -0,0 +1,51 @@
+{stdenv, fetchurl, unzip}:
+let
+  s = # Generated upstream information
+  rec {
+    baseName="zpaq";
+    version="622";
+    name="${baseName}-${version}";
+    hash="19avac9spq5kgcgbixd9kvjhy9j0ga75izwqhif44h3jlzdydsmc";
+    url="http://mattmahoney.net/dc/zpaq622.zip";
+    sha256="19avac9spq5kgcgbixd9kvjhy9j0ga75izwqhif44h3jlzdydsmc";
+  };
+  buildInputs = [
+    unzip
+  ];
+  isUnix = stdenv.isLinux || stdenv.isGNU || stdenv.isDarwin || stdenv.isBSD;
+  isx86 = stdenv.isi686 || stdenv.isx86_64;
+  compileFlags = ""
+    + (stdenv.lib.optionalString isUnix " -Dunix -pthread ")
+    + (stdenv.lib.optionalString (!isx86) " -DNOJIT ")
+    + " -DNDEBUG "
+    + " -fPIC "
+    ;
+in
+stdenv.mkDerivation {
+  inherit (s) name version;
+  inherit buildInputs;
+  src = fetchurl {
+    inherit (s) url sha256;
+  };
+  sourceRoot = ".";
+  buildPhase = ''
+    g++ -shared -O3 libzpaq.cpp divsufsort.c ${compileFlags} -o libzpaq.so
+    g++ -O3 -L. -L"$out/lib" -lzpaq zpaq.cpp -o zpaq
+    g++ -O3 -L. -L"$out/lib" -lzpaq zpaqd.cpp -o zpaqd
+  '';
+  installPhase = ''
+    mkdir -p "$out"/{bin,include,lib,share/doc/zpaq}
+    cp libzpaq.so "$out/lib"
+    cp zpaq zpaqd "$out/bin"
+    cp libzpaq.h divsufsort.h "$out/include"
+    cp readme.txt "$out/share/doc/zpaq"
+  '';
+  meta = {
+    inherit (s) version;
+    description = ''An archiver with backward compatibility of versions for decompression'';
+    license = stdenv.lib.licenses.gpl3Plus ;
+    maintainers = [stdenv.lib.maintainers.raskin];
+    platforms = stdenv.lib.platforms.linux;
+    homepage = "http://mattmahoney.net/dc/zpaq.html";
+  };
+}
diff --git a/pkgs/tools/archivers/zpaq/default.upstream b/pkgs/tools/archivers/zpaq/default.upstream
new file mode 100644
index 00000000000..2d62f834647
--- /dev/null
+++ b/pkgs/tools/archivers/zpaq/default.upstream
@@ -0,0 +1,3 @@
+url http://mattmahoney.net/dc/zpaq.html
+version_link "/zpaq[0-9]+[.]zip"
+version "[^0-9]*([0-9]+)[^0-9]*" '\1'
diff --git a/pkgs/tools/bluetooth/kbluetooth/default.nix b/pkgs/tools/bluetooth/kbluetooth/default.nix
index 047b4f822ae..81916cb3982 100644
--- a/pkgs/tools/bluetooth/kbluetooth/default.nix
+++ b/pkgs/tools/bluetooth/kbluetooth/default.nix
@@ -24,7 +24,7 @@ mkDerivation rec {
   meta = with stdenv.lib; {
     description = "Bluetooth manager for KDE";
     license = "GPLv2";
-    inherit (kdelibs.meta) platforms;
+    #inherit (kdelibs.meta) platforms; # doesn't build and seems to be dead
     maintainers = [ maintainers.phreedom ];
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/tools/compression/lrzip/default.nix b/pkgs/tools/compression/lrzip/default.nix
index 35df411fd0f..23b516e32e4 100644
--- a/pkgs/tools/compression/lrzip/default.nix
+++ b/pkgs/tools/compression/lrzip/default.nix
@@ -1,26 +1,20 @@
 {stdenv, fetchurl, zlib, lzo, bzip2, nasm, perl}:
 
-let
-  md5fix = fetchurl {
-    url = "https://github.com/ckolivas/lrzip/commit/9430b6ff4a58adb69ef4cf74f1245fd5b3b313dd.patch";
-    sha256 = "084x4wi3mamcxphzwf43iw287v1ylrk0xjghg6b5k6vgm9gkqlx8";
-  };
-in
 stdenv.mkDerivation rec {
-  name = "lrzip-0.612";
+  version = "0.614";
+  name = "lrzip-${version}";
 
   src = fetchurl {
     url = "http://ck.kolivas.org/apps/lrzip/${name}.tar.bz2";
-    sha256 = "15rfqpc4xj7wbv117mr2g9npxnrlmqqj97mhxqfpy8360ys9yc1c";
+    sha256 = "16i6mz2z6gx8xiva7zb0j78yvkwq1bjbdkl7w3i10195ll097ad8";
   };
 
   buildInputs = [ zlib lzo bzip2 nasm perl ];
 
-  patches = [ md5fix ];
-
   meta = {
     homepage = http://ck.kolivas.org/apps/lrzip/;
     description = "The CK LRZIP compression program (LZMA + RZIP)";
     license = "GPLv2+";
+    inherit version;
   };
 }
diff --git a/pkgs/tools/compression/lrzip/default.upstream b/pkgs/tools/compression/lrzip/default.upstream
new file mode 100644
index 00000000000..1b834598637
--- /dev/null
+++ b/pkgs/tools/compression/lrzip/default.upstream
@@ -0,0 +1,8 @@
+url http://ck.kolivas.org/apps/lrzip/
+version_link '[.]tar[.]bz2$'
+
+do_overwrite () {
+  ensure_hash
+  set_var_value version "$CURRENT_VERSION"
+  set_var_value sha256 "$CURRENT_HASH"
+}
diff --git a/pkgs/tools/compression/lzip/default.nix b/pkgs/tools/compression/lzip/default.nix
index 710c58029aa..de29c34f150 100644
--- a/pkgs/tools/compression/lzip/default.nix
+++ b/pkgs/tools/compression/lzip/default.nix
@@ -1,13 +1,17 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, texinfo }:
 
 stdenv.mkDerivation rec {
-  name = "lzip-1.14-rc3";
+  name = "lzip-1.14";
+
+  buildInputs = [ texinfo ];
 
   src = fetchurl {
     url = "http://download.savannah.gnu.org/releases/lzip/${name}.tar.gz";
-    sha256 = "040mmfadvhry68bv10baqi1bs8g5wwbf5rx0widyz69llpn64mw9";
+    sha256 = "1rybhk2pxpfh2789ck9mrkdv3bpx7b7miwndlshb5vb02m9crxbz";
   };
 
+  configureFlags = "CPPFLAGS=-DNDEBUG CFLAGS=-O3 CXXFLAGS=-O3";
+
   doCheck = true;
 
   meta = {
diff --git a/pkgs/tools/filesystems/grive/default.nix b/pkgs/tools/filesystems/grive/default.nix
index 67c6d2f8581..dce7757d23a 100644
--- a/pkgs/tools/filesystems/grive/default.nix
+++ b/pkgs/tools/filesystems/grive/default.nix
@@ -1,7 +1,8 @@
 { stdenv, fetchgit, cmake, libgcrypt, json_c, curl, expat, boost, binutils }:
 
 stdenv.mkDerivation rec {
-  name = "grive-0.3.0";
+  version = "0.3.0";
+  name = "grive-${version}";
 
   src = fetchgit {
     url = "https://github.com/Grive/grive.git";
@@ -11,6 +12,13 @@ stdenv.mkDerivation rec {
 
   buildInputs = [cmake libgcrypt json_c curl expat stdenv binutils boost];
 
+  # work around new binutils headers, see
+  # http://stackoverflow.com/questions/11748035/binutils-bfd-h-wants-config-h-now
+  prePatch = ''
+    sed -i '1i#define PACKAGE "grive"\n#define PACKAGE_VERSION "${version}"' \
+      libgrive/src/bfd/SymbolInfo.cc
+  '';
+
   meta = {
     description = "an open source (experimental) Linux client for Google Drive";
     homepage = https://github.com/Grive/grive;
diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix
index 96ae324b01f..a5d2d20968a 100644
--- a/pkgs/tools/graphics/graphviz/default.nix
+++ b/pkgs/tools/graphics/graphviz/default.nix
@@ -32,8 +32,10 @@ stdenv.mkDerivation rec {
     sed -e 's@am__append_5 *=.*@am_append_5 =@' -i lib/gvc/Makefile
   '';
 
+  # "command -v" is POSIX, "which" is not
   postInstall = ''
     sed -i 's|`which lefty`|"'$out'/bin/lefty"|' $out/bin/dotty
+    sed -i 's|which|command -v|' $out/bin/vimdot
   '';
 
   meta = {
diff --git a/pkgs/tools/graphics/netpbm/default.nix b/pkgs/tools/graphics/netpbm/default.nix
index 06a89a1e2da..2af863e37bc 100644
--- a/pkgs/tools/graphics/netpbm/default.nix
+++ b/pkgs/tools/graphics/netpbm/default.nix
@@ -1,17 +1,18 @@
-{stdenv, fetchsvn, libjpeg, libpng, flex, zlib, perl, libxml2, makeWrapper }:
+{stdenv, fetchsvn, pkgconfig, libjpeg, libpng, flex, zlib, perl, libxml2, makeWrapper, libX11 }:
 
+let rev = 1742; in
 stdenv.mkDerivation {
-  name = "netpbm-advanced-1177";
+  name = "netpbm-advanced-${toString rev}";
 
   src = fetchsvn {
     url = https://netpbm.svn.sourceforge.net/svnroot/netpbm/advanced;
-    rev = 1656;
-    sha256 = "0mbrvd8nc52yrg8wgxcvxsajxc9qrnjqhlcks6dpdzq7qmwjy6g9";
+    inherit rev;
+    sha256 = "0csx6g0ci66nx1a6z0a9dkpfp66mdvcpp5r7g6zrx4jp18r9hzb2";
   };
 
-  NIX_CFLAGS_COMPILE = if stdenv.system == "x86_64-linux" then "-fPIC" else "";
+  NIX_CFLAGS_COMPILE = "-fPIC"; # Gentoo adds this on every platform
 
-  buildInputs = [ flex zlib perl libpng libjpeg libxml2 makeWrapper ];
+  buildInputs = [ pkgconfig flex zlib perl libpng libjpeg libxml2 makeWrapper libX11 ];
 
   configurePhase = "cp config.mk.in config.mk";
 
diff --git a/pkgs/tools/graphics/zbar/default.nix b/pkgs/tools/graphics/zbar/default.nix
index 4bced99820b..d5cea08f3df 100644
--- a/pkgs/tools/graphics/zbar/default.nix
+++ b/pkgs/tools/graphics/zbar/default.nix
@@ -30,6 +30,8 @@ rec {
 
   /* doConfigure should be removed if not needed */
   phaseNames = ["doConfigure" "doMakeInstall"];
+
+  configureFlags = ["--disable-video"];
       
   meta = {
     description = "Bar code toolset";
diff --git a/pkgs/tools/misc/mktorrent/default.nix b/pkgs/tools/misc/mktorrent/default.nix
new file mode 100644
index 00000000000..713d6dc70b8
--- /dev/null
+++ b/pkgs/tools/misc/mktorrent/default.nix
@@ -0,0 +1,27 @@
+{stdenv, fetchurl, openssl}:
+
+stdenv.mkDerivation {
+  name = "mktorrent-1.0.0";
+
+  src = fetchurl {
+    url = mirror://sourceforge/mktorrent/mktorrent-1.0.tar.gz;
+    sha256 = "17qi3nfky240pq6qcmf5qg324mxm83vk9r3nvsdhsvinyqm5d3kg";
+  };
+
+  makeFlags = "CFLAGS=-lgcc_s USE_PTHREADS=1 USE_OPENSSL=1 USE_LONG_OPTIONS=1" +
+    stdenv.lib.optionalString stdenv.isi686 " USE_LARGE_FILES=1";
+
+  preInstall = ''
+    installFlags=PREFIX=$out
+  '';
+
+  buildInputs = [ openssl ];
+
+  meta = {
+    homepage = http://mktorrent.sourceforge.net/;
+    license = "GPLv2+";
+    description = "Command line utility to create BitTorrent metainfo files";
+    platforms = with stdenv.lib.platforms; linux;
+    maintainers = with stdenv.lib.maintainers; [viric];
+  };
+}
diff --git a/pkgs/tools/misc/recutils/default.nix b/pkgs/tools/misc/recutils/default.nix
index 8e159f48b63..739fe8b801c 100644
--- a/pkgs/tools/misc/recutils/default.nix
+++ b/pkgs/tools/misc/recutils/default.nix
@@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "1v2xzwwwhc5j5kmvg4sv6baxjpsfqh8ln7ilv4mgb1408rs7xmky";
   };
 
+  patches = [ ./glibc.patch ];
+
   doCheck = true;
 
   buildInputs = [ curl emacs ] ++ (stdenv.lib.optionals doCheck [ check bc ]);
diff --git a/pkgs/tools/misc/recutils/glibc.patch b/pkgs/tools/misc/recutils/glibc.patch
new file mode 100644
index 00000000000..8b4997f099d
--- /dev/null
+++ b/pkgs/tools/misc/recutils/glibc.patch
@@ -0,0 +1,29 @@
+--- recutils-1.5/lib/stdio.in.h
++++ recutils-1.5/lib/stdio.in.h
+@@ -699,22 +699,11 @@
+ # endif
+ #endif
+ 
+-#if @GNULIB_GETS@
+-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-#   undef gets
+-#   define gets rpl_gets
+-#  endif
+-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
+-_GL_CXXALIAS_RPL (gets, char *, (char *s));
+-# else
+-_GL_CXXALIAS_SYS (gets, char *, (char *s));
+-#  undef gets
+-# endif
+-_GL_CXXALIASWARN (gets);
+ /* It is very rare that the developer ever has full control of stdin,
+-   so any use of gets warrants an unconditional warning.  Assume it is
+-   always declared, since it is required by C89.  */
++   so any use of gets warrants an unconditional warning; besides, C11
++   removed it.  */
++#undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+ 
diff --git a/pkgs/tools/misc/tmux/default.nix b/pkgs/tools/misc/tmux/default.nix
index 2e26fb7ddba..435b9cdcee9 100644
--- a/pkgs/tools/misc/tmux/default.nix
+++ b/pkgs/tools/misc/tmux/default.nix
@@ -1,22 +1,21 @@
-{stdenv, fetchurl, ncurses, libevent}:
+{stdenv, fetchurl, ncurses, libevent, pkgconfig}:
 
 stdenv.mkDerivation rec {
   pname = "tmux";
-  version = "1.5";
+  version = "1.7";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/${pname}/${name}.tar.gz";
-    sha256 = "eb8215b57c05b765d2446d9acb2bc5edcdb3eb4ea31af89ee127a27e90056306";
+    sha256 = "0ywy1x2g905hmhkdz418ik42lcvnhnwr8fv63rcqczfg27d6nd38";
   };
 
-  makeFlags = "PREFIX=\${out}";
+  nativeBuildInputs = [ pkgconfig ];
 
-  crossAttrs = {
-    preBuild = ''
-      makeFlags=" $makeFlags CC=${stdenv.cross.config}-gcc "
-    '';
-  };
+  # There's a bug in tmux's configure script, --disable-static actually enables it
+  # Fixed upstream in revision ThomasAdam/tmux@e964ff70e696f30f0301d11deb45c8ada54e0c55
+  # Remove on next update
+  dontDisableStatic = true;
 
   buildInputs = [ ncurses libevent ];
 
@@ -41,6 +40,6 @@ stdenv.mkDerivation rec {
     license = stdenv.lib.licenses.bsd3;
 
     platforms = stdenv.lib.platforms.unix;
-    maintainers = [ stdenv.lib.maintainers.thammers ];
+    maintainers = with stdenv.lib.maintainers; [ shlevy thammers ];
   };
 }
diff --git a/pkgs/tools/networking/iftop/default.nix b/pkgs/tools/networking/iftop/default.nix
index 730b60c7aec..3a9c0e10a78 100644
--- a/pkgs/tools/networking/iftop/default.nix
+++ b/pkgs/tools/networking/iftop/default.nix
@@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
     sha256 = "1b0fis53280qx85gldhmqfcpgyiwplzg43gxyngia1w3f1y58cnh";
   };
 
+  # Explicitly link against libgcc_s, to work around the infamous
+  # "libgcc_s.so.1 must be installed for pthread_cancel to work".
+  LDFLAGS = "-lgcc_s";
+
   preConfigure = ''
     cp ${automake}/share/automake*/config.{sub,guess} config
   '';
diff --git a/pkgs/tools/networking/p2p/amule/default.nix b/pkgs/tools/networking/p2p/amule/default.nix
index eafa51fb4f2..3347ad010c7 100644
--- a/pkgs/tools/networking/p2p/amule/default.nix
+++ b/pkgs/tools/networking/p2p/amule/default.nix
@@ -12,17 +12,19 @@ let
   edf = enabled: flag: if enabled then "--enable-" + flag else "--disable-" + flag;
 in 
 mkDerivation rec {
-  name = "aMule-2.2.6";
+  name = "aMule-2.3.1";
 
   src = fetchurl {
-    url = "mirror://sourceforge/amule/${name}.tar.bz2";
-    sha256 = "08l1931hcg1ia8yvhgx70hx64mknjnfn6l78m0ja44w13mgjpqvc";
+    url = "mirror://sourceforge/amule/${name}.tar.xz";
+    sha256 = "0hvpx3c005nvxsfand5bwfxxiq3mv0mpykajfm2lkygjh1rw2383";
   };
 
   buildInputs =
     [ zlib wxGTK perl cryptopp libupnp gettext pkgconfig makeWrapper ]
     ++ lib.optional httpServer libpng;
 
+  patches = [ ./gcc47.patch ]; # from Gentoo
+
   configureFlags = ''
     --with-crypto-prefix=${cryptopp}
     --disable-debug
diff --git a/pkgs/tools/networking/p2p/amule/gcc47.patch b/pkgs/tools/networking/p2p/amule/gcc47.patch
new file mode 100644
index 00000000000..e776dda3240
--- /dev/null
+++ b/pkgs/tools/networking/p2p/amule/gcc47.patch
@@ -0,0 +1,21 @@
+# http://code.google.com/p/amule/source/detail?r=10772
+diff -ur aMule-2.3.1.orig//src/ObservableQueue.h aMule-2.3.1/src/ObservableQueue.h
+--- aMule-2.3.1.orig//src/ObservableQueue.h	2012-04-22 19:40:05.560084120 +0200
++++ aMule-2.3.1/src/ObservableQueue.h	2012-04-22 19:40:32.479085322 +0200
+@@ -331,14 +331,14 @@
+ template <typename ValueType>
+ void CObservableQueue<ValueType>::ObserverAdded( ObserverType* o )
+ {
+-	NotifyObservers( EventType( EventType::STARTING ), o );
++	this->NotifyObservers( EventType( EventType::STARTING ), o );
+ }
+ 
+ 
+ template <typename ValueType>
+ void CObservableQueue<ValueType>::ObserverRemoved( ObserverType* o )
+ {
+-	NotifyObservers( EventType( EventType::STOPPING ), o );
++	this->NotifyObservers( EventType( EventType::STOPPING ), o );
+ }
+ 
+ 
\ No newline at end of file
diff --git a/pkgs/tools/networking/snx/snx_install.sh b/pkgs/tools/networking/snx/snx_install.sh
deleted file mode 100755
index 759f870468d..00000000000
--- a/pkgs/tools/networking/snx/snx_install.sh
+++ /dev/null
Binary files differdiff --git a/pkgs/tools/networking/wicd/default.nix b/pkgs/tools/networking/wicd/default.nix
index 57c2e1d6d3c..d63711e12ac 100644
--- a/pkgs/tools/networking/wicd/default.nix
+++ b/pkgs/tools/networking/wicd/default.nix
@@ -1,21 +1,22 @@
 {stdenv, fetchurl, python, pygobject, pycairo, pyGtkGlade, pythonDBus, 
- wpa_supplicant, dhcp, dhcpcd, wirelesstools, nettools, openresolv, iproute,
+ wpa_supplicant, dhcp, dhcpcd, wirelesstools, nettools, openresolv, iproute, iputils,
  locale ? "C" }:
 
 # Wicd has a ncurses interface that we do not build because it depends
 # on urwid which has not been packaged at this time (2009-12-27).
 
 stdenv.mkDerivation rec {
-  name = "wicd-1.7.1-beta2";
+  name = "wicd-${version}";
+  version = "1.7.2.4";
   
   src = fetchurl {
-    url = "mirror://sourceforge/wicd/wicd-1.7.1b2.tar.bz2";
-    sha256 = "13ga6a2ip8dy8h49wvv02jxxfvpk5q5sm2wz76dy62y1xsrm23c1";
+    url = "https://launchpad.net/wicd/1.7/${version}/+download/${name}.tar.gz";
+    sha256 = "15ywgh60xzmp5z8l1kzics7yi95isrjg1paz42dvp7dlpdfzpzfw";
   };
 
   buildInputs = [ python ];
 
-  patches = [ ./no-var-install.patch ./mkdir-networks.patch ./pygtk.patch ./no-optimization.patch ];
+  patches = [ ./no-var-install.patch ./no-trans.patch ./mkdir-networks.patch ./pygtk.patch ./no-optimization.patch ];
 
   # Should I be using pygtk's propogated build inputs?
   # !!! Should use makeWrapper.
@@ -24,16 +25,16 @@ stdenv.mkDerivation rec {
     substituteInPlace wicd/wicd-daemon.py --replace 'misc.find_path("python2")' "'${python}/bin/python'"
     
     substituteInPlace in/scripts=wicd.in --subst-var-by TEMPLATE-DEFAULT $out/share/other/dhclient.conf.template.default
-    
-    sed -i "2iexport PATH=\$PATH\$\{PATH:+:\}${python}/bin:${wpa_supplicant}/sbin:${dhcpcd}/sbin:${dhcp}/sbin:${wirelesstools}/sbin:${nettools}/sbin:${openresolv}/sbin:${iproute}/sbin" in/scripts=wicd.in
-    sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pythonDBus})" in/scripts=wicd.in
+
+    sed -i "2iexport PATH=\$PATH\$\{PATH:+:\}${python}/bin:${wpa_supplicant}/sbin:${dhcpcd}/sbin:${dhcp}/sbin:${wirelesstools}/sbin:${nettools}/sbin:${nettools}/bin:${iputils}/sbin:${openresolv}/sbin:${iproute}/sbin" in/scripts=wicd.in
+    sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pygobject}):$(toPythonPath ${pythonDBus})" in/scripts=wicd.in
     sed -i "4iexport LC_ALL=\\\"${locale}\\\"" in/scripts=wicd.in
     sed -i "2iexport PATH=\$PATH\$\{PATH:+:\}${python}/bin" in/scripts=wicd-client.in
-    sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${pythonDBus})" in/scripts=wicd-client.in
+    sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pycairo}):$(toPythonPath ${pythonDBus})" in/scripts=wicd-client.in
     sed -i "2iexport PATH=\$PATH\$\{PATH:+:\}${python}/bin" in/scripts=wicd-gtk.in
-    sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${pythonDBus})" in/scripts=wicd-gtk.in
+    sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pycairo}):$(toPythonPath ${pythonDBus})" in/scripts=wicd-gtk.in
     sed -i "2iexport PATH=\$PATH\$\{PATH:+:\}${python}/bin" in/scripts=wicd-cli.in
-    sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${pythonDBus})" in/scripts=wicd-cli.in
+    sed -i "3iexport PYTHONPATH=\$PYTHONPATH\$\{PYTHONPATH:+:\}$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject}):$(toPythonPath ${pycairo}):$(toPythonPath ${pythonDBus})" in/scripts=wicd-cli.in
   '';
 
   configurePhase = ''
@@ -57,11 +58,14 @@ stdenv.mkDerivation rec {
     --suspend=$out/etc/acpi/suspend.d/ \
     --pmutils=$out/lib/pm-utils/sleep.d/ \
     --dbus=$out/etc/dbus-1/system.d/ \
+    --dbus-service=$out/etc/dbus-1/system-services/ \
+    --systemd=$out/lib/systemd/ \
+    --logrotate=$out/etc/logrotate.d/ \
     --desktop=$out/share/applications/ \
     --icons=$out/share/icons/hicolour/ \
     --translations=$out/share/locale/ \
     --autostart=$out/etc/xdg/autostart/ \
-    --varlib=/var/lib/wicd/ \
+    --varlib=$out/var/lib/ \
     --docdir=$out/share/doc/ \
     --mandir=$out/share/man/ \
     --kdedir=$out/share/autostart/ \
@@ -76,7 +80,7 @@ stdenv.mkDerivation rec {
   '';
 
   installPhase = ''
-    python setup.py install --prefix=$out
+    python setup.py install --prefix=$out --install-lib=$out/lib/${python.libPrefix}/site-packages
     mkdir -p $out/share/other
     cp other/dhclient.conf.template.default $out/share/other/dhclient.conf.template.default
 
@@ -85,19 +89,6 @@ stdenv.mkDerivation rec {
     # <http://wicd.net/punbb/viewtopic.php?id=87>.
     cp -v "${./wpa2-ttls}" "$out/etc/encryption/templates/wpa2-ttls"
     echo "wpa2-ttls" >> "$out/etc/encryption/templates/active"
-
-    # have wicd generate upstart events
-    echo '#!/bin/sh
-initctl emit -n wicd-preconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/preconnect/upstart-emit
-    echo '#!/bin/sh
-initctl emit -n wicd-postconnect ITYPE="$1" ESSID="$2" BSSID="$3"
-initctl emit -n ip-up' > $out/etc/scripts/postconnect/upstart-emit
-    echo '#!/bin/sh
-initctl emit -n wicd-predisconnect ITYPE="$1" ESSID="$2" BSSID="$3"' > $out/etc/scripts/predisconnect/upstart-emit
-    echo '#!/bin/sh
-initctl emit -n wicd-postdisconnect ITYPE="$1" ESSID="$2" BSSID="$3"
-initctl emit -n ip-down' > $out/etc/scripts/postdisconnect/upstart-emit
-    chmod a+x $out/etc/scripts/*/upstart-emit
   '';
 
   meta = {
diff --git a/pkgs/tools/networking/wicd/no-optimization.patch b/pkgs/tools/networking/wicd/no-optimization.patch
index fb04846d85b..785cae7b6ed 100644
--- a/pkgs/tools/networking/wicd/no-optimization.patch
+++ b/pkgs/tools/networking/wicd/no-optimization.patch
@@ -8,14 +8,14 @@ With optimizations on, python will overwrite the nix store.
 -exec %PYTHON% -O %SHARE%daemon/wicd-daemon.py $@
 +exec %PYTHON% -B %SHARE%daemon/wicd-daemon.py $@
 
---- wicd-1.7.1b2/wicd/wicd-daemon.py.old     2011-04-07 08:28:38.668311226 -0400
-+++ wicd-1.7.1b2/wicd/wicd-daemon.py 2011-04-07 08:28:59.111311223 -0400
-@@ -1806,7 +1806,7 @@
-     wicd_bus = dbus.service.BusName('org.wicd.daemon', bus=bus)
+--- wicd-1.7.2.4/wicd/wicd-daemon.py  2012-04-30 21:19:45.000000000 +0200
++++ wicd-1.7.2.4/wicd/wicd-daemon.pynew       2013-03-14 21:35:23.250306592 +0100
+@@ -1812,7 +1812,7 @@
      daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect)
+     child_pid = None
      if not no_poll:
--        child_pid = Popen([misc.find_path("python2"), "-O", 
-+        child_pid = Popen([misc.find_path("python2"), "-B",
+-        child_pid = Popen([wpath.python, "-O", 
++        child_pid = Popen([wpath.python, "-B", 
                            os.path.join(wpath.daemon, "monitor.py")],
                            shell=False, close_fds=True).pid
      atexit.register(on_exit, child_pid)
diff --git a/pkgs/tools/networking/wicd/no-trans.patch b/pkgs/tools/networking/wicd/no-trans.patch
new file mode 100644
index 00000000000..a4c5018e181
--- /dev/null
+++ b/pkgs/tools/networking/wicd/no-trans.patch
@@ -0,0 +1,15 @@
+--- wicd-1.7.2.4/setup.py     2013-03-14 21:28:21.360580941 +0100
++++ wicd-1.7.2.4/setup.py  2013-03-14 21:22:50.125721943 +0100
+@@ -599,12 +599,6 @@
+     if not wpath.no_install_pmutils:
+         data.append((wpath.pmutils, ['other/55wicd']))
+     print 'Using pid path', os.path.basename(wpath.pidfile)
+-    print 'Language support for',
+-    for pofile in glob('po/*.po'):
+-        language = pofile.replace('po/', '').replace('.po', '')
+-        print language,
+-        data.append((wpath.translations + language + '/LC_MESSAGES/',
+-                    ['translations/' + language + '/LC_MESSAGES/wicd.mo']))
+     print
+ except Exception, e:
+     print str(e)
diff --git a/pkgs/tools/networking/wicd/no-var-install.patch b/pkgs/tools/networking/wicd/no-var-install.patch
index 95a5499f283..b01f0e5a438 100644
--- a/pkgs/tools/networking/wicd/no-var-install.patch
+++ b/pkgs/tools/networking/wicd/no-var-install.patch
@@ -1,25 +1,17 @@
 The install tries to create files in /var.  This patch removes those steps.
 
---- wicd-1.7.0/setup.py 2010-01-14 23:49:11.000000000 -0500
-+++ wicd-1.7.0/setup.py 2010-11-16 22:15:33.855977242 -0500
-@@ -493,11 +493,8 @@
-     print "Using init file",(wpath.init, wpath.initfile)
-     data = [
-     (wpath.dbus, ['other/wicd.conf']),
--    (wpath.log, [empty_file]), 
--    (wpath.etc, ['other/dhclient.conf.template.default']),
-     (wpath.encryption, [('encryption/templates/' + b) for b in 
-                         os.listdir('encryption/templates') if not b.startswith('.')]),
--    (wpath.networks, [empty_file]),
-     (wpath.sbin,  ['scripts/wicd']),  
-     (wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py',
-                  'wicd/suspend.py', 'wicd/autoconnect.py']), 
-@@ -558,7 +555,7 @@
-     if not wpath.no_install_docs:
-         data.append((wpath.docdir, ['INSTALL', 'LICENSE', 'AUTHORS',
-                                      'README', 'CHANGES', ]))
--        data.append((wpath.varlib, ['other/WHEREAREMYFILES']))
-+        data.append((wpath.share, ['other/WHEREAREMYFILES']))
-     if not wpath.no_install_kde:
-         if not wpath.no_install_gtk:
-             data.append((wpath.kdedir, ['other/wicd-tray.desktop']))
+--- wicd-1.7.2.4/setup.py     2013-03-14 21:28:21.360580941 +0100
++++ wicd-1.7.2.4/setup.py  2013-03-14 21:22:50.125721943 +0100
+@@ -505,11 +505,8 @@
+         (wpath.dbus_service, ['other/org.wicd.daemon.service']),
+         (wpath.systemd, ['other/wicd.service']),
+         (wpath.logrotate, ['other/wicd.logrotate']),
+-        (wpath.log, [empty_file]), 
+-        (wpath.etc, ['other/dhclient.conf.template.default']),
+         (wpath.encryption, [('encryption/templates/' + b) for b in 
+                             os.listdir('encryption/templates') if not b.startswith('.')]),
+-        (wpath.networks, [empty_file]),
+         (wpath.sbin,  ['scripts/wicd']),  
+         (wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py',
+                     'wicd/suspend.py', 'wicd/autoconnect.py']), 
+
diff --git a/pkgs/tools/package-management/checkinstall/default.nix b/pkgs/tools/package-management/checkinstall/default.nix
index aa935076eb9..a2b9c11eb09 100644
--- a/pkgs/tools/package-management/checkinstall/default.nix
+++ b/pkgs/tools/package-management/checkinstall/default.nix
@@ -29,6 +29,10 @@ stdenv.mkDerivation {
 
     # Fix a `conflicting types for 'scandir'' error on Glibc 2.11.
     ./scandir.patch
+
+    # Force use of old memcpy so that installwatch works on Glibc <
+    # 2.14.
+    ./use-old-memcpy.patch
   ];
 
   buildInputs = [gettext];
diff --git a/pkgs/tools/package-management/checkinstall/glibc-check.patch b/pkgs/tools/package-management/checkinstall/glibc-check.patch
index 9376da41d9e..7f8cbccae8e 100644
--- a/pkgs/tools/package-management/checkinstall/glibc-check.patch
+++ b/pkgs/tools/package-management/checkinstall/glibc-check.patch
@@ -52,7 +52,7 @@ diff -x '*~' -rc checkinstall-1.6.2pre20081116-orig/installwatch/create-localdec
   		6)
   			echo '#define GLIBC_MINOR 6' >> $OUTFILE
   			SUBVERSION='glibc-2.6' ;;
-! 		7|8|9|10|11|12|13|14|15)
+! 		7|8|9|10|11|12|13|14|15|16|17|18)
   			echo '#define GLIBC_MINOR 7' >> $OUTFILE
   			SUBVERSION='glibc-2.7' ;;
   		*)
diff --git a/pkgs/tools/package-management/checkinstall/use-old-memcpy.patch b/pkgs/tools/package-management/checkinstall/use-old-memcpy.patch
new file mode 100644
index 00000000000..c8be7f0b5e2
--- /dev/null
+++ b/pkgs/tools/package-management/checkinstall/use-old-memcpy.patch
@@ -0,0 +1,12 @@
+diff -ru -x '*~' checkinstall-1.6.2-orig/installwatch/installwatch.c checkinstall-1.6.2/installwatch/installwatch.c
+--- checkinstall-1.6.2-orig/installwatch/installwatch.c	2008-11-16 17:20:53.000000000 +0100
++++ checkinstall-1.6.2/installwatch/installwatch.c	2013-03-15 13:50:12.717646381 +0100
+@@ -28,6 +28,8 @@
+  *                                  <mail@fredemmott.co.uk>
+  */
+ 
++asm (".symver memcpy, memcpy@GLIBC_2.2.5");
++
+ #include <sys/param.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix
index 97ef421c341..e8255ccb296 100644
--- a/pkgs/tools/package-management/nix/default.nix
+++ b/pkgs/tools/package-management/nix/default.nix
@@ -5,11 +5,11 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "nix-1.3";
+  name = "nix-1.5.1";
 
   src = fetchurl {
     url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz";
-    sha256 = "32cba96df0e02d6627f5625a441fdd4ea0db718dd5bfd50044cdfd3c606d4852";
+    sha256 = "c53ec8a5518445bea658e1edb4e3be8c315b583aefc55d6969f2bf6f6c805239";
   };
 
   nativeBuildInputs = [ perl pkgconfig ];
diff --git a/pkgs/tools/security/mkpasswd/default.nix b/pkgs/tools/security/mkpasswd/default.nix
new file mode 100644
index 00000000000..a1982cc4e66
--- /dev/null
+++ b/pkgs/tools/security/mkpasswd/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl
+}:
+  
+stdenv.mkDerivation rec {
+  name = "mkpasswd-${version}";
+
+  version = "5.0.20";
+
+  src = fetchurl {
+    url = "http://ftp.debian.org/debian/pool/main/w/whois/whois_${version}.tar.xz";
+    sha256 = "1kwf5pwc7w8dw40nrd4m4637mz7pbhc4c1v78j56nqj38sak50w1";
+  };
+
+  preConfigure = ''
+    substituteInPlace Makefile --replace "prefix = /usr" "prefix = $out"
+  '';
+
+  buildPhase = "make mkpasswd";
+
+  installPhase = "make install-mkpasswd";
+
+  meta = {
+    homepage = http://ftp.debian.org/debian/pool/main/w/whois/;
+    description = ''
+      Overfeatured front end to crypt, from the Debian whois package.
+    '';
+  };
+}
diff --git a/pkgs/tools/security/tor/default.nix b/pkgs/tools/security/tor/default.nix
index c56f9454fcd..e8c27c5f2b1 100644
--- a/pkgs/tools/security/tor/default.nix
+++ b/pkgs/tools/security/tor/default.nix
@@ -8,13 +8,10 @@ stdenv.mkDerivation rec {
     sha256 = "bb2d6f1136f33e11d37e6e34184143bf191e59501613daf33ae3d6f78f3176a0";
   };
 
-#  patchPhase =
-    # DNS lookups fail in chroots.
-#    '' sed -i "src/or/test.c" -es/localhost/127.0.0.1/g
-#    '';
-
   buildInputs = [ libevent openssl zlib ];
 
+  CFLAGS = "-lgcc_s";
+
   doCheck = true;
 
   meta = {
@@ -35,7 +32,7 @@ stdenv.mkDerivation rec {
 
     maintainers =
       [ # Russell O’Connor <roconnor@theorem.ca> ?
-	stdenv.lib.maintainers.ludo
+        stdenv.lib.maintainers.ludo
       ];
     platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
   };
diff --git a/pkgs/tools/system/idle3tools/default.nix b/pkgs/tools/system/idle3tools/default.nix
new file mode 100644
index 00000000000..1325b52b380
--- /dev/null
+++ b/pkgs/tools/system/idle3tools/default.nix
@@ -0,0 +1,22 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation {
+  name = "idle3-tools-0.9.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/idle3-tools/idle3-tools-0.9.1.tgz";
+    sha256 = "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p";
+  };
+
+  preInstall = ''
+    installFlags=DESTDIR=$out
+  '';
+
+  meta = {
+    homepage = http://idle3-tools.sourceforge.net/;
+    description = "Tool to get/set the infamous idle3 timer in WD HDDs";
+    license = "GPLv3";
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}
diff --git a/pkgs/tools/system/rsyslog/default.nix b/pkgs/tools/system/rsyslog/default.nix
new file mode 100644
index 00000000000..0189d04902a
--- /dev/null
+++ b/pkgs/tools/system/rsyslog/default.nix
@@ -0,0 +1,22 @@
+{stdenv, fetchurl, eventlog, pkgconfig, libestr, libee, json_c, libuuid, zlib, gnutls}:
+
+stdenv.mkDerivation {
+  name = "rsyslog-7.2.6";
+
+  src = fetchurl {
+    url = http://www.rsyslog.com/files/download/rsyslog/rsyslog-7.2.6.tar.gz;
+    sha256 = "19a5c60816ebce6c86468eb8c5fe1c4cc1febf23c9167ce59d2327fe5e047ed9";
+  };
+
+  buildInputs = [pkgconfig libestr libee json_c libuuid zlib gnutls];
+
+  configureFlags = "--enable-gnutls";
+
+  meta = {
+    homepage = "http://www.rsyslog.com/";
+    description = "Rsyslog is an enhanced syslogd. It can be used as a drop-in replacement for stock sysklogd.";
+    license = "GPLv3";
+
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/tools/system/smartmontools/default.nix b/pkgs/tools/system/smartmontools/default.nix
index 7a37e1200b4..1e310ce6c43 100644
--- a/pkgs/tools/system/smartmontools/default.nix
+++ b/pkgs/tools/system/smartmontools/default.nix
@@ -2,8 +2,8 @@
 
 let
   driverdb = fetchurl {
-    url = "http://smartmontools.svn.sourceforge.net/viewvc/smartmontools/trunk/smartmontools/drivedb.h?revision=3742";
-    sha256 = "04xsgxzc1mqn9szazyr6v3xcpw0pszi8vz7xcsb661rww5482rw0";
+    url = "http://smartmontools.svn.sourceforge.net/viewvc/smartmontools/trunk/smartmontools/drivedb.h?revision=3781";
+    sha256 = "0m39ji2kf80dsws5ksg2pmkpn8x00lrlvl5nlc6ldjfss7sjvc9x";
     name = "smartmontools-drivedb.h";
   };
 in
diff --git a/pkgs/tools/text/recode/default.nix b/pkgs/tools/text/recode/default.nix
index f3f8520a918..db9ed5d30f3 100644
--- a/pkgs/tools/text/recode/default.nix
+++ b/pkgs/tools/text/recode/default.nix
@@ -1,52 +1,39 @@
-{ stdenv, fetchurl, autoconf, automake, libtool, gettext, perl, flex }:
+# XXX: this may need -liconv on non-glibc systems.. 
 
-let
-  asIfPatch = ./recode-3.6-as-if.patch;
+{ stdenv, fetchgit, python, perl, autoconf, automake, libtool, intltool, flex }:
 
-  gettextPatch = ./recode-3.6-gettextfix.diff;
+stdenv.mkDerivation rec {
+  name = "recode-3.7-pff85fdbd";
 
-  debianPatch = fetchurl {
-    url = "http://ftp.de.debian.org/debian/pool/main/r/recode/recode_3.6-17.diff.gz";
-    sha256 = "1iwrggw64faf6lghgm9nzh64vh8m8jd79h6pxqgrmfmplzrzpzjp";
+  src = fetchgit {
+    url = https://github.com/pinard/Recode.git;
+    rev = "2fd8385658e5a08700e3b916053f6680ff85fdbd";
+    sha256 = "1xhlfmqld6af16l444jli9crj9brym2jihg1n6lkxh2gar68f5l7";
   };
-in
-stdenv.mkDerivation {
-  name = "recode-3.6";
 
-  src = fetchurl {
-    url = "ftp://ftp.halifax.rwth-aachen.de/gnu/recode/recode-3.6.tar.gz";
-    sha256 = "1krgjqfhsxcls4qvxhagc45sm1sd0w69jm81nwm0bip5z3rs9rp3";
-  };
-
-  buildInputs = [ autoconf automake libtool gettext perl flex ];
-
-  patchPhase = ''
-    patch -Np1 -i ${gettextPatch}
-    patch -Np1 -i ${asIfPatch}
-    gunzip <${debianPatch} | patch -Np1 -i -
-    sed -i '1i#include <stdlib.h>' src/argmatch.c
+  buildInputs = [ python perl autoconf automake libtool intltool flex ];
 
+  preConfigure = ''
     # fix build with new automake, https://bugs.gentoo.org/show_bug.cgi?id=419455
-    rm acinclude.m4
+    #rm acinclude.m4
     substituteInPlace Makefile.am --replace "ACLOCAL = ./aclocal.sh @ACLOCAL@" ""
-    sed -i '/^AM_C_PROTOTYPES/d' configure.in
+    sed -i '/^AM_C_PROTOTYPES/d' configure.ac
     substituteInPlace src/Makefile.am --replace "ansi2knr" ""
 
-    autoreconf -i
-    libtoolize
+    autoreconf -fi
   '';
 
-  configureFlags = "--without-included-gettext";
+  #doCheck = true; # doesn't work yet
 
-  doCheck = true;
+  preCheck = ''
+    checkFlagsArray=(CPPFLAGS="-I../lib" LDFLAGS="-L../src/.libs -Wl,-rpath=../src/.libs")
+  '';
 
   meta = {
     homepage = "http://www.gnu.org/software/recode/";
     description = "Converts files between various character sets and usages";
-
-    license = "GPLv2+";
-
     platforms = stdenv.lib.platforms.unix;
-    maintainers = [];
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = with stdenv.lib.maintainers; [ jcumming ];
   };
 }
diff --git a/pkgs/tools/text/recode/recode-3.6-as-if.patch b/pkgs/tools/text/recode/recode-3.6-as-if.patch
deleted file mode 100644
index c7bcc27c875..00000000000
--- a/pkgs/tools/text/recode/recode-3.6-as-if.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-http://bugs.gentoo.org/283029
-
---- a/m4/flex.m4
-+++ b/m4/flex.m4
-@@ -8,11 +8,11 @@ dnl ad_AC_PROG_FLEX
- dnl Look for flex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
- AC_DEFUN(ad_AC_PROG_FLEX,
- [AC_CHECK_PROGS(LEX, flex, missing)
--if test "$LEX" = missing; then
-+AS_IF([test "$LEX" = missing], [dnl
-   LEX="\$(top_srcdir)/$ac_aux_dir/missing flex"
-   LEX_OUTPUT_ROOT=lex.yy
-   AC_SUBST(LEX_OUTPUT_ROOT)dnl
--else
-+], [:
-   AC_PROG_LEX
-   AC_DECL_YYTEXT
--fi])
-+])])
diff --git a/pkgs/tools/text/recode/recode-3.6-gettextfix.diff b/pkgs/tools/text/recode/recode-3.6-gettextfix.diff
deleted file mode 100644
index 3b7eb8ba20e..00000000000
--- a/pkgs/tools/text/recode/recode-3.6-gettextfix.diff
+++ /dev/null
@@ -1,23 +0,0 @@
-http://bugs.gentoo.org/239372
-
-patch by Dmitry Karasik
-
---- recode-3.6/m4/gettext.m4
-+++ recode-3.6/m4/gettext.m4
-@@ -109,12 +109,12 @@
-     else
-       ac_items="$LINGUAS"
-       for ac_item in $ac_items; do
--	case "$ALL_LINGUAS" in
--	  *$ac_item*)
-+        for supported_item in $ALL_LINGUAS; do
-+          if test "$ac_item" = "$supported_item"; then
- 	    ac_print="$ac_print $ac_item"
- 	    MOFILES="$MOFILES $ac_item.mo"
--	    ;;
--	esac
-+          fi
-+        done
-       done
-     fi
-     AC_SUBST(MOFILES)
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 22436952061..b679c6c4d52 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -496,6 +496,7 @@ let
   mcrl2 = callPackage ../tools/misc/mcrl2 { };
 
   syslogng = callPackage ../tools/system/syslog-ng { };
+  rsyslog = callPackage ../tools/system/rsyslog { };
 
   mcelog = callPackage ../os-specific/linux/mcelog { };
 
@@ -715,6 +716,8 @@ let
 
   efibootmgr = callPackage ../tools/system/efibootmgr { };
 
+  elasticsearch = callPackage ../servers/search/elasticsearch { };
+
   enblendenfuse = callPackage ../tools/graphics/enblend-enfuse {
     boost = boost149;
   };
@@ -969,6 +972,8 @@ let
 
   idutils = callPackage ../tools/misc/idutils { };
 
+  idle3tools = callPackage ../tools/system/idle3tools { };
+
   iftop = callPackage ../tools/networking/iftop { };
 
   imapproxy = callPackage ../tools/networking/imapproxy { };
@@ -1056,6 +1061,10 @@ let
 
   libconfig = callPackage ../development/libraries/libconfig { };
 
+  libee = callPackage ../development/libraries/libee { };
+
+  libestr = callPackage ../development/libraries/libestr { };
+
   libtirpc = callPackage ../development/libraries/ti-rpc { };
 
   libshout = callPackage ../development/libraries/libshout { };
@@ -1098,6 +1107,8 @@ let
 
   mairix = callPackage ../tools/text/mairix { };
 
+  makemkv = callPackage ../applications/video/makemkv { };
+
   man = callPackage ../tools/misc/man { };
 
   man_db = callPackage ../tools/misc/man-db { };
@@ -1132,8 +1143,12 @@ let
 
   mkcue = callPackage ../tools/cd-dvd/mkcue { };
 
+  mkpasswd = callPackage ../tools/security/mkpasswd { };
+
   mktemp = callPackage ../tools/security/mktemp { };
 
+  mktorrent = callPackage ../tools/misc/mktorrent { };
+
   modemmanager = callPackage ../tools/networking/modemmanager {};
 
   monit = builderDefsPackage ../tools/system/monit {
@@ -1863,6 +1878,8 @@ let
 
   zip = callPackage ../tools/archivers/zip { };
 
+  zpaq = callPackage ../tools/archivers/zpaq { };
+
   zsync = callPackage ../tools/compression/zsync { };
 
 
@@ -2063,6 +2080,11 @@ let
         if crossSystem != null && crossSystem.config == "i586-pc-gnu"
         then gnu.libpthreadCross
         else null;
+
+      # XXX: We have troubles cross-compiling libstdc++ on MinGW (see
+      # <http://hydra.nixos.org/build/4268232>), so don't even try.
+      langCC = (crossSystem == null
+                || crossSystem.config != "i686-pc-mingw32");
      });
     libc = libcCross;
     binutils = binutilsCross;
@@ -2613,6 +2635,8 @@ let
     ocaml_extlib = callPackage ../development/ocaml-modules/extlib { };
 
     pycaml = callPackage ../development/ocaml-modules/pycaml { };
+
+    opam = callPackage ../development/tools/ocaml/opam { };
   };
 
   ocamlPackages = recurseIntoAttrs ocamlPackages_3_12_1;
@@ -2647,6 +2671,10 @@ let
 
   scala = callPackage ../development/compilers/scala { };
 
+  sdcc = callPackage ../development/compilers/sdcc {
+    boost = boost149; # sdcc 3.2.0 fails to build with boost 1.53
+  };
+
   stalin = callPackage ../development/compilers/stalin { };
 
   strategoPackages = recurseIntoAttrs strategoPackages018;
@@ -2848,6 +2876,10 @@ let
     inherit (python27Packages) recursivePthLoader;
   };
 
+  pythonDocs = recurseIntoAttrs (import ../development/interpreters/python/docs {
+    inherit stdenv fetchurl lib;
+  });
+
   pythonLinkmeWrapper = callPackage ../development/interpreters/python/python-linkme-wrapper.nix { };
 
   pyrex = pyrex095;
@@ -2864,6 +2896,7 @@ let
 
   ruby18 = callPackage ../development/interpreters/ruby/ruby-18.nix { };
   ruby19 = callPackage ../development/interpreters/ruby/ruby-19.nix { };
+  ruby2 = lowPrio (callPackage ../development/interpreters/ruby/ruby-2.0.nix { });
 
   ruby = ruby19;
 
@@ -3027,6 +3060,8 @@ let
 
   cgdb = callPackage ../development/tools/misc/cgdb { };
 
+  chromedriver = callPackage ../development/tools/selenium/chromedriver { };
+
   complexity = callPackage ../development/tools/misc/complexity { };
 
   ctags = callPackage ../development/tools/misc/ctags { };
@@ -3288,7 +3323,7 @@ let
 
   texinfo413 = callPackage ../development/tools/misc/texinfo/4.13a.nix { };
   texinfo49 = callPackage ../development/tools/misc/texinfo/4.9.nix { };
-  texinfo5 = callPackage ../development/tools/misc/texinfo/5.0.nix { };
+  texinfo5 = callPackage ../development/tools/misc/texinfo/5.1.nix { };
   texinfo = texinfo413;
 
   texi2html = callPackage ../development/tools/misc/texi2html { };
@@ -3333,6 +3368,8 @@ let
 
   acl = callPackage ../development/libraries/acl { };
 
+  activemq = callPackage ../development/libraries/apache-activemq { };
+
   adns = callPackage ../development/libraries/adns { };
 
   afflib = callPackage ../development/libraries/afflib {};
@@ -3574,10 +3611,6 @@ let
     vpxSupport = !stdenv.isMips;
   };
 
-  ffmpeg_1_0 = callPackage ../development/libraries/ffmpeg/1.0.nix {
-    vpxSupport = !stdenv.isMips;
-  };
-
   ffmpeg_1_1 = callPackage ../development/libraries/ffmpeg/1.1.nix {
     vpxSupport = !stdenv.isMips;
   };
@@ -3722,9 +3755,9 @@ let
     installLocales = config.glibc.locales or false;
   };
 
-  glibcLocales = callPackage ../development/libraries/glibc/2.13/locales.nix { };
+  glibcLocales = callPackage ../development/libraries/glibc/2.17/locales.nix { };
 
-  glibcInfo = callPackage ../development/libraries/glibc/2.13/info.nix { };
+  glibcInfo = callPackage ../development/libraries/glibc/2.17/info.nix { };
 
   glibc_multi =
     runCommand "${glibc.name}-multi"
@@ -3868,6 +3901,7 @@ let
 
   cairo = callPackage ../development/libraries/cairo { };
   cairomm = callPackage ../development/libraries/cairomm { };
+  cairo_1_12_2 = callPackage ../development/libraries/cairo/1.12.2.nix { };
 
   pango = callPackage ../development/libraries/pango/1.30.x.nix { };
   pangomm = callPackage ../development/libraries/pangomm/2.28.x.nix { };
@@ -4402,6 +4436,8 @@ let
 
   libungif = callPackage ../development/libraries/giflib/libungif.nix { };
 
+  libunique = callPackage ../development/libraries/libunique/default.nix { };
+
   libusb = callPackage ../development/libraries/libusb { };
 
   libusb1 = callPackage ../development/libraries/libusb1 { };
@@ -4624,6 +4660,8 @@ let
     ftgl = ftgl212;
   };
 
+  opencascade_oce = callPackage ../development/libraries/opencascade/oce.nix { };
+
   opencsg = callPackage ../development/libraries/opencsg { };
 
   openct = callPackage ../development/libraries/openct { };
@@ -4853,6 +4891,8 @@ let
 
   snappy = callPackage ../development/libraries/snappy { };
 
+  sodium = callPackage ../development/libraries/sodium {};
+
   sofia_sip = callPackage ../development/libraries/sofia-sip { };
 
   soprano = callPackage ../development/libraries/soprano { };
@@ -4999,33 +5039,25 @@ let
 
   webkit =
     builderDefsPackage ../development/libraries/webkit {
+      inherit gtk2; # for plugins etc. even with gtk3, see Gentoo ebuild
+      inherit gtk3 glib atk cairo pango fontconfig freetype;
       inherit (gnome) gtkdoc libsoup;
-      inherit atk pango glib gtk2 /*for plugins etc. even with gtk3, see Gentoo ebuild*/;
-      gtk = gtk3;
-      inherit freetype fontconfig gettext gperf curl
-        libjpeg libtiff libxml2 libxslt sqlite
-        icu cairo intltool automake libtool
-        pkgconfig autoconf bison libproxy enchant
-        python ruby which flex geoclue mesa;
-      inherit gstreamer gst_plugins_base gst_ffmpeg
-        gst_plugins_good;
-      inherit (xlibs) libXt renderproto libXrender kbproto;
-      inherit libpng perl;
+      inherit pkgconfig libtool intltool autoconf automake gperf bison flex
+        libjpeg libpng libtiff libxml2 libxslt sqlite icu curl
+        which libproxy geoclue enchant python ruby perl
+        mesa xlibs;
+      inherit gstreamer gst_plugins_base gst_ffmpeg gst_plugins_good;
     };
 
   webkit_gtk2 =
     builderDefsPackage ../development/libraries/webkit/gtk2.nix {
+      inherit gtk2 glib atk cairo pango fontconfig freetype;
       inherit (gnome) gtkdoc libsoup;
-      inherit gtk atk pango glib;
-      inherit freetype fontconfig gettext gperf curl
-        libjpeg libtiff libxml2 libxslt sqlite
-        icu cairo intltool automake libtool
-        pkgconfig autoconf bison libproxy enchant
-        python ruby which flex geoclue;
-      inherit gstreamer gst_plugins_base gst_ffmpeg
-        gst_plugins_good;
-      inherit (xlibs) libXt renderproto libXrender;
-      inherit libpng perl;
+      inherit pkgconfig libtool intltool autoconf automake gperf bison flex
+        libjpeg libpng libtiff libxml2 libxslt sqlite icu curl
+        which libproxy geoclue enchant python ruby perl
+        mesa xlibs;
+      inherit gstreamer gst_plugins_base gst_ffmpeg gst_plugins_good;
     };
 
   webkitSVN =
@@ -5454,6 +5486,8 @@ let
 
   openfire = callPackage ../servers/xmpp/openfire { };
 
+  oracleXE = callPackage ../servers/sql/oracle-xe { };
+
   OVMF = callPackage ../applications/virtualization/OVMF { };
 
   postgresql = postgresql83;
@@ -5794,7 +5828,7 @@ let
         kernelPatches.sec_perm_2_6_24
         # kernelPatches.aufs2_2_6_32
         kernelPatches.cifs_timeout_2_6_29
-        kernelPatches.no_xsave
+        # kernelPatches.no_xsave # doesn't apply anymore
         kernelPatches.dell_rfkill
       ];
   };
@@ -5887,127 +5921,142 @@ let
       ];
   };
 
+  # low-priority because it is RC
+  linux_3_9 = lowPrio (makeOverridable (import ../os-specific/linux/kernel/linux-3.9.nix) {
+    inherit fetchurl stdenv perl mktemp bc module_init_tools ubootChooser;
+    kernelPatches =
+      [
+        kernelPatches.sec_perm_2_6_24
+      ] ++ lib.optionals (platform.kernelArch == "mips")
+      [ kernelPatches.mips_fpureg_emu
+        kernelPatches.mips_fpu_sigill
+        kernelPatches.mips_ext3_n32
+      ];
+  });
+
   /* Linux kernel modules are inherently tied to a specific kernel.  So
      rather than provide specific instances of those packages for a
      specific kernel, we have a function that builds those packages
      for a specific kernel.  This function can then be called for
      whatever kernel you're using. */
 
-  linuxPackagesFor = kernel: self: let callPackage = newScope self; in rec {
+  linuxPackagesFor = kernel:
+    let
+      callPackage = newScope self;
 
-    inherit kernel;
+      self = {
+        kernel = kernel.dev or kernel;
 
-    acpi_call = callPackage ../os-specific/linux/acpi-call {};
+        acpi_call = callPackage ../os-specific/linux/acpi-call {};
 
-    bbswitch = callPackage ../os-specific/linux/bbswitch {};
+        bbswitch = callPackage ../os-specific/linux/bbswitch {};
 
-    ati_drivers_x11 = callPackage ../os-specific/linux/ati-drivers { };
+        ati_drivers_x11 = callPackage ../os-specific/linux/ati-drivers { };
 
-    aufs =
-      if kernel.features ? aufs2 then
-        callPackage ../os-specific/linux/aufs/2.nix { }
-      else if kernel.features ? aufs3 then
-        callPackage ../os-specific/linux/aufs/3.nix { }
-      else null;
+        aufs =
+          if self.kernel.features ? aufs2 then
+            callPackage ../os-specific/linux/aufs/2.nix { }
+          else if self.kernel.features ? aufs3 then
+            callPackage ../os-specific/linux/aufs/3.nix { }
+          else null;
 
-    aufs_util =
-      if kernel.features ? aufs2 then
-        callPackage ../os-specific/linux/aufs-util/2.nix { }
-      else if kernel.features ? aufs3 then
-        callPackage ../os-specific/linux/aufs-util/3.nix { }
-      else null;
-
-    blcr = callPackage ../os-specific/linux/blcr { };
+        aufs_util =
+          if self.kernel.features ? aufs2 then
+            callPackage ../os-specific/linux/aufs-util/2.nix { }
+          else if self.kernel.features ? aufs3 then
+            callPackage ../os-specific/linux/aufs-util/3.nix { }
+          else null;
 
-    cryptodev = callPackage ../os-specific/linux/cryptodev { };
+        blcr = callPackage ../os-specific/linux/blcr { };
 
-    e1000e = callPackage ../os-specific/linux/e1000e {};
+        cryptodev = callPackage ../os-specific/linux/cryptodev { };
 
-    exmap = callPackage ../os-specific/linux/exmap { };
+        e1000e = callPackage ../os-specific/linux/e1000e {};
 
-    frandom = callPackage ../os-specific/linux/frandom { };
+        exmap = callPackage ../os-specific/linux/exmap { };
 
-    iscsitarget = callPackage ../os-specific/linux/iscsitarget { };
+        frandom = callPackage ../os-specific/linux/frandom { };
 
-    iwlwifi = callPackage ../os-specific/linux/iwlwifi { };
+        iscsitarget = callPackage ../os-specific/linux/iscsitarget { };
 
-    iwlwifi4965ucode =
-      if (builtins.compareVersions kernel.version "2.6.27" == 0)
-         || (builtins.compareVersions kernel.version "2.6.27" == 1)
-      then iwlwifi4965ucodeV2
-      else iwlwifi4965ucodeV1;
+        iwlwifi = callPackage ../os-specific/linux/iwlwifi { };
 
-    atheros = callPackage ../os-specific/linux/atheros/0.9.4.nix { };
+        iwlwifi4965ucode =
+          if builtins.compareVersions self.kernel.version "2.6.27" == 0
+             || builtins.compareVersions self.kernel.version "2.6.27" == 1
+          then iwlwifi4965ucodeV2
+          else iwlwifi4965ucodeV1;
 
-    broadcom_sta = callPackage ../os-specific/linux/broadcom-sta/default.nix { };
+        atheros = callPackage ../os-specific/linux/atheros/0.9.4.nix { };
 
-    kernelHeaders = linuxHeaders;
+        broadcom_sta = callPackage ../os-specific/linux/broadcom-sta/default.nix { };
 
-    nvidia_x11 = callPackage ../os-specific/linux/nvidia-x11 { };
+        nvidia_x11 = callPackage ../os-specific/linux/nvidia-x11 { };
 
-    nvidia_x11_legacy96 = callPackage ../os-specific/linux/nvidia-x11/legacy96.nix { };
-    nvidia_x11_legacy173 = callPackage ../os-specific/linux/nvidia-x11/legacy173.nix { };
-    nvidia_x11_legacy304 = callPackage ../os-specific/linux/nvidia-x11/legacy304.nix { };
+        nvidia_x11_legacy96 = callPackage ../os-specific/linux/nvidia-x11/legacy96.nix { };
+        nvidia_x11_legacy173 = callPackage ../os-specific/linux/nvidia-x11/legacy173.nix { };
+        nvidia_x11_legacy304 = callPackage ../os-specific/linux/nvidia-x11/legacy304.nix { };
 
-    openafsClient = callPackage ../servers/openafs-client { };
+        openafsClient = callPackage ../servers/openafs-client { };
 
-    openiscsi = callPackage ../os-specific/linux/open-iscsi { };
+        openiscsi = callPackage ../os-specific/linux/open-iscsi { };
 
-    wis_go7007 = callPackage ../os-specific/linux/wis-go7007 { };
+        wis_go7007 = callPackage ../os-specific/linux/wis-go7007 { };
 
-    kqemu = callPackage ../os-specific/linux/kqemu { };
+        kqemu = callPackage ../os-specific/linux/kqemu { };
 
-    klibc = callPackage ../os-specific/linux/klibc {
-      linuxHeaders = glibc.kernelHeaders;
-    };
+        klibc = callPackage ../os-specific/linux/klibc {
+          linuxHeaders = glibc.kernelHeaders;
+        };
 
-    splashutils = let hasFbConDecor = if kernel ? features
-      then kernel.features ? fbConDecor
-      else kernel.config.isEnabled "FB_CON_DECOR";
-    in if hasFbConDecor then pkgs.splashutils else null;
+        splashutils = let hasFbConDecor = if self.kernel ? features
+          then self.kernel.features ? fbConDecor
+          else self.kernel.config.isEnabled "FB_CON_DECOR";
+        in if hasFbConDecor then pkgs.splashutils else null;
 
-    /* compiles but has to be integrated into the kernel somehow
-      Let's have it uncommented and finish it..
-    */
-    ndiswrapper = callPackage ../os-specific/linux/ndiswrapper { };
+        /* compiles but has to be integrated into the kernel somehow
+           Let's have it uncommented and finish it..
+        */
+        ndiswrapper = callPackage ../os-specific/linux/ndiswrapper { };
 
-    perf = callPackage ../os-specific/linux/kernel/perf.nix { };
+        perf = callPackage ../os-specific/linux/kernel/perf.nix { };
 
-    spl = callPackage ../os-specific/linux/spl/default.nix { };
+        spl = callPackage ../os-specific/linux/spl/default.nix { };
 
-    sysprof = callPackage ../development/tools/profiling/sysprof {
-      inherit (gnome) libglade;
-    };
+        sysprof = callPackage ../development/tools/profiling/sysprof {
+          inherit (gnome) libglade;
+        };
 
-    systemtap = callPackage ../development/tools/profiling/systemtap {
-      linux = kernel;
-      inherit (gnome) libglademm;
-    };
+        systemtap = callPackage ../development/tools/profiling/systemtap {
+          linux = self.kernel;
+          inherit (gnome) libglademm;
+        };
 
-    tp_smapi = callPackage ../os-specific/linux/tp_smapi { };
+        tp_smapi = callPackage ../os-specific/linux/tp_smapi { };
 
-    v86d = callPackage ../os-specific/linux/v86d { };
+        v86d = callPackage ../os-specific/linux/v86d { };
 
-    virtualbox = callPackage ../applications/virtualization/virtualbox {
-      stdenv = stdenv_32bit;
-      inherit (gnome) libIDL;
-    };
+        virtualbox = callPackage ../applications/virtualization/virtualbox {
+          stdenv = stdenv_32bit;
+          inherit (gnome) libIDL;
+        };
 
-    virtualboxGuestAdditions = callPackage ../applications/virtualization/virtualbox/guest-additions { };
+        virtualboxGuestAdditions = callPackage ../applications/virtualization/virtualbox/guest-additions { };
 
-    zfs = callPackage ../os-specific/linux/zfs/default.nix { };
-  };
+        zfs = callPackage ../os-specific/linux/zfs/default.nix { };
+      };
+    in (self // { kernel = self.kernel.out; });
 
   # Build the kernel modules for the some of the kernels.
-  linuxPackages_2_6_32 = recurseIntoAttrs (linuxPackagesFor linux_2_6_32 pkgs.linuxPackages_2_6_32);
-  linuxPackages_2_6_35 = recurseIntoAttrs (linuxPackagesFor linux_2_6_35 pkgs.linuxPackages_2_6_35);
-  linuxPackages_3_0 = recurseIntoAttrs (linuxPackagesFor linux_3_0 pkgs.linuxPackages_3_0);
-  linuxPackages_3_2 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_2 pkgs.linuxPackages_3_2);
-  linuxPackages_3_2_xen = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_2_xen pkgs.linuxPackages_3_2_xen);
-  linuxPackages_3_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_4 pkgs.linuxPackages_3_4);
-  linuxPackages_3_6_rpi = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_6_rpi pkgs.linuxPackages_3_6_rpi);
-  linuxPackages_3_7 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_7 pkgs.linuxPackages_3_7);
-  linuxPackages_3_8 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_8 pkgs.linuxPackages_3_8);
+  linuxPackages_2_6_32 = recurseIntoAttrs (linuxPackagesFor linux_2_6_32);
+  linuxPackages_2_6_35 = recurseIntoAttrs (linuxPackagesFor linux_2_6_35);
+  linuxPackages_3_0 = recurseIntoAttrs (linuxPackagesFor linux_3_0);
+  linuxPackages_3_2 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_2);
+  linuxPackages_3_2_xen = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_2_xen);
+  linuxPackages_3_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_4);
+  linuxPackages_3_6_rpi = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_6_rpi);
+  linuxPackages_3_7 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_7);
+  linuxPackages_3_8 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_8);
 
   # The current default kernel / kernel modules.
   linux = linuxPackages.kernel;
@@ -6015,7 +6064,7 @@ let
 
   # A function to build a manually-configured kernel
   linuxManualConfig = import ../os-specific/linux/kernel/manual-config.nix {
-    inherit (pkgs) stdenv runCommand nettools perl kmod writeTextFile;
+    inherit (pkgs) stdenv runCommand nettools bc perl kmod writeTextFile;
   };
 
   keyutils = callPackage ../os-specific/linux/keyutils { };
@@ -6054,6 +6103,8 @@ let
 
   libcap_manpages = callPackage ../os-specific/linux/libcap/man.nix { };
 
+  libcap_ng = callPackage ../os-specific/linux/libcap-ng { };
+
   libnscd = callPackage ../os-specific/linux/libnscd { };
 
   libnotify = callPackage ../development/libraries/libnotify { };
@@ -6166,6 +6217,8 @@ let
 
   sdparm = callPackage ../os-specific/linux/sdparm { };
 
+  sepolgen = callPackage ../os-specific/linux/sepolgen { };
+
   shadow = callPackage ../os-specific/linux/shadow { };
 
   splashutils = callPackage ../os-specific/linux/splashutils/default.nix { };
@@ -6514,7 +6567,7 @@ let
   antiword = callPackage ../applications/office/antiword {};
 
   ardour = callPackage ../applications/audio/ardour {
-    inherit (gnome) libgnomecanvas;
+    inherit (gnome) libgnomecanvas libgnomecanvasmm;
   };
 
   ardour3 =  lowPrio (callPackage ../applications/audio/ardour/ardour3.nix {
@@ -6718,7 +6771,11 @@ let
 
   eaglemode = callPackage ../applications/misc/eaglemode { };
 
-  eclipses = recurseIntoAttrs (callPackage ../applications/editors/eclipse { });
+  eclipses = recurseIntoAttrs (
+    (callPackage ../applications/editors/eclipse { }).deepOverride {
+      cairo = cairo_1_12_2;
+    }
+  );
 
   ed = callPackage ../applications/editors/ed { };
 
@@ -6897,6 +6954,8 @@ let
 
   fossil = callPackage ../applications/version-management/fossil { };
 
+  fvwm = callPackage ../applications/window-managers/fvwm { };
+
   geany = callPackage ../applications/editors/geany { };
 
   goldendict = callPackage ../applications/misc/goldendict { };
@@ -7226,8 +7285,14 @@ let
 
   jack_capture = callPackage ../applications/audio/jack-capture { };
 
+  jack_oscrolloscope = callPackage ../applications/audio/jack-oscrolloscope { };
+
+  jack_rack = callPackage ../applications/audio/jack-rack { };
+
   jackmeter = callPackage ../applications/audio/jackmeter { };
 
+  jalv = callPackage ../applications/audio/jalv { };
+
   jedit = callPackage ../applications/editors/jedit { };
 
   jigdo = callPackage ../applications/misc/jigdo { };
@@ -7268,6 +7333,8 @@ let
     fftw = fftwSinglePrec;
   };
 
+  caps = callPackage ../applications/audio/caps { };
+
   lastwatch = callPackage ../applications/audio/lastwatch { };
 
   lci = callPackage ../applications/science/logic/lci {};
@@ -7392,6 +7459,9 @@ let
     inherit (gnome) libgnomecanvas;
   };
 
+  mopidy = callPackage ../applications/audio/mopidy { };
+  mopidy_git = callPackage ../applications/audio/mopidy/git.nix { };
+
   mozilla = callPackage ../applications/networking/browsers/mozilla {
     inherit (gnome) libIDL;
   };
@@ -7448,6 +7518,8 @@ let
 
   mupdf = callPackage ../applications/misc/mupdf { };
 
+  mypaint = callPackage ../applications/graphics/mypaint { };
+
   mythtv = callPackage ../applications/video/mythtv { };
 
   tvtime = callPackage ../applications/video/tvtime {
@@ -7676,7 +7748,9 @@ let
 
   sox = callPackage ../applications/misc/audio/sox { };
 
-  spotify = callPackage ../applications/audio/spotify { };
+  spotify = callPackage ../applications/audio/spotify {
+    inherit (gnome) GConf;
+  };
 
   libspotify = callPackage ../development/libraries/libspotify {
     apiKey = config.libspotify.apiKey or null;
@@ -7956,6 +8030,8 @@ let
 
   xcalib = callPackage ../tools/X11/xcalib { };
 
+  xchainkeys = callPackage ../tools/X11/xchainkeys { };
+
   xchat = callPackage ../applications/networking/irc/xchat { };
 
   xchm = callPackage ../applications/misc/xchm { };
@@ -8040,7 +8116,7 @@ let
 
   zathuraCollection = recurseIntoAttrs
     (let callPackage = newScope pkgs.zathuraCollection; in
-      import ../applications/misc/zathura { inherit callPackage pkgs; });
+      import ../applications/misc/zathura { inherit callPackage pkgs fetchurl; });
 
   zathura = zathuraCollection.zathuraWrapper;
 
@@ -8102,9 +8178,13 @@ let
 
   crrcsim = callPackage ../games/crrcsim {};
 
+  drumkv1 = callPackage ../applications/audio/drumkv1 { };
+
   dwarf_fortress = callPackage_i686 ../games/dwarf-fortress { };
 
-  eduke32 = callPackage ../games/eduke32 { };
+  eduke32 = callPackage ../games/eduke32 {
+    stdenv = overrideGCC stdenv gcc47;
+  };
 
   egoboo = callPackage ../games/egoboo { };
 
@@ -8208,6 +8288,8 @@ let
 
   rogue = callPackage ../games/rogue { };
 
+  samplv1 = callPackage ../applications/audio/samplv1 { };
+
   sauerbraten = callPackage ../games/sauerbraten {};
 
   scid = callPackage ../games/scid { };
@@ -8240,6 +8322,8 @@ let
 
   superTuxKart = callPackage ../games/super-tux-kart { };
 
+  synthv1 = callPackage ../applications/audio/synthv1 { };
+
   tbe = callPackage ../games/the-butterfly-effect {};
 
   teetertorture = callPackage ../games/teetertorture { };
@@ -8485,12 +8569,8 @@ let
 
   oxygen_gtk = callPackage ../misc/themes/gtk2/oxygen-gtk { };
 
-  xfce = xfce48;
-
-  xfce48 = recurseIntoAttrs
-    (let callPackage = newScope pkgs.xfce48; in
-     import ../desktops/xfce-4.8 { inherit callPackage pkgs; });
-
+  xfce = xfce4_10;
+  xfce4_10 = recurseIntoAttrs (import ../desktops/xfce { inherit pkgs newScope; });
 
   ### SCIENCE
 
@@ -8814,10 +8894,14 @@ let
     stateDir = config.nix.stateDir or "/nix/var";
   };
 
+  nixUnstable = nixStable;
+
+  /*
   nixUnstable = callPackage ../tools/package-management/nix/unstable.nix {
     storeDir = config.nix.storeDir or "/nix/store";
     stateDir = config.nix.stateDir or "/nix/var";
   };
+  */
 
   nut = callPackage ../applications/misc/nut { };
 
diff --git a/pkgs/top-level/haskell-defaults.nix b/pkgs/top-level/haskell-defaults.nix
index f99e790de94..e7e206e2266 100644
--- a/pkgs/top-level/haskell-defaults.nix
+++ b/pkgs/top-level/haskell-defaults.nix
@@ -52,7 +52,7 @@
       cabalInstall_0_14_0 = self.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; };
       cabalInstall_1_16_0_2 = self.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; };
       monadPar = self.monadPar_0_1_0_3;
-      jailbreakCabal = self.jailbreakCabal.override { Cabal = self.Cabal_1_14_0; };
+      jailbreakCabal = self.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
     };
 
   ghc703Prefs =
@@ -61,7 +61,7 @@
       cabalInstall_0_14_0 = self.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; zlib = self.zlib_0_5_3_3; };
       cabalInstall_1_16_0_2 = self.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; zlib = self.zlib_0_5_3_3; };
       monadPar = self.monadPar_0_1_0_3;
-      jailbreakCabal = self.jailbreakCabal.override { Cabal = self.Cabal_1_14_0; };
+      jailbreakCabal = self.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
     };
 
   ghc702Prefs = ghc701Prefs;
@@ -72,7 +72,7 @@
       cabalInstall_0_14_0 = self.cabalInstall_0_14_0.override { Cabal = self.Cabal_1_14_0; zlib = self.zlib_0_5_3_3; };
       cabalInstall_1_16_0_2 = self.cabalInstall_1_16_0_2.override { Cabal = self.Cabal_1_16_0_3; zlib = self.zlib_0_5_3_3; };
       monadPar = self.monadPar_0_1_0_3;
-      jailbreakCabal = self.jailbreakCabal.override { Cabal = self.Cabal_1_14_0; };
+      jailbreakCabal = self.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
     };
 
   ghc6123Prefs = ghc6122Prefs;
@@ -84,8 +84,8 @@
       monadPar = self.monadPar_0_1_0_3;
       deepseq = self.deepseq_1_1_0_2;
       # deviating from Haskell platform here, to make some packages (notably statistics) compile
-      jailbreakCabal = self.jailbreakCabal.override { Cabal = self.Cabal_1_14_0; };
-      cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_14_0; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
+      jailbreakCabal = self.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
+      cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
     };
 
   ghc6121Prefs =
@@ -95,9 +95,9 @@
       extensibleExceptions = self.extensibleExceptions_0_1_1_0;
       deepseq = self.deepseq_1_1_0_2;
       monadPar = self.monadPar_0_1_0_3;
-      jailbreakCabal = self.jailbreakCabal.override { Cabal = self.Cabal_1_14_0; };
-      cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_14_0; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
       # deviating from Haskell platform here, to make some packages (notably statistics) compile
+      jailbreakCabal = self.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
+      cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
     };
 
   ghc6104Prefs =
@@ -109,9 +109,9 @@
       text = self.text_0_11_0_6;
       deepseq = self.deepseq_1_1_0_2;
       monadPar = self.monadPar_0_1_0_3;
-      jailbreakCabal = self.jailbreakCabal.override { Cabal = self.Cabal_1_14_0; };
-      cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_14_0; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
       # deviating from Haskell platform here, to make some packages (notably statistics) compile
+      jailbreakCabal = self.jailbreakCabal.override { Cabal = self.disableTest self.Cabal_1_14_0; };
+      cabal2nix = self.cabal2nix.override { Cabal = self.Cabal_1_16_0_3; hackageDb = self.hackageDb.override { Cabal = self.Cabal_1_16_0_3; }; };
     };
 
   # Abstraction for Haskell packages collections
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 273cd940316..4ffd314f3c9 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -106,6 +106,18 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
     enableLibraryProfiling = enableLibraryProfiling;
   };
 
+  # A variant of the cabal build driver that disables unit testing.
+  # Useful for breaking cycles, where the unit test of a package A
+  # depends on package B, which has A as a regular build input.
+  cabalNoTest = {
+    mkDerivation = x: rec {
+      final = self.cabal.mkDerivation (self: (x final) // { doCheck = false; });
+    }.final;
+  };
+
+  # Convenience helper function.
+  disableTest = x: x.override { cabal = self.cabalNoTest; };
+
   # Haskell Platform
   #
   # We try to support several platform versions. For these, we set all
@@ -133,21 +145,21 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
     OpenGL       = self.OpenGL_2_6_0_1;         # 7.6 ok
     parallel     = self.parallel_3_2_0_3;       # 7.6 ok
     parsec       = self.parsec_3_1_3;           # 7.6 ok
-    QuickCheck   = self.QuickCheck_2_5_1_1;     # 7.6 ok
+    QuickCheck   = self.QuickCheck_2_6;         # 7.6 ok
     random       = self.random_1_0_1_1;         # 7.6 ok
     regexBase    = self.regexBase_0_93_2;       # 7.6 ok
     regexCompat  = self.regexCompat_0_95_1;     # 7.6 ok
     regexPosix   = self.regexPosix_0_95_2;      # 7.6 ok
     split        = self.split_0_2_1_2;          # 7.6 ok
     stm          = self.stm_2_4_2;              # 7.6 ok
-    syb          = self.syb_0_3_7;              # 7.6 ok
+    syb          = self.syb_0_4_0;              # 7.6 ok
     text         = self.text_0_11_2_3;          # 7.6 ok
     transformers = self.transformers_0_3_0_0;   # 7.6 ok
     vector       = self.vector_0_10_0_1;        # 7.6 ok
     xhtml        = self.xhtml_3000_2_1;         # 7.6 ok
-    zlib         = self.zlib_0_5_4_0;           # 7.6 ok
+    zlib         = self.zlib_0_5_4_1;           # 7.6 ok
     cabalInstall = self.cabalInstall_1_16_0_2;  # 7.6 ok
-    alex         = self.alex_3_0_4;             # 7.6 ok
+    alex         = self.alex_3_0_5;             # 7.6 ok
     haddock      = self.haddock_2_13_1;         # 7.6 ok
     happy        = self.happy_1_18_10;          # 7.6 ok
     primitive    = self.primitive_0_5_0_1; # semi-official, but specified
@@ -618,6 +630,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
 
   configurator = callPackage ../development/libraries/haskell/configurator {};
 
+  constraints = callPackage ../development/libraries/haskell/constraints {};
+
   convertible = callPackage ../development/libraries/haskell/convertible {};
 
   continuedFractions = callPackage ../development/libraries/haskell/continued-fractions {};
@@ -871,6 +885,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
 
   gio = callPackage ../development/libraries/haskell/gio {};
 
+  github = callPackage ../development/libraries/haskell/github {};
+
   gitit = callPackage ../development/libraries/haskell/gitit {};
 
   glade = callPackage ../development/libraries/haskell/glade {
@@ -1466,8 +1482,9 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
   QuickCheck_2_4_1_1 = callPackage ../development/libraries/haskell/QuickCheck/2.4.1.1.nix {};
   QuickCheck_2_4_2 = callPackage ../development/libraries/haskell/QuickCheck/2.4.2.nix {};
   QuickCheck_2_5_1_1 = callPackage ../development/libraries/haskell/QuickCheck/2.5.1.1.nix {};
+  QuickCheck_2_6 = callPackage ../development/libraries/haskell/QuickCheck/2.6.nix {};
   QuickCheck1 = self.QuickCheck_1_2_0_1;
-  QuickCheck2 = self.QuickCheck_2_5_1_1;
+  QuickCheck2 = self.QuickCheck_2_6;
   QuickCheck  = self.QuickCheck2;
 
   RangedSets = callPackage ../development/libraries/haskell/Ranged-sets {};
@@ -1550,8 +1567,6 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
 
   safe = callPackage ../development/libraries/haskell/safe {};
 
-  Safe = callPackage ../development/libraries/haskell/Safe {};
-
   SafeSemaphore = callPackage ../development/libraries/haskell/SafeSemaphore {};
 
   sendfile = callPackage ../development/libraries/haskell/sendfile {};
@@ -1620,6 +1635,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
   syb_0_3_6_1 = callPackage ../development/libraries/haskell/syb/0.3.6.1.nix {};
   syb_0_3_6_2 = callPackage ../development/libraries/haskell/syb/0.3.6.2.nix {};
   syb_0_3_7 = callPackage ../development/libraries/haskell/syb/0.3.7.nix {};
+  syb_0_4_0 = callPackage ../development/libraries/haskell/syb/0.4.0.nix {};
   syb = null;  # by default, we assume that syb ships with GHC, which is
                # true for the older GHC versions
 
@@ -1639,6 +1655,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
 
   SHA = callPackage ../development/libraries/haskell/SHA {};
 
+  shake = callPackage ../development/libraries/haskell/shake {};
+
   shakespeare = callPackage ../development/libraries/haskell/shakespeare {};
 
   shakespeareCss = callPackage ../development/libraries/haskell/shakespeare-css {};
@@ -1863,6 +1881,12 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
 
   CouchDB = callPackage ../development/libraries/haskell/CouchDB {};
 
+  wlPprint = callPackage ../development/libraries/haskell/wl-pprint {};
+
+  wlPprintExtras = callPackage ../development/libraries/haskell/wl-pprint-extras {};
+
+  wlPprintTerminfo = callPackage ../development/libraries/haskell/wl-pprint-terminfo {};
+
   wlPprintText = callPackage ../development/libraries/haskell/wl-pprint-text {};
 
   word8 = callPackage ../development/libraries/haskell/word8 {};
@@ -1956,7 +1980,10 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
   zlib_0_5_4_0 = callPackage ../development/libraries/haskell/zlib/0.5.4.0.nix {
     inherit (pkgs) zlib;
   };
-  zlib = self.zlib_0_5_4_0;
+  zlib_0_5_4_1 = callPackage ../development/libraries/haskell/zlib/0.5.4.1.nix {
+    inherit (pkgs) zlib;
+  };
+  zlib = self.zlib_0_5_4_1;
 
   zlibBindings = callPackage ../development/libraries/haskell/zlib-bindings {};
 
@@ -1988,8 +2015,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
   alex_2_3_5 = callPackage ../development/tools/parsing/alex/2.3.5.nix {};
   alex_3_0_1 = callPackage ../development/tools/parsing/alex/3.0.1.nix {};
   alex_3_0_2 = callPackage ../development/tools/parsing/alex/3.0.2.nix {};
-  alex_3_0_4 = callPackage ../development/tools/parsing/alex/3.0.4.nix {};
-  alex = self.alex_3_0_4;
+  alex_3_0_5 = callPackage ../development/tools/parsing/alex/3.0.5.nix {};
+  alex = self.alex_3_0_5;
 
   alexMeta = callPackage ../development/tools/haskell/alex-meta {};
 
@@ -2077,12 +2104,16 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y);
   cabalInstall_1_16_0_2 = callPackage ../tools/package-management/cabal-install/1.16.0.2.nix {};
   cabalInstall = self.cabalInstall_1_16_0_2;
 
+  githubBackup = callPackage ../applications/version-management/git-and-tools/github-backup {};
+
   jailbreakCabal = callPackage ../development/tools/haskell/jailbreak-cabal {};
 
   lhs2tex = callPackage ../tools/typesetting/lhs2tex {};
 
   myhasktags = callPackage ../tools/misc/myhasktags {};
 
+  packunused = callPackage ../development/tools/haskell/packunused {};
+
   splot = callPackage ../development/tools/haskell/splot {};
 
   timeplot = callPackage ../development/tools/haskell/timeplot {};
diff --git a/pkgs/top-level/node-packages.nix b/pkgs/top-level/node-packages.nix
index 083fb573087..db5b672a599 100644
--- a/pkgs/top-level/node-packages.nix
+++ b/pkgs/top-level/node-packages.nix
@@ -17,10 +17,10 @@ let self = {
   "abbrev" = self."abbrev-1";
 
   "abbrev-1" = self.buildNodePackage rec {
-    name = "abbrev-1.0.3";
+    name = "abbrev-1.0.4";
     src = fetchurl {
       url = "http://registry.npmjs.org/abbrev/-/${name}.tgz";
-      sha256 = "d444c07f411418828a5e81ac85569afe638e6441a562086faa0209ec7bdf55f2";
+      sha256 = "8dc0f480571a4a19e74f1abd4f31f6a70f94953d1ccafa16ed1a544a19a6f3a8";
     };
     deps = [
 
@@ -40,6 +40,21 @@ let self = {
     ];
   };
 
+  amdefine = "amdefine-0.0.4";
+
+  "amdefine->=0.0.4" = self."amdefine-0.0.4";
+  
+  "amdefine-0.0.4" = self.buildNodePackage rec {
+    name = "amdefine-0.0.4";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/amdefine/-/${name}.tgz";
+      sha256 = "10sdb85mb6fvkglqwg7icdh58sng9pm8655npmsbv18gsbcnmbg4";
+    };
+    deps = [
+
+    ];
+  };
+
   "ansi" = self."ansi-~0.1.2";
 
   "ansi-~0.1.2" = self.buildNodePackage rec {
@@ -53,6 +68,19 @@ let self = {
     ];
   };
 
+  "asn1" = self."asn1-0.1.11";
+
+  "asn1-0.1.11" = self.buildNodePackage rec {
+    name = "asn1-0.1.11";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/asn1/-/${name}.tgz";
+      sha256 = "7206eadc8a9344e484bcce979e22a12c9fa64c1395aa0544b8b767808b268f43";
+    };
+    deps = [
+
+    ];
+  };
+
   "async" = self."async-0.1.22";
 
   "async-0.1.22" = self.buildNodePackage rec {
@@ -148,6 +176,32 @@ let self = {
     ];
   };
 
+  "bunyan" = self."bunyan-0.8.0";
+
+  "bunyan-0.8.0" = self.buildNodePackage rec {
+    name = "bunyan-0.8.0";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/bunyan/-/${name}.tgz";
+      sha256 = "059b8948dd34d371d39aa87227d26d62180c365afeb6625c07187c8f0ad29f27";
+    };
+    deps = [
+
+    ];
+  };
+
+  "byline" = self."byline-2.0.2";
+
+  "byline-2.0.2" = self.buildNodePackage rec {
+    name = "byline-2.0.2";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/byline/-/${name}.tgz";
+      sha256 = "a916ffde5ee385f7d682c13028907a96fe33cdeed6d72cea903d09fb154dae50";
+    };
+    deps = [
+
+    ];
+  };
+
   "bytes" = self."bytes-0.1.0";
 
   "bytes-0.1.0" = self.buildNodePackage rec {
@@ -299,6 +353,30 @@ let self = {
     ];
   };
 
+  "ctype" = self."ctype->=0.0.2";
+
+  "ctype->=0.0.2" = self.buildNodePackage rec {
+    name = "ctype-0.5.2";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/ctype/-/${name}.tgz";
+      sha256 = "4a7224a74f19dc6a1206fa1c04ae1a4ab795cd4ba842466e2f511fa714f82c60";
+    };
+    deps = [
+
+    ];
+  };
+
+  "ctype-0.5.0" = self.buildNodePackage rec {
+    name = "ctype-0.5.0";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/ctype/-/${name}.tgz";
+      sha256 = "50157e6c5e44d1c833bfc239a7a337ee08fd6f3c5a15f7ef5cee5571a86b0378";
+    };
+    deps = [
+
+    ];
+  };
+
   "datetime" = self."datetime-0.0.3";
 
   "datetime-0.0.3" = self.buildNodePackage rec {
@@ -338,6 +416,19 @@ let self = {
     ];
   };
 
+  "dtrace-provider" = self."dtrace-provider-0.0.6";
+
+  "dtrace-provider-0.0.6" = self.buildNodePackage rec {
+    name = "dtrace-provider-0.0.6";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/dtrace-provider/-/${name}.tgz";
+      sha256 = "ce48363aefa9e8afb3c8e8e5ce8d321a5d5a7eecbb28eaa997c48c5e9d502508";
+    };
+    deps = [
+
+    ];
+  };
+
   "escape-html" = self."escape-html-0.0.1";
 
   "escape-html-0.0.1" = self.buildNodePackage rec {
@@ -478,6 +569,20 @@ let self = {
     ];
   };
 
+  "http-signature" = self."http-signature-0.9.9";
+
+  "http-signature-0.9.9" = self.buildNodePackage rec {
+    name = "http-signature-0.9.9";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/http-signature/-/${name}.tgz";
+      sha256 = "c1e193f1195028f2cc8a8f402c7755fc215552a81f6bebbdf6f21de9390a438e";
+    };
+    deps = [
+      self."asn1-0.1.11"
+      self."ctype-0.5.0"
+    ];
+  };
+
   "inherits" = self."inherits-1.0.0";
   "inherits-1" = self."inherits-1.0.0";
   "inherits-1.x" = self."inherits-1.0.0";
@@ -535,6 +640,17 @@ let self = {
 
   "lru-cache" = self."lru-cache-~2.0.0";
 
+  "lru-cache-1.1.0" = self.buildNodePackage rec {
+    name = "lru-cache-1.1.0";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/lru-cache/-/${name}.tgz";
+      sha256 = "735898f87ba800d6f2f3517ab92b631f03976c9d3fbaedb6ce357cfe3813ee8b";
+    };
+    deps = [
+
+    ];
+  };
+
   "lru-cache-~2.0.0" = self.buildNodePackage rec {
     name = "lru-cache-2.0.1";
     src = fetchurl {
@@ -550,6 +666,17 @@ let self = {
 
   "mime->= 0.0.1" = self."mime-*";
 
+  "mime-1.2.5" = self.buildNodePackage rec {
+    name = "mime-1.2.5";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/mime/-/${name}.tgz";
+      sha256 = "ccf05a6c47146e8acb9d0671eee09d2eb077cf9ddd1f7e8eccf49dbf969d6c72";
+    };
+    deps = [
+
+    ];
+  };
+
   "mime-1.2.6" = self.buildNodePackage rec {
     name = "mime-1.2.6";
     src = fetchurl {
@@ -624,6 +751,19 @@ let self = {
     ];
   };
 
+  "nijs" = self."nijs-0.0.4";
+
+  "nijs-0.0.4" = self.buildNodePackage rec {
+    name = "nijs-0.0.4";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/nijs/-/${name}.tgz";
+      sha256 = "0hr7chc4wrynq5mlakchx3p715i50ycakbqj4jcngx62wk9l42qd";
+    };
+    deps = [
+      self."optparse"
+    ];
+  };
+
   "node-expat" = self."node-expat-*";
 
   "node-expat-*" = self.buildNodePackage rec {
@@ -678,6 +818,17 @@ let self = {
 
   "nopt" = self."nopt-2";
 
+  "nopt-1.0.10" = self.buildNodePackage rec {
+    name = "nopt-1.0.10";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/nopt/-/${name}.tgz";
+      sha256 = "426562943bfbbfc059eac83575ade5b78c6c01e5c1000a90a7defecfe2334927";
+    };
+    deps = [
+      self."abbrev-1"
+    ];
+  };
+
   "nopt-2" = self.buildNodePackage rec {
     name = "nopt-2.0.0";
     src = fetchurl {
@@ -718,11 +869,14 @@ let self = {
 
   "optimist" = self."optimist-*";
 
-  "optimist-*" = self.buildNodePackage rec {
-    name = "optimist-0.3.4";
+  "optimist-*" = self."optimist-0.3.5";
+  "optimist-~0.3.5" = self."optimist-0.3.5";
+
+  "optimist-0.3.5" = self.buildNodePackage rec {
+    name = "optimist-0.3.5";
     src = fetchurl {
       url = "http://registry.npmjs.org/optimist/-/${name}.tgz";
-      sha256 = "add88b473a660ad8a9ff88a3eec49a74d9c64f592acbcd219ff4c0d7249f4d60";
+      sha256 = "17d06n3y9difknq9j340qksj2zllal6sg0pj4clj9ja5jxf721x4";
     };
     deps = [
       self."wordwrap-~0.0.2"
@@ -911,6 +1065,43 @@ let self = {
     ];
   };
 
+  "restify" = self."restify-1.4.3";
+
+  "restify-1.4.3" = self.buildNodePackage rec {
+    name = "restify-1.4.3";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/restify/-/${name}.tgz";
+      sha256 = "7c95b1e58d6effab3b947409892a20260b6d1142aefec9c3eb1e46165363d64e";
+    };
+    deps = [
+      self."async-0.1.22"
+      self."bunyan-0.8.0"
+      self."byline-2.0.2"
+      self."formidable-1.0.11"
+      self."dtrace-provider-0.0.6"
+      self."http-signature-0.9.9"
+      self."lru-cache-1.1.0"
+      self."mime-1.2.5"
+      self."node-uuid-1.3.3"
+      self."qs-0.5.0"
+      self."retry-0.6.0"
+      self."semver-1.0.14"
+    ];
+  };
+
+  "retry" = self."retry-0.6.0";
+
+  "retry-0.6.0" = self.buildNodePackage rec {
+    name = "retry-0.6.0";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/retry/-/${name}.tgz";
+      sha256 = "983e676af24ff4dcbac396420fca3c195ce3b1de5f731f697888b4fe6b7bbd2a";
+    };
+    deps = [
+
+    ];
+  };
+
   "rimraf" = self."rimraf-2";
 
   "rimraf-2" = self.buildNodePackage rec {
@@ -926,7 +1117,9 @@ let self = {
 
   "semver" = self."semver-1";
 
-  "semver-1" = self.buildNodePackage rec {
+  "semver-1" = self."semver-1.0.14";
+
+  "semver-1.0.14" = self.buildNodePackage rec {
     name = "semver-1.0.14";
     src = fetchurl {
       url = "http://registry.npmjs.org/semver/-/${name}.tgz";
@@ -966,6 +1159,37 @@ let self = {
     ];
   };
 
+  "smartdc" = self."smartdc-*";
+
+  "smartdc-*" = self.buildNodePackage rec {
+    name = "smartdc-6.5.6";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/smartdc/-/${name}.tgz";
+      sha256 = "a5d7ba965a863a411b52f0321a9fa1be350cb6af807175beb16529e4282dff4d";
+    };
+    deps = [
+      self."http-signature-0.9.9"
+      self."lru-cache-1.1.0"
+      self."nopt-1.0.10"
+      self."restify-1.4.3"
+      self."bunyan-0.8.0"
+      self."ssh-agent-0.1.0"
+    ];
+  };
+
+  "ssh-agent" = self."ssh-agent-0.1.0";
+
+  "ssh-agent-0.1.0" = self.buildNodePackage rec {
+    name = "ssh-agent-0.1.0";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/ssh-agent/-/${name}.tgz";
+      sha256 = "62860d09a84d0bf1250d8c90aae3d0a922a7812591a9f4243330178774eb87b5";
+    };
+    deps = [
+      self."ctype->=0.0.2"
+    ];
+  };
+
   "socket.io" = self."socket.io-0.9.6";
 
   "socket.io-0.9.6" = self.buildNodePackage rec {
@@ -1012,7 +1236,20 @@ let self = {
     ];
   };
 
-  "source-map" = self."source-map-0.1.2";
+  "source-map" = self."source-map-0.1.7";
+
+  "source-map-~0.1.7" = self."source-map-0.1.7";
+
+  "source-map-0.1.7" = self.buildNodePackage rec {
+    name = "source-map-0.1.7";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/source-map/-/${name}.tgz";
+      sha256 = "041skhq60kwpx319iy0m33zcgc7q2ddlfl3vvmwl5ssl9p46g8x2";
+    };
+    deps = [
+      self."amdefine->=0.0.4"
+    ];
+  };
 
   "source-map-0.1.2" = self.buildNodePackage rec {
     name = "source-map-0.1.2";
@@ -1092,7 +1329,19 @@ let self = {
     ];
   };
 
-  "uglify-js" = self."uglify-js-1.2.6";
+  "uglify-js" = self."uglify-js-2.2.5";
+
+  "uglify-js-2.2.5" = self.buildNodePackage rec {
+    name = "uglify-js-2.2.5";
+    src = fetchurl {
+      url = "http://registry.npmjs.org/uglify-js/-/${name}.tgz";
+      sha256 = "18ic581gjyvfl4gvlcdmzw4vrcbvn698i2rznnba70f8lk6ndlgr";
+    };
+    deps = [
+      self."source-map-~0.1.7"
+      self."optimist-~0.3.5"
+    ];
+  };
 
   "uglify-js-1.2.5" = self.buildNodePackage rec {
     name = "uglify-js-1.2.5";
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index a51abf44ff2..1110bd14e42 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -335,6 +335,19 @@ rec {
       [ CatalystRuntime HTTPRequestAsCGI DataVisitor MROCompat ];
   };
 
+  CatalystActionREST = buildPerlPackage {
+    name = "Catalyst-Action-REST-1.06";
+    src = fetchurl {
+      url = mirror://cpan/authors/id/B/BO/BOBTFISH/Catalyst-Action-REST-1.06.tar.gz;
+      sha256 = "0z72cf8zgmwmcqlhkawz9fikc0g44972sidfs16x7rwdhzavd01k";
+    };
+    propagatedBuildInputs = [ CatalystRuntime ClassInspector ConfigGeneral DataSerializer DataTaxi FreezeThaw HTMLParser JSONXS LWPUserAgent Moose MROCompat namespaceautoclean ParamsValidate PHPSerialization URIFind XMLSimple YAMLSyck ];
+    meta = {
+      description = "Automated REST Method Dispatching";
+      license = "perl";
+    };
+  };
+
   CatalystAuthenticationStoreHtpasswd = buildPerlPackage rec {
     name = "Catalyst-Authentication-Store-Htpasswd-1.003";
     src = fetchurl {
@@ -510,6 +523,18 @@ rec {
     };
   };
 
+  CatalystPluginCaptcha = buildPerlPackage {
+    name = "Catalyst-Plugin-Captcha-0.04";
+    src = fetchurl {
+      url = mirror://cpan/authors/id/D/DI/DIEGOK/Catalyst-Plugin-Captcha-0.04.tar.gz;
+      sha256 = "0llyj3v5nx9cx46jdbbvxf1lc9s9cxq5ml22xmx3wkb201r5qgaa";
+    };
+    propagatedBuildInputs = [ CatalystRuntime CatalystPluginSession GDSecurityImage HTTPDate ];
+    meta = {
+      description = "Create and validate Captcha for Catalyst";
+    };
+  };
+
   CatalystPluginConfigLoader = buildPerlPackage rec {
     name = "Catalyst-Plugin-ConfigLoader-0.30";
     src = fetchurl {
@@ -590,6 +615,7 @@ rec {
       url = mirror://cpan/authors/id/A/AB/ABRAXXA/Catalyst-Plugin-Static-Simple-0.30.tar.gz;
       sha256 = "18zar1n4imgnv7b4dr5sxyikry4668ngqgc6f0dr210bqafvwv7w";
     };
+    patches = [ ../development/perl-modules/catalyst-plugin-static-simple-etag.patch ];
     propagatedBuildInputs = [ CatalystRuntime MIMETypes Moose MooseXTypes namespaceautoclean ];
     meta = {
       description = "Make serving static pages painless";
@@ -655,6 +681,7 @@ rec {
     meta = {
       description = "Replace the development server with Starman";
       license = "perl";
+      platforms = stdenv.lib.platforms.linux;
     };
   };
 
@@ -823,6 +850,14 @@ rec {
     };
   };
 
+  ClassISA = buildPerlPackage {
+    name = "Class-ISA-0.36";
+    src = fetchurl {
+      url = mirror://cpan/authors/id/S/SM/SMUELLER/Class-ISA-0.36.tar.gz;
+      sha256 = "0r5r574i6wgxm8zsq4bc34d0dzprrh6h6mpp1nhlks1qk97g65l8";
+    };
+  };
+
   ClassMakeMethods = buildPerlPackage rec {
     name = "Class-MakeMethods-1.009";
     src = fetchurl {
@@ -1309,6 +1344,27 @@ rec {
     propagatedBuildInputs = [TestException ClassAccessorChained];
   };
 
+  DataSerializer = buildPerlPackage {
+    name = "Data-Serializer-0.59";
+    src = fetchurl {
+      url = mirror://cpan/authors/id/N/NE/NEELY/Data-Serializer-0.59.tar.gz;
+      sha256 = "1mydpbacrkirafcjxcg1c0gnls1kxiv0qvdd4q2yd6vsyay0ayqr";
+    };
+    meta = {
+      description = "Modules that serialize data structures";
+      license = "perl";
+    };
+  };
+
+  DataTaxi = buildPerlPackage {
+    name = "Data-Taxi-0.96";
+    propagatedBuildInputs = [DebugShowStuff];
+    src = fetchurl {
+      url = mirror://cpan/authors/id/M/MI/MIKO/Data-Taxi-0.96.tar.gz;
+      sha256 = "0y4wls4jlwd6prvd77szymddhq9sfj06kaqnk4frlvd0zh83djxb";
+    };
+  };
+
   DataUUID = buildPerlPackage rec {
     name = "Data-UUID-1.217";
     src = fetchurl {
@@ -1414,6 +1470,19 @@ rec {
     propagatedBuildInputs = [ ClassLoad ClassSingleton ParamsValidate TryTiny ];
   };
 
+  DebugShowStuff = buildPerlPackage {
+    name = "Debug-ShowStuff-1.14";
+    src = fetchurl {
+      url = mirror://cpan/authors/id/M/MI/MIKO/Debug-ShowStuff-1.14.tar.gz;
+      sha256 = "023c6f7y93k9qxxfa2fsvc5jkbv3rh6i3nw6zvxa5cg57xfypd7h";
+    };
+    propagatedBuildInputs = [ ClassISA DevelStackTrace StringUtil TermReadKey TextTabularDisplay TieIxHash ];
+    meta = {
+      description = "Debug::ShowStuff - A collection of handy debugging routines for displaying the values of variables with a minimum of coding.";
+      license = "perl";
+    };
+  };
+
   DevelCaller = buildPerlPackage {
     name = "Devel-Caller-2.06";
     src = fetchurl {
@@ -1749,10 +1818,10 @@ rec {
   };
 
   Error = buildPerlPackage rec {
-    name = "Error-0.17016";
+    name = "Error-0.17019";
     src = fetchurl {
       url = "mirror://cpan/authors/id/S/SH/SHLOMIF/${name}.tar.gz";
-      sha256 = "1akr35g7nbhch8fgkrqixjy08gx19brp981wyxplscizwcya64zh";
+      sha256 = "0m09jwjs2x8j50bh3cg3m2mbxa7qh9i2krgq7z8h1pgl5dscyg2i";
     };
   };
 
@@ -1984,6 +2053,7 @@ rec {
       url = mirror://cpan/authors/id/I/IL/ILYAZ/modules/FreezeThaw-0.43.tar.gz;
       sha256 = "1qamc5aggp35xk590a4hy660f2rhc2l7j65hbyxdya9yvg7z437l";
     };
+    doCheck = false;
   };
 
   GD = buildPerlPackage rec {
@@ -2011,6 +2081,19 @@ rec {
     makeMakerFlags = "--lib_png_path=${pkgs.libpng} --lib_jpeg_path=${pkgs.libjpeg} --lib_zlib_path=${pkgs.zlib} --lib_ft_path=${pkgs.freetype} --lib_fontconfig_path=${pkgs.fontconfig} --lib_xpm_path=${pkgs.xlibs.libXpm}";
   };
 
+  GDSecurityImage = buildPerlPackage {
+    name = "GD-SecurityImage-1.72";
+    src = fetchurl {
+      url = mirror://cpan/authors/id/B/BU/BURAK/GD-SecurityImage-1.72.tar.gz;
+      sha256 = "07a025krdaml5ls7gyssfdcsif6cnsnksrxkqk48n9dmv7rz7q1r";
+    };
+    propagatedBuildInputs = [ GD ];
+    meta = {
+      description = "Security image (captcha) generator";
+      license = "perl5";
+    };
+  };
+
   GeoIP = buildPerlPackage rec {
     name = "Geo-IP-1.39";
     src = fetchurl {
@@ -2948,10 +3031,14 @@ rec {
   };
 
   ModuleFind = buildPerlPackage {
-    name = "Module-Find-0.06";
+    name = "Module-Find-0.11";
     src = fetchurl {
-      url = mirror://cpan/authors/id/C/CR/CRENZ/Module-Find-0.06.tar.gz;
-      sha256 = "1394jk0rn2zmchpl11kim69xh5h5yzg96jdlf76fqrk3dcn0y2ip";
+      url = mirror://cpan/authors/id/C/CR/CRENZ/Module-Find-0.11.tar.gz;
+      sha256 = "15ykcwplbqh5hc0fw4cx6g0f22zr0hrfkdkv1s34n9yg574dq3b5";
+    };
+    meta = {
+      description = "Find and use installed modules in a (sub)category";
+      license = "perl";
     };
   };
 
@@ -3810,6 +3897,18 @@ rec {
     };
   };
 
+  PHPSerialization = buildPerlPackage {
+    name = "PHP-Serialization-0.34";
+    src = fetchurl {
+      url = mirror://cpan/authors/id/B/BO/BOBTFISH/PHP-Serialization-0.34.tar.gz;
+      sha256 = "0yphqsgg7zrar2ywk2j2fnjxmi9rq32yf0p5ln8m9fmfx4kd84mr";
+    };
+    meta = {
+      description = "Simple flexible means of converting the output of PHP's serialize() into the equivalent Perl memory structure, and vice versa.";
+      license = "unknown";
+    };
+  };
+
   Plack = buildPerlPackage {
     name = "Plack-1.0015";
     src = fetchurl {
@@ -4278,6 +4377,18 @@ rec {
       [ LinguaENInflectPhrase TextUnidecode namespaceclean ];
   };
 
+  StringUtil = buildPerlPackage {
+    name = "String-Util-1.21";
+    src = fetchurl {
+      url = mirror://cpan/authors/id/M/MI/MIKO/String-Util-1.21.tar.gz;
+      sha256 = "1ndvm9pbngf1j0fm02ghl4nfcqi5404sxdlm42g3ismf1ms1fnxa";
+    };
+    meta = {
+      description = "String::Util -- String processing utilities";
+      license = "perl";
+    };
+  };
+
   SubExporter = buildPerlPackage {
     name = "Sub-Exporter-0.984";
     src = fetchurl {
@@ -4812,18 +4923,18 @@ rec {
     };
   };
 
-  TestWWWMechanizeCatalyst = buildPerlPackage rec {
-    name = "Test-WWW-Mechanize-Catalyst-0.55";
+  TestWWWMechanizeCatalyst = buildPerlPackage {
+    name = "Test-WWW-Mechanize-Catalyst-0.58";
     src = fetchurl {
-      url = "mirror://cpan/modules/by-module/Test/${name}.tar.gz";
-      sha256 = "0zdg4sxx231dj3qgbr58i63927gl4qzh0krignqxp8q6ck3hr63f";
+      url = mirror://cpan/authors/id/B/BO/BOBTFISH/Test-WWW-Mechanize-Catalyst-0.58.tar.gz;
+      sha256 = "1pa2m064skxfwsm93hffxcyky4kcn2q418vnw2fn79ich6wrcijd";
     };
-    propagatedBuildInputs =
-      [ CatalystRuntime TestWWWMechanize WWWMechanize
-        CatalystPluginSessionStateCookie HTMLForm
-      ];
-    buildInputs = [ TestPod ];
     doCheck = false; # listens on an external port
+    propagatedBuildInputs = [ CatalystRuntime LWP Moose namespaceclean TestWWWMechanize WWWMechanize ];
+    meta = {
+      description = "Test::WWW::Mechanize for Catalyst";
+      license = "perl";
+    };
   };
 
   TestWWWMechanizePSGI = buildPerlPackage {
@@ -5105,6 +5216,20 @@ rec {
     };
   };
 
+  URIFind = buildPerlModule {
+    name = "URI-Find-20111103";
+    src = fetchurl {
+      url = mirror://cpan/authors/id/M/MS/MSCHWERN/URI-Find-20111103.tar.gz;
+      sha256 = "1igbbj14j5fssdqrbr60mg3w95wldfxdikplqdmqgf2zn5j65ibr";
+    };
+    propagatedBuildInputs = [ URI URIURL ];
+    meta = {
+      homepage = http://search.cpan.org/dist/URI-Find;
+      description = "Find URIs in arbitrary text";
+      license = "perl5";
+    };
+  };
+
   UriGoogleChart = buildPerlPackage rec {
     name = "URI-GoogleChart-1.02";
     src = fetchurl {
@@ -5114,6 +5239,18 @@ rec {
     buildInputs = [URI TestMore];
   };
 
+  URIURL = buildPerlPackage {
+    name = "URI-URL-5.04";
+    src = fetchurl {
+      url = mirror://cpan/authors/id/G/GA/GAAS/URI-1.60.tar.gz;
+      sha256 = "0xr31mf7lfrwhyvlx4pzp6p7alls5gi4bj8pk5g89f5cckfd74hz";
+    };
+    meta = {
+      description = "Uniform Resource Identifiers (absolute and relative)";
+      license = "perl";
+    };
+  };
+
   VariableMagic = buildPerlPackage rec {
     name = "Variable-Magic-0.48";
     src = fetchurl {
@@ -5217,10 +5354,10 @@ rec {
   };
 
   XMLLibXML = buildPerlPackage rec {
-    name = "XML-LibXML-2.0001";
+    name = "XML-LibXML-2.0014";
     src = fetchurl {
       url = "mirror://cpan/modules/by-module/XML/${name}.tar.gz";
-      sha256 = "1zx4fqi531yzaf1c5cw1qwb9vy37fksz35a7pp6pic9v8jvz09x6";
+      sha256 = "0r2mw6pnygj2bpng9f4q5jfn4iawhkj47ys3sbnvqymyp1afihf6";
     };
     SKIP_SAX_INSTALL = 1;
     buildInputs = [ pkgs.libxml2 ];
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 0cced7d4a2f..877d2d3ed7c 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -68,6 +68,11 @@ pythonPackages = python.modules // rec {
     inherit python buildPythonPackage;
   };
 
+  pycrypto25 = import ../development/python-modules/pycrypto/2.5.nix {
+    inherit (pkgs) fetchurl stdenv gmp;
+    inherit python buildPythonPackage;
+  };
+
   pygobject = import ../development/python-modules/pygobject {
     inherit (pkgs) stdenv fetchurl pkgconfig glib;
     inherit python;
@@ -451,6 +456,28 @@ pythonPackages = python.modules // rec {
   };
 
 
+  buildout152 = buildPythonPackage rec {
+    name = "buildout-${version}";
+    version = "1.5.2";
+
+    src = fetchurl {
+      url = "http://pypi.python.org/packages/source/z/zc.buildout/zc.${name}.tar.gz";
+      md5 = "87f7b3f8d13926c806242fd5f6fe36f7";
+    };
+
+   # TODO: consider if this patch should be an option
+   # It makes buildout useful in a nix profile, but this alters the default functionality
+   patchPhase = ''
+     sed -i "s/return (stdlib, site_paths)/return (stdlib, sys.path)/g" src/zc/buildout/easy_install.py
+   '';
+
+   meta = {
+      homepage = http://www.buildout.org/;
+      description = "A software build and configuration system";
+    };
+  };
+
+
   carrot = buildPythonPackage rec {
     name = "carrot-0.10.7";
 
@@ -762,11 +789,11 @@ pythonPackages = python.modules // rec {
   };
 
   deluge = buildPythonPackage rec {
-    name = "deluge-1.3.5";
+    name = "deluge-1.3.6";
 
     src = fetchurl {
       url = "http://download.deluge-torrent.org/source/${name}.tar.gz";
-      md5 = "fbf52593a85bfa7c8520834fa9177fba";
+      md5 = "33557678bf2f320de670ddaefaea009d";
     };
 
     # TODO: gui, procsettitle
@@ -778,6 +805,7 @@ pythonPackages = python.modules // rec {
       description = "Torrent client";
       license = "GPLv3";
       maintainers = [ stdenv.lib.maintainers.iElectric ];
+      platforms = stdenv.lib.platforms.all;
     };
   };
 
@@ -2655,12 +2683,12 @@ pythonPackages = python.modules // rec {
   });
 
   ldap = buildPythonPackage rec {
-    name = "python-ldap-2.4.3";
+    name = "python-ldap-2.4.10";
     namePrefix = "";
 
     src = fetchurl {
       url = "http://pypi.python.org/packages/source/p/python-ldap/${name}.tar.gz";
-      sha256 = "17aysa9b4zjw00ikjirf4m37xbp2ifj1g0zjs14xzqqib3nh1yw8";
+      sha256 = "0m6fm2alcb5v9xdcjv2nw2lhz9nnd3mnr5lrmf397hi4pw0pik37";
     };
 
     NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl}/include/sasl";
@@ -4664,4 +4692,84 @@ pythonPackages = python.modules // rec {
     };
   };
 
+  pyspotify = buildPythonPackage rec {
+    name = "pyspotify-${version}";
+  
+    version = "1.10";
+  
+    src = fetchgit {
+      url = "https://github.com/mopidy/pyspotify.git";
+      rev = "refs/tags/v${version}";
+      sha256 = "1rvgrviwn6f037m8vq395chz6a1119dbsdhfwdbv5ambi0bak6ll";
+    };
+  
+    buildInputs = [ pkgs.libspotify ];
+  
+    # python zip complains about old timestamps
+    preConfigure = ''
+      find -print0 | xargs -0 touch
+    '';
+  
+    # There are no tests
+    doCheck = false;
+  
+    meta = {
+      homepage = http://pyspotify.mopidy.com;
+      description = "A Python interface to Spotify’s online music streaming service";
+      maintainers = [ stdenv.lib.maintainers.rickynils ];
+    };
+  };
+
+  pykka = buildPythonPackage rec {
+    name = "pykka-${version}";
+  
+    version = "1.1.0";
+  
+    src = fetchgit {
+      url = "https://github.com/jodal/pykka.git";
+      rev = "refs/tags/v${version}";
+      sha256 = "0w6bcaqkzwmd9habszlgjkp3kkhkna08s9aivnmna5hddsghfqmz";
+    };
+  
+    # python zip complains about old timestamps
+    preConfigure = ''
+      find -print0 | xargs -0 touch
+    '';
+  
+    # There are no tests
+    doCheck = false;
+  
+    meta = {
+      homepage = http://www.pykka.org;
+      description = "A Python implementation of the actor model";
+      maintainers = [ stdenv.lib.maintainers.rickynils ];
+    };
+  };
+
+  ws4py = buildPythonPackage rec {
+    name = "ws4py-${version}";
+  
+    version = "git-20130303";
+  
+    src = fetchgit {
+      url = "https://github.com/Lawouach/WebSocket-for-Python.git";
+      rev = "ace276500ca7e4c357595e3773be151d37bcd6e2";
+      sha256 = "04m4m3ncn7g4rb81xg5n28imns7rsq8d2w98gjpaib6vlmyly3g1";
+    };
+  
+    # python zip complains about old timestamps
+    preConfigure = ''
+      find -print0 | xargs -0 touch
+    '';
+  
+    # Tests depend on other packages
+    doCheck = false;
+  
+    meta = {
+      homepage = https://ws4py.readthedocs.org;
+      description = "A WebSocket package for Python";
+      maintainers = [ stdenv.lib.maintainers.rickynils ];
+    };
+  };
+
 }; in pythonPackages
diff --git a/pkgs/top-level/release-python.nix b/pkgs/top-level/release-python.nix
index 05a78a099f7..9d8319141dd 100644
--- a/pkgs/top-level/release-python.nix
+++ b/pkgs/top-level/release-python.nix
@@ -260,7 +260,6 @@ in
   electricsheep = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
   elinks = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
   emacs = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
-  emacs22 = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
   emacs23 = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
   emacs24Packages = {
     autoComplete = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
@@ -333,7 +332,7 @@ in
   ffado = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
   ffmpeg = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
   ffmpeg_0_6_90 = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
-  ffmpeg_1_0 = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
+  ffmpeg_1_1 = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
   fileschanged = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
   fio = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
   firefox = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix
index 97a158430ca..faefdc5a0c3 100644
--- a/pkgs/top-level/release-small.nix
+++ b/pkgs/top-level/release-small.nix
@@ -135,7 +135,6 @@ with (import ./release-lib.nix);
   openssl = all;
   pam_console = linux;
   pam_login = linux;
-  pam_unix2 = linux;
   pan = gtkSupported;
   par2cmdline = all;
   pciutils = linux;
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index ccf7d458536..595c6b427a2 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -33,7 +33,6 @@ with (import ./release-lib.nix);
   bc = all;
   binutils = linux;
   bind = linux;
-  bison26 = all;
   bitlbee = linux;
   bittorrent = linux;
   blender = linux;
@@ -73,7 +72,6 @@ with (import ./release-lib.nix);
   e2fsprogs = linux;
   ejabberd = linux;
   elinks = linux;
-  emacs22 = gtkSupported;
   emacs23 = gtkSupported;
   enscript = all;
   eprover = linux;
@@ -211,7 +209,6 @@ with (import ./release-lib.nix);
   openssl = all;
   pam_console = linux;
   pam_login = linux;
-  pam_unix2 = linux;
   pan = gtkSupported;
   par2cmdline = all;
   pavucontrol = linux;
@@ -332,15 +329,12 @@ with (import ./release-lib.nix);
   zsh = linux;
   zsnes = ["i686-linux"];
 
-  emacs22Packages = {
+  emacs23Packages = {
     bbdb = linux;
     cedet = linux;
     ecb = linux;
     emacsw3m = linux;
     emms = linux;
-  };
-
-  emacs23Packages = emacs22Packages // {
     jdee = linux;
   };
 
@@ -353,43 +347,25 @@ with (import ./release-lib.nix);
     gnome_vfs = linux;
   };
 
-  /*
   haskellPackages_ghc6104 = {
     ghc = ghcSupported;
-    haskellPlatform_2009_2_0_2 = ghcSupported;
-  };
-
-  haskellPackages_ghc6121 = {
-    ghc = ghcSupported;
-    haskellPlatform_2010_1_0_0 = ghcSupported;
   };
 
   haskellPackages_ghc6123 = {
     ghc = ghcSupported;
-    gitit = linux;
-    gtk = linux;
-    haskellPlatform = ghcSupported;
   };
 
-  haskellPackages_ghc701 = {
+  haskellPackages_ghc704 = {
     ghc = ghcSupported;
   };
 
-  haskellPackages_ghc702 = {
+  haskellPackages_ghc742 = {
     ghc = ghcSupported;
-    haskellPlatform = ghcSupported;
   };
 
-  haskellPackages_ghc704 = {
-    darcs = ghcSupported;
+  haskellPackages_ghc762 = {
     ghc = ghcSupported;
-    gitit = linux;
-    gtk = linux;
-    haskellPlatform = ghcSupported;
-    lhs2tex = ghcSupported;
-    xmonad = linux;
   };
-  */
 
   strategoPackages = {
     sdf = linux;
@@ -453,7 +429,6 @@ with (import ./release-lib.nix);
     xfce4panel = linux;
     xfce4session = linux;
     xfce4settings = linux;
-    xfceutils = linux;
     xfdesktop = linux;
     xfwm4 = linux;
   };