about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--default.nix8
-rw-r--r--lib/maintainers.nix2
-rw-r--r--nixos/lib/test-driver/Machine.pm2
-rw-r--r--nixos/modules/misc/ids.nix8
-rw-r--r--nixos/modules/module-list.nix6
-rw-r--r--nixos/modules/programs/zsh/zsh.nix3
-rw-r--r--nixos/modules/security/duosec.nix198
-rw-r--r--nixos/modules/services/backup/almir.nix3
-rw-r--r--nixos/modules/services/backup/tarsnap.nix11
-rw-r--r--nixos/modules/services/continuous-integration/jenkins/default.nix118
-rw-r--r--nixos/modules/services/continuous-integration/jenkins/slave.nix67
-rw-r--r--nixos/modules/services/databases/mysql.nix5
-rw-r--r--nixos/modules/services/databases/postgresql.nix2
-rw-r--r--nixos/modules/services/misc/gpsd.nix30
-rw-r--r--nixos/modules/services/misc/nixos-manual.nix2
-rw-r--r--nixos/modules/services/monitoring/graphite.nix94
-rw-r--r--nixos/modules/services/monitoring/statsd.nix4
-rw-r--r--nixos/modules/services/network-filesystems/openafs-client/default.nix35
-rw-r--r--nixos/modules/services/networking/btsync.nix280
-rw-r--r--nixos/modules/services/networking/firewall.nix15
-rw-r--r--nixos/modules/services/networking/ngircd.nix58
-rw-r--r--nixos/modules/services/networking/notbit.nix93
-rw-r--r--nixos/modules/services/search/elasticsearch.nix50
-rw-r--r--nixos/modules/services/search/solr.nix23
-rw-r--r--nixos/modules/services/web-servers/nginx/default.nix11
-rw-r--r--nixos/modules/services/x11/desktop-managers/gnome3.nix2
-rw-r--r--nixos/modules/services/x11/desktop-managers/xfce.nix2
-rw-r--r--nixos/modules/system/boot/kernel.nix3
-rw-r--r--nixos/modules/system/boot/stage-2-init.sh13
-rw-r--r--nixos/modules/system/boot/systemd.nix19
-rw-r--r--nixos/modules/system/etc/etc.nix20
-rw-r--r--nixos/modules/system/etc/make-etc.sh4
-rw-r--r--nixos/modules/system/etc/setup-etc.pl8
-rw-r--r--nixos/modules/tasks/filesystems/zfs.nix221
-rw-r--r--nixos/modules/tasks/network-interfaces.nix45
-rw-r--r--nixos/modules/virtualisation/google-compute-image.nix13
-rw-r--r--nixos/tests/default.nix1
-rw-r--r--nixos/tests/jenkins.nix35
-rw-r--r--pkgs/applications/audio/a2jmidid/default.nix2
-rw-r--r--pkgs/applications/audio/ardour/ardour3.nix62
-rw-r--r--pkgs/applications/audio/ardour/default.nix81
-rw-r--r--pkgs/applications/audio/ekho/default.nix39
-rw-r--r--pkgs/applications/audio/gigedit/default.nix1
-rw-r--r--pkgs/applications/audio/jalv/default.nix1
-rw-r--r--pkgs/applications/audio/lash/default.nix2
-rw-r--r--pkgs/applications/audio/mid2key/default.nix1
-rw-r--r--pkgs/applications/audio/mpg123/default.nix6
-rw-r--r--pkgs/applications/audio/qsampler/default.nix1
-rw-r--r--pkgs/applications/audio/vmpk/default.nix26
-rw-r--r--pkgs/applications/editors/emacs-modes/darcsum/darcs_context7
-rw-r--r--pkgs/applications/editors/emacs-modes/darcsum/default.nix34
-rw-r--r--pkgs/applications/editors/kdevelop/default.nix18
-rw-r--r--pkgs/applications/editors/vim/wrapper.nix6
-rw-r--r--pkgs/applications/editors/yi/yi-contrib.nix4
-rw-r--r--pkgs/applications/editors/yi/yi.nix4
-rw-r--r--pkgs/applications/graphics/openscad/default.nix12
-rw-r--r--pkgs/applications/graphics/shotwell/default.nix56
-rw-r--r--pkgs/applications/ike/default.nix2
-rw-r--r--pkgs/applications/misc/nut/default.nix2
-rw-r--r--pkgs/applications/misc/xmobar/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/chromium/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/chromium/sources.nix12
-rw-r--r--pkgs/applications/networking/browsers/firefox/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix2
-rw-r--r--pkgs/applications/networking/cluster/spark/default.nix2
-rw-r--r--pkgs/applications/networking/feedreaders/newsbeuter/default.nix11
-rw-r--r--pkgs/applications/networking/feedreaders/newsbeuter/dev.nix7
-rw-r--r--pkgs/applications/networking/irc/konversation/default.nix1
-rw-r--r--pkgs/applications/networking/irc/weechat/default.nix7
-rw-r--r--pkgs/applications/networking/irc/weechat/fix-gnutls-32.diff16
-rw-r--r--pkgs/applications/networking/mailreaders/sup/default.nix6
-rw-r--r--pkgs/applications/networking/newsreaders/liferea/default.nix8
-rw-r--r--pkgs/applications/networking/newsreaders/slrn/default.nix31
-rw-r--r--pkgs/applications/networking/p2p/ktorrent/default.nix6
-rw-r--r--pkgs/applications/networking/p2p/transmission/default.nix2
-rw-r--r--pkgs/applications/office/gnumeric/default.nix4
-rw-r--r--pkgs/applications/science/logic/coq/default.nix6
-rw-r--r--pkgs/applications/version-management/git-and-tools/git-annex/default.nix36
-rw-r--r--pkgs/applications/version-management/git-and-tools/git/default.nix6
-rw-r--r--pkgs/applications/video/aegisub/default.nix17
-rw-r--r--pkgs/applications/video/kazam/default.nix1
-rw-r--r--pkgs/applications/video/mpv/default.nix7
-rw-r--r--pkgs/applications/virtualization/8086tiny/default.nix11
-rw-r--r--pkgs/applications/virtualization/bochs/default.nix17
-rw-r--r--pkgs/applications/virtualization/qemu/default.nix16
-rw-r--r--pkgs/build-support/vm/default.nix7
-rw-r--r--pkgs/data/documentation/man-pages-posix/default.nix6
-rw-r--r--pkgs/data/fonts/wqy-microhei/default.nix21
-rw-r--r--pkgs/data/fonts/wqy-zenhei/default.nix15
-rw-r--r--pkgs/desktops/gnome-3/default.nix3
-rw-r--r--pkgs/desktops/gnome-3/misc/gexiv2/default.nix25
-rw-r--r--pkgs/desktops/gnome-3/misc/goffice/default.nix16
-rw-r--r--pkgs/desktops/kde-4.10/kdeutils/kdf.nix2
-rw-r--r--pkgs/desktops/xfce/applications/gigolo.nix8
-rw-r--r--pkgs/desktops/xfce/applications/xfce4-taskmanager.nix4
-rw-r--r--pkgs/desktops/xfce/core/tumbler.nix4
-rw-r--r--pkgs/desktops/xfce/core/xfce4-power-manager-brightness.patch307
-rw-r--r--pkgs/desktops/xfce/core/xfce4-power-manager.nix7
-rw-r--r--pkgs/development/compilers/fsharp/default.nix36
-rw-r--r--pkgs/development/compilers/ghc/7.4.2.nix1
-rw-r--r--pkgs/development/compilers/ghc/7.8.1.nix1
-rw-r--r--pkgs/development/compilers/ghc/head.nix5
-rw-r--r--pkgs/development/compilers/jdk/jdk7-linux.nix27
-rw-r--r--pkgs/development/compilers/mono/build-fix-llvm.patch12
-rw-r--r--pkgs/development/compilers/mono/default.nix25
-rw-r--r--pkgs/development/compilers/mono/llvm.nix59
-rw-r--r--pkgs/development/interpreters/clisp/2.44.1.nix4
-rw-r--r--pkgs/development/interpreters/python/3.4/default.nix4
-rw-r--r--pkgs/development/libraries/SDL2/default.nix4
-rw-r--r--pkgs/development/libraries/SDL_ttf/default.nix6
-rw-r--r--pkgs/development/libraries/audio/lilv/default.nix2
-rw-r--r--pkgs/development/libraries/audio/lv2/default.nix2
-rw-r--r--pkgs/development/libraries/audio/sratom/default.nix2
-rw-r--r--pkgs/development/libraries/audio/suil/default.nix2
-rw-r--r--pkgs/development/libraries/check/default.nix4
-rw-r--r--pkgs/development/libraries/dbus/default.nix2
-rw-r--r--pkgs/development/libraries/facile/default.nix8
-rw-r--r--pkgs/development/libraries/facile/ocaml_4.xx.patch12
-rw-r--r--pkgs/development/libraries/ffmpeg/0.10.nix4
-rw-r--r--pkgs/development/libraries/geoip/default.nix29
-rw-r--r--pkgs/development/libraries/geoip/src-for-default.nix8
-rw-r--r--pkgs/development/libraries/geoip/src-info-for-default.nix6
-rw-r--r--pkgs/development/libraries/gnutls/3.2.nix4
-rw-r--r--pkgs/development/libraries/gstreamer/bad/default.nix17
-rw-r--r--pkgs/development/libraries/gstreamer/default.nix4
-rw-r--r--pkgs/development/libraries/gstreamer/ges/default.nix24
-rw-r--r--pkgs/development/libraries/gstreamer/gnonlin/default.nix29
-rw-r--r--pkgs/development/libraries/gstreamer/good/default.nix16
-rw-r--r--pkgs/development/libraries/gstreamer/legacy/qt-gstreamer/default.nix4
-rw-r--r--pkgs/development/libraries/gstreamer/python/default.nix4
-rw-r--r--pkgs/development/libraries/gstreamer/ugly/default.nix17
-rw-r--r--pkgs/development/libraries/haskell/Glob/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/HDBC/HDBC.nix4
-rw-r--r--pkgs/development/libraries/haskell/HaXml/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/QuickCheck/2.7.1.nix19
-rw-r--r--pkgs/development/libraries/haskell/aes/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/alsa-pcm/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/arithmoi/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/base64-conduit/default.nix6
-rw-r--r--pkgs/development/libraries/haskell/chell-quickcheck/default.nix14
-rw-r--r--pkgs/development/libraries/haskell/chell/default.nix18
-rw-r--r--pkgs/development/libraries/haskell/chunked-data/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/cipher-aes/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/classy-prelude/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/conduit-combinators/default.nix18
-rw-r--r--pkgs/development/libraries/haskell/conduit/default.nix5
-rw-r--r--pkgs/development/libraries/haskell/constraints/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/convertible/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/cryptohash-conduit/default.nix14
-rw-r--r--pkgs/development/libraries/haskell/css-text/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/data-accessor/data-accessor-template.nix4
-rw-r--r--pkgs/development/libraries/haskell/data-accessor/data-accessor.nix4
-rw-r--r--pkgs/development/libraries/haskell/dbmigrations/default.nix1
-rw-r--r--pkgs/development/libraries/haskell/dbus/default.nix14
-rw-r--r--pkgs/development/libraries/haskell/derive/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/diagrams/cairo.nix4
-rw-r--r--pkgs/development/libraries/haskell/diagrams/contrib.nix4
-rw-r--r--pkgs/development/libraries/haskell/diagrams/core.nix4
-rw-r--r--pkgs/development/libraries/haskell/diagrams/diagrams.nix4
-rw-r--r--pkgs/development/libraries/haskell/diagrams/lib.nix4
-rw-r--r--pkgs/development/libraries/haskell/diagrams/postscript.nix4
-rw-r--r--pkgs/development/libraries/haskell/diagrams/svg.nix4
-rw-r--r--pkgs/development/libraries/haskell/dlist-instances/default.nix14
-rw-r--r--pkgs/development/libraries/haskell/dlist/default.nix7
-rw-r--r--pkgs/development/libraries/haskell/doctest/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/dsp/default.nix16
-rw-r--r--pkgs/development/libraries/haskell/errors/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/exceptions/default.nix6
-rw-r--r--pkgs/development/libraries/haskell/fay-base/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/fay/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/filepath/default.nix7
-rw-r--r--pkgs/development/libraries/haskell/filesystem-conduit/default.nix6
-rw-r--r--pkgs/development/libraries/haskell/foldl/default.nix8
-rw-r--r--pkgs/development/libraries/haskell/force-layout/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/ghc-mod/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/ghcjs-dom/default.nix8
-rw-r--r--pkgs/development/libraries/haskell/gnuplot/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/happstack/happstack-fastcgi.nix14
-rw-r--r--pkgs/development/libraries/haskell/haskell-names/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/heist/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/hjsmin/default.nix5
-rw-r--r--pkgs/development/libraries/haskell/hspec-meta/default.nix9
-rw-r--r--pkgs/development/libraries/haskell/hspec/default.nix12
-rw-r--r--pkgs/development/libraries/haskell/html-conduit/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/http-client/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/http-reverse-proxy/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/language-ecmascript/default.nix9
-rw-r--r--pkgs/development/libraries/haskell/lens/default.nix12
-rw-r--r--pkgs/development/libraries/haskell/leveldb-haskell/default.nix21
-rw-r--r--pkgs/development/libraries/haskell/libsystemd-journal/default.nix21
-rw-r--r--pkgs/development/libraries/haskell/linear/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/list-tries/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/llvm-general-pure/3.4.2.2.nix (renamed from pkgs/development/libraries/haskell/llvm-general-pure/3.4.1.0.nix)4
-rw-r--r--pkgs/development/libraries/haskell/llvm-general/3.4.2.2.nix (renamed from pkgs/development/libraries/haskell/llvm-general/3.4.1.0.nix)4
-rw-r--r--pkgs/development/libraries/haskell/ltk/default.nix10
-rw-r--r--pkgs/development/libraries/haskell/lzma-enumerator/default.nix22
-rw-r--r--pkgs/development/libraries/haskell/midi/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/mono-traversable/default.nix15
-rw-r--r--pkgs/development/libraries/haskell/numeric-prelude/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/options/default.nix16
-rw-r--r--pkgs/development/libraries/haskell/optparse-applicative/default.nix12
-rw-r--r--pkgs/development/libraries/haskell/pbkdf/default.nix15
-rw-r--r--pkgs/development/libraries/haskell/persistent/default.nix8
-rw-r--r--pkgs/development/libraries/haskell/pipes-attoparsec/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/recaptcha/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/resourcet/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/sample-frame/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/scotty/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/scrypt/default.nix20
-rw-r--r--pkgs/development/libraries/haskell/shake/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/singletons/default.nix11
-rw-r--r--pkgs/development/libraries/haskell/snap/core.nix4
-rw-r--r--pkgs/development/libraries/haskell/snap/snap.nix4
-rw-r--r--pkgs/development/libraries/haskell/snowball/default.nix21
-rw-r--r--pkgs/development/libraries/haskell/tagged/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/tagshare/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/tasty-quickcheck/default.nix8
-rw-r--r--pkgs/development/libraries/haskell/tasty/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/terminal-size/default.nix12
-rw-r--r--pkgs/development/libraries/haskell/testing-feat/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/tf-random/default.nix13
-rw-r--r--pkgs/development/libraries/haskell/th-desugar/default.nix7
-rw-r--r--pkgs/development/libraries/haskell/timezone-olson/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/tls/1.2.3.nix (renamed from pkgs/development/libraries/haskell/tls/1.2.2.nix)15
-rw-r--r--pkgs/development/libraries/haskell/unix-process-conduit/default.nix6
-rw-r--r--pkgs/development/libraries/haskell/unix-time/default.nix1
-rw-r--r--pkgs/development/libraries/haskell/vty/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/wai-app-static/default.nix19
-rw-r--r--pkgs/development/libraries/haskell/wai-extra/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/wai-middleware-static/default.nix6
-rw-r--r--pkgs/development/libraries/haskell/wai-test/default.nix8
-rw-r--r--pkgs/development/libraries/haskell/wai-websockets/default.nix22
-rw-r--r--pkgs/development/libraries/haskell/warp/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/wxHaskell/fix-bogus-pointer-assignment.patch13
-rw-r--r--pkgs/development/libraries/haskell/wxHaskell/wx.nix5
-rw-r--r--pkgs/development/libraries/haskell/wxHaskell/wxc.nix9
-rw-r--r--pkgs/development/libraries/haskell/wxHaskell/wxcore.nix8
-rw-r--r--pkgs/development/libraries/haskell/wxHaskell/wxdirect.nix12
-rw-r--r--pkgs/development/libraries/haskell/yaml/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/yesod-bin/default.nix28
-rw-r--r--pkgs/development/libraries/haskell/yesod-core/default.nix4
-rw-r--r--pkgs/development/libraries/haskell/yesod-form/default.nix8
-rw-r--r--pkgs/development/libraries/haskell/yesod-persistent/default.nix14
-rw-r--r--pkgs/development/libraries/haskell/yesod-static/default.nix12
-rw-r--r--pkgs/development/libraries/haskell/yesod-test/default.nix13
-rw-r--r--pkgs/development/libraries/itk/default.nix7
-rw-r--r--pkgs/development/libraries/kdevplatform/default.nix10
-rw-r--r--pkgs/development/libraries/keybinder/default.nix8
-rw-r--r--pkgs/development/libraries/libav/default.nix4
-rw-r--r--pkgs/development/libraries/libconfig/default.nix1
-rw-r--r--pkgs/development/libraries/libgig/default.nix1
-rw-r--r--pkgs/development/libraries/libktorrent/default.nix10
-rw-r--r--pkgs/development/libraries/liblscp/default.nix1
-rw-r--r--pkgs/development/libraries/libpng/12.nix4
-rw-r--r--pkgs/development/libraries/libpng/15.nix4
-rw-r--r--pkgs/development/libraries/libpng/default.nix6
-rw-r--r--pkgs/development/libraries/readline/readline6.3.nix49
-rw-r--r--pkgs/development/libraries/ruby_ncursesw_sup/default.nix11
-rw-r--r--pkgs/development/libraries/serd/default.nix2
-rw-r--r--pkgs/development/libraries/sord/default.nix2
-rw-r--r--pkgs/development/libraries/thrift/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/batteries/default.nix24
-rw-r--r--pkgs/development/ocaml-modules/extlib/default.nix14
-rw-r--r--pkgs/development/ocaml-modules/ocamlnet/default.nix12
-rw-r--r--pkgs/development/ocaml-modules/odn/default.nix28
-rw-r--r--pkgs/development/ocaml-modules/react/default.nix31
-rw-r--r--pkgs/development/ocaml-modules/typeconv/3.0.5.nix23
-rw-r--r--pkgs/development/ocaml-modules/typeconv/default.nix11
-rw-r--r--pkgs/development/tools/continuous-integration/jenkins/default.nix20
-rw-r--r--pkgs/development/tools/haskell/HaRe/default.nix4
-rw-r--r--pkgs/development/tools/haskell/hlint/default.nix11
-rw-r--r--pkgs/development/tools/misc/gdb/default.nix6
-rw-r--r--pkgs/development/tools/misc/gdb/edit-signals.patch25
-rw-r--r--pkgs/development/tools/ocaml/oasis/default.nix32
-rw-r--r--pkgs/development/tools/ocaml/ocamlify/default.nix26
-rw-r--r--pkgs/development/tools/ocaml/ocamlmod/default.nix25
-rw-r--r--pkgs/development/tools/selenium/chromedriver/default.nix1
-rwxr-xr-xpkgs/games/planetaryannihilation/default.nix54
-rw-r--r--pkgs/misc/themes/gtk2/oxygen-gtk/default.nix1
-rw-r--r--pkgs/misc/vim-plugins/default.nix11
-rw-r--r--pkgs/os-specific/linux/acpid/default.nix4
-rw-r--r--pkgs/os-specific/linux/alsa-utils/default.nix10
-rw-r--r--pkgs/os-specific/linux/bluez/bluez5.nix5
-rw-r--r--pkgs/os-specific/linux/checksec/default.nix2
-rw-r--r--pkgs/os-specific/linux/conky/default.nix62
-rw-r--r--pkgs/os-specific/linux/conky/stdbool.patch12
-rw-r--r--pkgs/os-specific/linux/criu/default.nix38
-rw-r--r--pkgs/os-specific/linux/ffado/default.nix1
-rw-r--r--pkgs/os-specific/linux/kernel/grsec-path.patch10
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.10.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.12.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.4.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/manual-config.nix6
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix14
-rw-r--r--pkgs/os-specific/linux/kernel/sec_perm-2.6.24.patch16
-rw-r--r--pkgs/os-specific/linux/ktap/default.nix2
-rw-r--r--pkgs/os-specific/linux/pax-utils/default.nix4
-rw-r--r--pkgs/os-specific/linux/plymouth/default.nix1
-rw-r--r--pkgs/os-specific/linux/procps-ng/default.nix2
-rw-r--r--pkgs/os-specific/linux/spl/3_12-compat.patch429
-rw-r--r--pkgs/os-specific/linux/spl/3_13-compat-1.patch61
-rw-r--r--pkgs/os-specific/linux/spl/3_13-compat-2.patch168
-rw-r--r--pkgs/os-specific/linux/spl/default.nix6
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix8
-rw-r--r--pkgs/os-specific/linux/udisks/1-default.nix10
-rw-r--r--pkgs/os-specific/linux/udisks/2-default.nix2
-rw-r--r--pkgs/os-specific/linux/zfs/3.13-compat.patch43
-rw-r--r--pkgs/os-specific/linux/zfs/default.nix4
-rw-r--r--pkgs/os-specific/linux/zfs/gcc-4.8.patch114
-rw-r--r--pkgs/os-specific/linux/zfs/libblkid-1db7b9b.patch118
-rw-r--r--pkgs/servers/amqp/rabbitmq-server/default.nix4
-rw-r--r--pkgs/servers/gpsd/0001-Import-LD_LIBRARY_PATH-to-allow-running-scons-check-.patch25
-rw-r--r--pkgs/servers/gpsd/0002-Import-XML_CATALOG_FILES-to-be-able-to-validate-the-.patch28
-rw-r--r--pkgs/servers/gpsd/default.nix95
-rw-r--r--pkgs/servers/http/tomcat/6.0.nix4
-rw-r--r--pkgs/servers/irc/ngircd/default.nix29
-rw-r--r--pkgs/servers/mail/dovecot/2.2.x-module_dir.patch69
-rw-r--r--pkgs/servers/mail/dovecot/2.2.x.nix4
-rw-r--r--pkgs/servers/openafs-client/default.nix7
-rw-r--r--pkgs/servers/search/elasticsearch/default.nix4
-rw-r--r--pkgs/servers/serfdom/default.nix111
-rw-r--r--pkgs/servers/sql/postgresql/9.3.x.nix9
-rw-r--r--pkgs/servers/x11/xorg/default.nix10
-rw-r--r--pkgs/servers/x11/xorg/tarballs-7.7.list1
-rw-r--r--pkgs/stdenv/generic/default.nix6
-rw-r--r--pkgs/tools/graphics/pfstools/default.nix4
-rw-r--r--pkgs/tools/misc/autorandr/default.nix1
-rw-r--r--pkgs/tools/misc/colord/default.nix6
-rw-r--r--pkgs/tools/misc/fasd/default.nix37
-rw-r--r--pkgs/tools/misc/system-config-printer/default.nix2
-rw-r--r--pkgs/tools/misc/youtube-dl/default.nix4
-rw-r--r--pkgs/tools/networking/easyrsa/default.nix3
-rw-r--r--pkgs/tools/networking/isync/default.nix5
-rw-r--r--pkgs/tools/networking/nbd/default.nix9
-rw-r--r--pkgs/tools/networking/network-manager-applet/default.nix2
-rw-r--r--pkgs/tools/networking/openssh/default.nix4
-rw-r--r--pkgs/tools/networking/openvpn/openvpn_learnaddress.nix27
-rw-r--r--pkgs/tools/networking/telnet/default.nix3
-rw-r--r--pkgs/tools/package-management/rpm/default.nix16
-rw-r--r--pkgs/tools/security/cb0cat/default.nix2
-rw-r--r--pkgs/tools/security/ccid/default.nix4
-rw-r--r--pkgs/tools/security/duo-unix/default.nix28
-rw-r--r--pkgs/tools/security/nmap/default.nix12
-rw-r--r--pkgs/tools/security/pcsclite/default.nix9
-rw-r--r--pkgs/tools/security/scrypt/default.nix7
-rw-r--r--pkgs/tools/security/ssdeep/default.nix23
-rw-r--r--pkgs/tools/security/tor/default.nix6
-rw-r--r--pkgs/tools/security/vidalia/default.nix1
-rw-r--r--pkgs/tools/system/logcheck/default.nix6
-rw-r--r--pkgs/tools/text/podiff/default.nix1
-rw-r--r--pkgs/tools/text/silver-searcher/default.nix2
-rw-r--r--pkgs/tools/text/uni2ascii/default.nix1
-rw-r--r--pkgs/top-level/all-packages.nix145
-rw-r--r--pkgs/top-level/haskell-packages.nix71
-rw-r--r--pkgs/top-level/python-packages-generated.nix22
-rw-r--r--pkgs/top-level/python-packages.json3
-rw-r--r--pkgs/top-level/python-packages.nix10
357 files changed, 5162 insertions, 1238 deletions
diff --git a/default.nix b/default.nix
index 9d5764a6307f..c1b9bfd39f92 100644
--- a/default.nix
+++ b/default.nix
@@ -1 +1,7 @@
-import ./pkgs/top-level/all-packages.nix
+if ! builtins ? nixVersion || builtins.compareVersions "1.6" builtins.nixVersion == 1 then
+
+  abort "This version of Nixpkgs requires Nix >= 1.6, please upgrade!"
+
+else
+
+  import ./pkgs/top-level/all-packages.nix
diff --git a/lib/maintainers.nix b/lib/maintainers.nix
index 8acfdcf809de..5061cab826d6 100644
--- a/lib/maintainers.nix
+++ b/lib/maintainers.nix
@@ -9,6 +9,7 @@
   all = "Nix Committers <nix-commits@lists.science.uu.nl>";
   amiddelk = "Arie Middelkoop <amiddelk@gmail.com>";
   amorsillo = "Andrew Morsillo <andrew.morsillo@gmail.com>";
+  AndersonTorres = "Anderson Torres <torres.anderson.85@gmail.com>";
   andres = "Andres Loeh <ksnixos@andres-loeh.de>";
   antono = "Antono Vasiljev <self@antono.info>";
   astsmtl = "Alexander Tsamutali <astsmtl@yandex.ru>";
@@ -54,6 +55,7 @@
   phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>";
   pierron = "Nicolas B. Pierron <nixos@nbp.name>";
   piotr = "Piotr Pietraszkiewicz <ppietrasa@gmail.com>";
+  pkmx = "Chih-Mao Chen <pkmx.tw@gmail.com>";
   pSub = "Pascal Wittmann <mail@pascal-wittmann.de>";
   qknight = "Joachim Schiele <js@lastlog.de>";
   raskin = "Michael Raskin <7c6f434c@mail.ru>";
diff --git a/nixos/lib/test-driver/Machine.pm b/nixos/lib/test-driver/Machine.pm
index 8bef3d67b8d9..99810f87750d 100644
--- a/nixos/lib/test-driver/Machine.pm
+++ b/nixos/lib/test-driver/Machine.pm
@@ -497,7 +497,7 @@ sub waitForX {
         retry sub {
             my ($status, $out) = $self->execute("journalctl -bu systemd-logind | grep Linked");
             return 0 if $status != 0;
-            my ($status, $out) = $self->execute("xwininfo -root > /dev/null 2>&1");
+            ($status, $out) = $self->execute("xwininfo -root > /dev/null 2>&1");
             return 1 if $status == 0;
         }
     });
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix
index ad344dfbc110..fc05584e2565 100644
--- a/nixos/modules/misc/ids.nix
+++ b/nixos/modules/misc/ids.nix
@@ -117,6 +117,11 @@
       couchdb = 106;
       searx = 107;
       kippo = 108;
+      jenkins = 109;
+      systemd-journal-gateway = 110;
+      notbit = 111;
+      ngircd = 112;
+      btsync = 113;
 
       # When adding a uid, make sure it doesn't match an existing gid.
 
@@ -212,6 +217,9 @@
       couchdb = 106;
       searx = 107;
       kippo = 108;
+      jenkins = 109;
+      systemd-journal-gateway = 110;
+      notbit = 111;
 
       # When adding a gid, make sure it doesn't match an existing uid.
 
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 8a7d32adf345..e59b0ff5ac2c 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -61,6 +61,7 @@
   ./security/apparmor.nix
   ./security/apparmor-suid.nix
   ./security/ca.nix
+  ./security/duosec.nix
   ./security/pam.nix
   ./security/pam_usb.nix
   ./security/polkit.nix
@@ -81,6 +82,8 @@
   ./services/backup/rsnapshot.nix
   ./services/backup/sitecopy-backup.nix
   ./services/backup/tarsnap.nix
+  ./services/continuous-integration/jenkins/default.nix
+  ./services/continuous-integration/jenkins/slave.nix
   ./services/databases/4store-endpoint.nix
   ./services/databases/4store.nix
   ./services/databases/couchdb.nix
@@ -152,6 +155,7 @@
   ./services/networking/avahi-daemon.nix
   ./services/networking/bind.nix
   ./services/networking/bitlbee.nix
+  ./services/networking/btsync.nix
   ./services/networking/connman.nix
   ./services/networking/cntlm.nix
   ./services/networking/chrony.nix
@@ -177,6 +181,8 @@
   ./services/networking/minidlna.nix
   ./services/networking/nat.nix
   ./services/networking/networkmanager.nix
+  ./services/networking/ngircd.nix
+  ./services/networking/notbit.nix
   ./services/networking/ntopng.nix
   ./services/networking/ntpd.nix
   ./services/networking/oidentd.nix
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix
index cff751934d7d..69a56ff69a0d 100644
--- a/nixos/modules/programs/zsh/zsh.nix
+++ b/nixos/modules/programs/zsh/zsh.nix
@@ -116,8 +116,9 @@ in
         # This file is read for all shells.
 
         # Only execute this file once per shell.
+        # But don't clobber the environment of interactive non-login children!
         if [ -n "$__ETC_ZSHENV_SOURCED" ]; then return; fi
-        __ETC_ZSHENV_SOURCED=1
+        export __ETC_ZSHENV_SOURCED=1
 
         ${cfg.shellInit}
 
diff --git a/nixos/modules/security/duosec.nix b/nixos/modules/security/duosec.nix
new file mode 100644
index 000000000000..989bd13d101e
--- /dev/null
+++ b/nixos/modules/security/duosec.nix
@@ -0,0 +1,198 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+  cfg = config.security.duosec;
+
+  boolToStr = b: if b then "yes" else "no";
+
+  configFile = ''
+    [duo]
+    ikey=${cfg.ikey}
+    skey=${cfg.skey}
+    host=${cfg.host}
+    ${optionalString (cfg.group != "") ("group="+cfg.group)}
+    failmode=${cfg.failmode}
+    pushinfo=${boolToStr cfg.pushinfo}
+    autopush=${boolToStr cfg.autopush}
+    motd=${boolToStr cfg.motd}
+    prompts=${toString cfg.prompts}
+    accept_env_factor=${boolToStr cfg.acceptEnvFactor}
+    fallback_local_ip=${boolToStr cfg.fallbackLocalIP}
+  '';
+
+  loginCfgFile = optional cfg.ssh.enable
+    { source = pkgs.writeText "login_duo.conf" configFile;
+      mode   = "0600";
+      uid    = config.ids.uids.sshd;
+      target = "duo/login_duo.conf";
+    };
+
+  pamCfgFile = optional cfg.pam.enable
+    { source = pkgs.writeText "pam_duo.conf" configFile;
+      mode   = "0600";
+      uid    = config.ids.uids.sshd;
+      target = "duo/pam_duo.conf";
+    };
+in
+{
+  options = {
+    security.duosec = {
+      ssh.enable = mkOption {
+        type = types.bool;
+        default = false;
+        description = "If enabled, protect SSH logins with Duo Security.";
+      };
+
+      pam.enable = mkOption {
+        type = types.bool;
+        default = false;
+        description = "If enabled, protect logins with Duo Security using PAM support.";
+      };
+
+      ikey = mkOption {
+        type = types.str;
+        description = "Integration key.";
+      };
+
+      skey = mkOption {
+        type = types.str;
+        description = "Secret key.";
+      };
+
+      host = mkOption {
+        type = types.str;
+        description = "Duo API hostname.";
+      };
+
+      group = mkOption {
+        type = types.str;
+        default = "";
+        description = "Use Duo authentication for users only in this group.";
+      };
+
+      failmode = mkOption {
+        type = types.str;
+        default = "safe";
+        description = ''
+          On service or configuration errors that prevent Duo
+          authentication, fail "safe" (allow access) or "secure" (deny
+          access). The default is "safe".
+        '';
+      };
+
+      pushinfo = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Include information such as the command to be executed in
+          the Duo Push message.
+        '';
+      };
+
+      autopush = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          If <literal>true</literal>, Duo Unix will automatically send
+          a push login request to the user’s phone, falling back on a
+          phone call if push is unavailable. If
+          <literal>false</literal>, the user will be prompted to
+          choose an authentication method. When configured with
+          <literal>autopush = yes</literal>, we recommend setting
+          <literal>prompts = 1</literal>.
+        '';
+      };
+
+      motd = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Print the contents of <literal>/etc/motd</literal> to screen
+          after a succesful login.
+        '';
+      };
+
+      prompts = mkOption {
+        type = types.int;
+        default = 3;
+        description = ''
+          If a user fails to authenticate with a second factor, Duo
+          Unix will prompt the user to authenticate again. This option
+          sets the maximum number of prompts that Duo Unix will
+          display before denying access. Must be 1, 2, or 3. Default
+          is 3.
+
+          For example, when <literal>prompts = 1</literal>, the user
+          will have to successfully authenticate on the first prompt,
+          whereas if <literal>prompts = 2</literal>, if the user
+          enters incorrect information at the initial prompt, he/she
+          will be prompted to authenticate again.
+
+          When configured with <literal>autopush = true</literal>, we
+          recommend setting <literal>prompts = 1</literal>.
+        '';
+      };
+
+      acceptEnvFactor = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Look for factor selection or passcode in the
+          <literal>$DUO_PASSCODE</literal> environment variable before
+          prompting the user for input.
+
+          When $DUO_PASSCODE is non-empty, it will override
+          autopush. The SSH client will need SendEnv DUO_PASSCODE in
+          its configuration, and the SSH server will similarily need
+          AcceptEnv DUO_PASSCODE.
+        '';
+      };
+
+      fallbackLocalIP = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Duo Unix reports the IP address of the authorizing user, for
+          the purposes of authorization and whitelisting. If Duo Unix
+          cannot detect the IP address of the client, setting
+          <literal>fallbackLocalIP = yes</literal> will cause Duo Unix
+          to send the IP address of the server it is running on.
+
+          If you are using IP whitelisting, enabling this option could
+          cause unauthorized logins if the local IP is listed in the
+          whitelist.
+        '';
+      };
+    };
+  };
+
+  config = mkIf (cfg.ssh.enable || cfg.pam.enable) {
+    assertions =
+      [ { assertion = cfg.failmode == "safe" || cfg.failmode == "secure";
+          message   = "Invalid value for failmode (must be safe or secure).";
+        }
+        { assertion = cfg.prompts == 1 || cfg.prompts == 2 || cfg.prompts == 3;
+          message   = "Invalid value for prompts (must be 1, 2, or 3).";
+        }
+        { assertion = !cfg.pam.enable;
+          message   = "PAM support is currently not implemented.";
+        }
+      ];
+
+     environment.systemPackages = [ pkgs.duo-unix ];
+     security.setuidPrograms    = [ "login_duo" ];
+     environment.etc = loginCfgFile ++ pamCfgFile;
+
+     /* If PAM *and* SSH are enabled, then don't do anything special.
+     If PAM isn't used, set the default SSH-only options. */
+     services.openssh.extraConfig = mkIf (cfg.ssh.enable || cfg.pam.enable) (
+     if cfg.pam.enable then "UseDNS no" else ''
+       # Duo Security configuration
+       ForceCommand ${config.security.wrapperDir}/login_duo
+       PermitTunnel no
+       AllowTcpForwarding no
+     '');
+  };
+}
diff --git a/nixos/modules/services/backup/almir.nix b/nixos/modules/services/backup/almir.nix
index d5bc932c6b96..8fdcdd6c7be8 100644
--- a/nixos/modules/services/backup/almir.nix
+++ b/nixos/modules/services/backup/almir.nix
@@ -154,7 +154,8 @@ in {
       description = "Almir web app";
       wantedBy = [ "multi-user.target" ];
       path = [ pkgs.pythonPackages.almir ];
-      serviceConfig.ExecStart = "${pkgs.pythonPackages.almir}/bin/pserve ${productionini}";
+      environment.PYTHONPATH = "${pkgs.pythonPackages.almir}/lib/${pkgs.pythonPackages.python.libPrefix}/site-packages";
+      serviceConfig.ExecStart = "${pkgs.pythonPackages.pyramid}/bin/pserve ${productionini}";
     };
 
     environment.systemPackages = [ pkgs.pythonPackages.almir ];
diff --git a/nixos/modules/services/backup/tarsnap.nix b/nixos/modules/services/backup/tarsnap.nix
index 03fbd29a191d..ac8f008069a6 100644
--- a/nixos/modules/services/backup/tarsnap.nix
+++ b/nixos/modules/services/backup/tarsnap.nix
@@ -33,8 +33,9 @@ in
           service called <literal>tarsnap-backup</literal> which is
           periodically run by cron, or you may run it on-demand.
 
-          See <link xlink:href='http://www.tarsnap.com/gettingstarted.html'>Getting Started</link> 
-          Tarsnap page.
+          See the Tarsnap <link
+          xlink:href='http://www.tarsnap.com/gettingstarted.html'>Getting
+          Started</link> page.
         '';
       };
 
@@ -46,7 +47,7 @@ in
           full name will be
           <literal>label-$(date+"%Y%m%d%H%M%S")</literal>. For
           example, by default your backups will look similar to
-          <literal>nixos-20140301021501</literal>.
+          <literal>nixos-20140301011501</literal>.
         '';
       };
 
@@ -110,8 +111,8 @@ in
         default = "15 01 * * *";
         description = ''
           This option defines (in the format used by cron) when
-          tarsnap is run for backups.  The default is to update at
-          01:15 at night every day.
+          tarsnap is run for backups. The default is to backup the
+          specified paths at 01:15 at night every day.
         '';
       };
 
diff --git a/nixos/modules/services/continuous-integration/jenkins/default.nix b/nixos/modules/services/continuous-integration/jenkins/default.nix
new file mode 100644
index 000000000000..c3dc59a9fbd0
--- /dev/null
+++ b/nixos/modules/services/continuous-integration/jenkins/default.nix
@@ -0,0 +1,118 @@
+{ config, pkgs, ... }:
+with pkgs.lib;
+let
+  cfg = config.services.jenkins;
+in {
+  options = {
+    services.jenkins = {
+      enable = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Whether to enable the jenkins continuous integration server.
+        '';
+      };
+
+      user = mkOption {
+        default = "jenkins";
+        type = with types; string;
+        description = ''
+          User the jenkins server should execute under.
+        '';
+      };
+
+      group = mkOption {
+        default = "jenkins";
+        type = with types; string;
+        description = ''
+          User the jenkins server should execute under.
+        '';
+      };
+
+      home = mkOption {
+        default = "/var/lib/jenkins";
+        type = with types; string;
+        description = ''
+          The path to use as JENKINS_HOME. If the default user "jenkins" is configured then
+          this is the home of the "jenkins" user.
+        '';
+      };
+
+      port = mkOption {
+        default = 8080;
+        type = types.uniq types.int;
+        description = ''
+          Specifies port number on which the jenkins HTTP interface listens. The default is 8080
+        '';
+      };
+
+      packages = mkOption {
+        default = [ pkgs.stdenv pkgs.git pkgs.jdk pkgs.openssh pkgs.nix ];
+        type = types.listOf types.package;
+        description = ''
+          Packages to add to PATH for the jenkins process.
+        '';
+      };
+
+      environment = mkOption {
+        default = { NIX_REMOTE = "daemon"; };
+        type = with types; attrsOf string;
+        description = ''
+          Additional environment variables to be passed to the jenkins process.
+          The environment will always include JENKINS_HOME.
+        '';
+      };
+    };
+  };
+
+  config = mkIf cfg.enable {
+    users.extraGroups = optional (cfg.group == "jenkins") {
+      name = "jenkins";
+      gid = config.ids.gids.jenkins;
+    };
+
+    users.extraUsers = optional (cfg.user == "jenkins") {
+      name = "jenkins";
+      description = "jenkins user";
+      createHome = true;
+      home = cfg.home;
+      group = cfg.group;
+      useDefaultShell = true;
+      uid = config.ids.uids.jenkins;
+    };
+
+    systemd.services.jenkins = {
+      description = "Jenkins Continuous Integration Server";
+      after = [ "network.target" ];
+      wantedBy = [ "multi-user.target" ];
+
+      environment = {
+        JENKINS_HOME = cfg.home;
+      } // cfg.environment;
+
+      path = cfg.packages;
+
+      script = ''
+        ${pkgs.jdk}/bin/java -jar ${pkgs.jenkins} --httpPort=${toString cfg.port}
+      '';
+
+      postStart = ''
+        until ${pkgs.curl}/bin/curl -s -L localhost:${toString cfg.port} ; do
+          sleep 10
+        done
+        while true ; do
+          index=`${pkgs.curl}/bin/curl -s -L localhost:${toString cfg.port}`
+          if [[ !("$index" =~ 'Please wait while Jenkins is restarting' ||
+                  "$index" =~ 'Please wait while Jenkins is getting ready to work') ]]; then
+            exit 0
+          fi
+          sleep 30
+        done
+      '';
+
+      serviceConfig = {
+        User = cfg.user;
+      };
+    };
+  };
+}
diff --git a/nixos/modules/services/continuous-integration/jenkins/slave.nix b/nixos/modules/services/continuous-integration/jenkins/slave.nix
new file mode 100644
index 000000000000..1d31ab830f6c
--- /dev/null
+++ b/nixos/modules/services/continuous-integration/jenkins/slave.nix
@@ -0,0 +1,67 @@
+{ config, pkgs, ... }:
+with pkgs.lib;
+let
+  cfg = config.services.jenkinsSlave;
+  masterCfg = config.services.jenkins;
+in {
+  options = {
+    services.jenkinsSlave = {
+      # todo:
+      # * assure the profile of the jenkins user has a JRE and any specified packages. This would
+      # enable ssh slaves.
+      # * Optionally configure the node as a jenkins ad-hoc slave. This would imply configuration
+      # properties for the master node.
+      enable = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          If true the system will be configured to work as a jenkins slave.
+          If the system is also configured to work as a jenkins master then this has no effect.
+          In progress: Currently only assures the jenkins user is configured.
+        '';
+      };
+
+      user = mkOption {
+        default = "jenkins";
+        type = with types; string;
+        description = ''
+          User the jenkins slave agent should execute under.
+        '';
+      };
+
+      group = mkOption {
+        default = "jenkins";
+        type = with types; string;
+        description = ''
+          User the jenkins slave agent should execute under.
+        '';
+      };
+
+      home = mkOption {
+        default = "/var/lib/jenkins";
+        type = with types; string;
+        description = ''
+          The path to use as JENKINS_HOME. If the default user "jenkins" is configured then
+          this is the home of the "jenkins" user.
+        '';
+      };
+    };
+  };
+
+  config = mkIf (cfg.enable && !masterCfg.enable) {
+    users.extraGroups = optional (cfg.group == "jenkins") {
+      name = "jenkins";
+      gid = config.ids.gids.jenkins;
+    };
+
+    users.extraUsers = optional (cfg.user == "jenkins") {
+      name = "jenkins";
+      description = "jenkins user";
+      createHome = true;
+      home = cfg.home;
+      group = cfg.group;
+      useDefaultShell = true;
+      uid = config.ids.uids.jenkins;
+    };
+  };
+}
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix
index 62fbc2a1415b..44fb0062f928 100644
--- a/nixos/modules/services/databases/mysql.nix
+++ b/nixos/modules/services/databases/mysql.nix
@@ -15,7 +15,7 @@ let
   pidFile = "${cfg.pidDir}/mysqld.pid";
 
   mysqldOptions =
-    "--user=${cfg.user} --datadir=${cfg.dataDir} " +
+    "--user=${cfg.user} --datadir=${cfg.dataDir} --basedir=${mysql} " +
     "--pid-file=${pidFile}";
 
   myCnf = pkgs.writeText "my.cnf"
@@ -250,9 +250,6 @@ in
               rm /tmp/mysql_init
             fi
           ''; # */
-
-        serviceConfig.ExecStop =
-          "${mysql}/bin/mysqladmin ${optionalString (cfg.rootPassword != null) "--user=root --password=\"$(cat ${cfg.rootPassword})\""} shutdown";
       };
 
   };
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index cc4230d4d6a7..a83b1a110fed 100644
--- a/nixos/modules/services/databases/postgresql.nix
+++ b/nixos/modules/services/databases/postgresql.nix
@@ -190,7 +190,7 @@ in
                 mkdir -m 0700 -p ${cfg.dataDir}
                 if [ "$(id -u)" = 0 ]; then
                   chown -R postgres ${cfg.dataDir}
-                  su -s ${pkgs.stdenv.shell} postgres -c 'initdb -U root'
+                  su -s ${pkgs.stdenv.shell} postgres -c initdb
                 else
                   # For non-root operation.
                   initdb
diff --git a/nixos/modules/services/misc/gpsd.nix b/nixos/modules/services/misc/gpsd.nix
index bc1d1f4575a8..99b733d399e2 100644
--- a/nixos/modules/services/misc/gpsd.nix
+++ b/nixos/modules/services/misc/gpsd.nix
@@ -19,6 +19,7 @@ in
     services.gpsd = {
 
       enable = mkOption {
+        type = types.bool;
         default = false;
         description = ''
           Whether to enable `gpsd', a GPS service daemon.
@@ -26,6 +27,7 @@ in
       };
 
       device = mkOption {
+        type = types.str;
         default = "/dev/ttyUSB0";
         description = ''
           A device may be a local serial device for GPS input, or a URL of the form:
@@ -35,6 +37,7 @@ in
       };
 
       readonly = mkOption {
+        type = types.bool;
         default = true;
         description = ''
           Whether to enable the broken-device-safety, otherwise
@@ -51,6 +54,7 @@ in
       };
 
       port = mkOption {
+        type = types.uniq types.int;
         default = 2947;
         description = ''
           The port where to listen for TCP connections.
@@ -58,6 +62,7 @@ in
       };
 
       debugLevel = mkOption {
+        type = types.uniq types.int;
         default = 0;
         description = ''
           The debugging level.
@@ -85,19 +90,20 @@ in
         inherit gid;
       };
 
-    jobs.gpsd =
-      { description = "GPSD daemon";
-
-        startOn = "ip-up";
-
-        exec =
-          ''
-            ${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}"  \
-              -S "${toString cfg.port}"                             \
-              ${if cfg.readonly then "-b" else ""}                  \
-              "${cfg.device}"
-          '';
+    systemd.services.gpsd = {
+      description = "GPSD daemon";
+      wantedBy = [ "multi-user.target" ];
+      after = [ "network.target" ];
+      serviceConfig = {
+        Type = "forking";
+        ExecStart = ''
+          ${pkgs.gpsd}/sbin/gpsd -D "${toString cfg.debugLevel}"  \
+            -S "${toString cfg.port}"                             \
+            ${if cfg.readonly then "-b" else ""}                  \
+            "${cfg.device}"
+        '';
       };
+    };
 
   };
 
diff --git a/nixos/modules/services/misc/nixos-manual.nix b/nixos/modules/services/misc/nixos-manual.nix
index 9a5b170d5e66..1a8b85db3290 100644
--- a/nixos/modules/services/misc/nixos-manual.nix
+++ b/nixos/modules/services/misc/nixos-manual.nix
@@ -63,7 +63,7 @@ in
 
     services.nixosManual.showManual = mkOption {
       type = types.bool;
-      default = true;
+      default = false;
       description = ''
         Whether to show the NixOS manual on one of the virtual
         consoles.
diff --git a/nixos/modules/services/monitoring/graphite.nix b/nixos/modules/services/monitoring/graphite.nix
index be57b8c5c03f..3e2e7e9df6ef 100644
--- a/nixos/modules/services/monitoring/graphite.nix
+++ b/nixos/modules/services/monitoring/graphite.nix
@@ -4,17 +4,31 @@ with pkgs.lib;
 
 let
   cfg = config.services.graphite;
-  writeTextOrNull = f: t: if t == null then null else pkgs.writeText f t;
+  writeTextOrNull = f: t: if t == null then null else pkgs.writeTextDir f t;
+
+  dataDir = cfg.dataDir;
+
+  configDir = pkgs.buildEnv {
+    name = "graphite-config";
+    paths = lists.filter (el: el != null) [
+      (writeTextOrNull "carbon.conf" cfg.carbon.config)
+      (writeTextOrNull "storage-agregation.conf" cfg.carbon.storageAggregation)
+      (writeTextOrNull "storage-schemas.conf" cfg.carbon.storageSchemas)
+      (writeTextOrNull "blacklist.conf" cfg.carbon.blacklist)
+      (writeTextOrNull "whitelist.conf" cfg.carbon.whitelist)
+      (writeTextOrNull "rewrite-rules.conf" cfg.carbon.rewriteRules)
+      (writeTextOrNull "relay-rules.conf" cfg.carbon.relayRules)
+      (writeTextOrNull "aggregation-rules.conf" cfg.carbon.aggregationRules)
+    ];
+  };
 
-  dataDir = "/var/db/graphite";
   carbonOpts = name: with config.ids; ''
-    --nodaemon --syslog --prefix=${name} --pidfile /var/run/${name}.pid \
-    --uid ${toString uids.graphite} --gid ${toString uids.graphite} ${name}
+    --nodaemon --syslog --prefix=${name} --pidfile ${dataDir}/${name}.pid ${name}
   '';
   carbonEnv = {
     PYTHONPATH = "${pkgs.python27Packages.carbon}/lib/python2.7/site-packages";
     GRAPHITE_ROOT = dataDir;
-    GRAPHITE_CONF_DIR = "/etc/graphite/";
+    GRAPHITE_CONF_DIR = configDir;
     GRAPHITE_STORAGE_DIR = dataDir;
   };
 
@@ -23,6 +37,14 @@ in {
   ###### interface
 
   options.services.graphite = {
+    dataDir = mkOption {
+      type = types.path;
+      default = "/var/db/graphite";
+      description = ''
+        Data directory for graphite.
+      '';
+    };
+
     web = {
       enable = mkOption {
         description = "Whether to enable graphite web frontend";
@@ -38,8 +60,8 @@ in {
 
       port = mkOption {
         description = "Graphite web frontend port";
-        default = "8080";
-        type = types.str;
+        default = 8080;
+        type = types.int;
       };
     };
 
@@ -152,31 +174,17 @@ in {
   ###### implementation
 
   config = mkIf (cfg.carbon.enableAggregator || cfg.carbon.enableCache || cfg.carbon.enableRelay || cfg.web.enable) {
-    environment.etc = lists.filter (el: el.source != null) [
-      { source = writeTextOrNull "carbon.conf" cfg.carbon.config;
-        target = "graphite/carbon.conf"; }
-      { source = writeTextOrNull "storage-agregation.conf" cfg.carbon.storageAggregation;
-        target = "graphite/storage-agregation.conf"; }
-      { source = writeTextOrNull "storage-schemas.conf" cfg.carbon.storageSchemas;
-        target = "graphite/storage-schemas.conf"; }
-      { source = writeTextOrNull "blacklist.conf" cfg.carbon.blacklist;
-        target = "graphite/blacklist.conf"; }
-      { source = writeTextOrNull "whitelist.conf" cfg.carbon.whitelist;
-        target = "graphite/whitelist.conf"; }
-      { source = writeTextOrNull "rewrite-rules.conf" cfg.carbon.rewriteRules;
-        target = "graphite/rewrite-rules.conf"; }
-      { source = writeTextOrNull "relay-rules.conf" cfg.carbon.relayRules;
-        target = "graphite/relay-rules.conf"; }
-      { source = writeTextOrNull "aggregation-rules.conf" cfg.carbon.aggregationRules;
-        target = "graphite/aggregation-rules.conf"; }
-    ];
-
-    systemd.services.carbonCache = mkIf cfg.carbon.enableCache {
+    systemd.services.carbonCache = {
+      enable = cfg.carbon.enableCache;
       description = "Graphite Data Storage Backend";
       wantedBy = [ "multi-user.target" ];
       after = [ "network-interfaces.target" ];
       environment = carbonEnv;
-      serviceConfig.ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-cache"}";
+      serviceConfig = {
+        ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-cache"}";
+        User = "graphite";
+        Group = "graphite";
+      };
       restartTriggers = [
         pkgs.pythonPackages.carbon
         cfg.carbon.config
@@ -185,33 +193,45 @@ in {
         cfg.carbon.rewriteRules
       ];
       preStart = ''
-        mkdir -p ${dataDir}/whisper
+        mkdir -m 0700 -p ${cfg.dataDir}/whisper
+        if [ "$(id -u)" = 0 ]; then chown -R graphite:graphite ${cfg.dataDir}; fi
       '';
     };
 
-    systemd.services.carbonAggregator = mkIf cfg.carbon.enableAggregator {
+    systemd.services.carbonAggregator = {
+      enable = cfg.carbon.enableAggregator;
       description = "Carbon Data Aggregator";
       wantedBy = [ "multi-user.target" ];
       after = [ "network-interfaces.target" ];
       environment = carbonEnv;
-      serviceConfig.ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-aggregator"}";
+      serviceConfig = {
+        ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-aggregator"}";
+        User = "graphite";
+        Group = "graphite";
+      };
       restartTriggers = [
         pkgs.pythonPackages.carbon cfg.carbon.config cfg.carbon.aggregationRules
       ];
     };
 
-    systemd.services.carbonRelay = mkIf cfg.carbon.enableRelay {
+    systemd.services.carbonRelay = {
+      enable = cfg.carbon.enableRelay;
       description = "Carbon Data Relay";
       wantedBy = [ "multi-user.target" ];
       after = [ "network-interfaces.target" ];
       environment = carbonEnv;
-      serviceConfig.ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-relay"}";
+      serviceConfig = {
+        ExecStart = "${pkgs.twisted}/bin/twistd ${carbonOpts "carbon-relay"}";
+        User = "graphite";
+        Group = "graphite";
+      };
       restartTriggers = [
         pkgs.pythonPackages.carbon cfg.carbon.config cfg.carbon.relayRules
       ];
     };
 
-    systemd.services.graphiteWeb = mkIf cfg.web.enable {
+    systemd.services.graphiteWeb = {
+      enable = cfg.web.enable;
       description = "Graphite Web Interface";
       wantedBy = [ "multi-user.target" ];
       after = [ "network-interfaces.target" ];
@@ -224,14 +244,15 @@ in {
       serviceConfig = {
         ExecStart = ''
           ${pkgs.python27Packages.waitress}/bin/waitress-serve \
-          --host=${cfg.web.host} --port=${cfg.web.port} \
+          --host=${cfg.web.host} --port=${toString cfg.web.port} \
           --call django.core.handlers.wsgi:WSGIHandler'';
         User = "graphite";
         Group = "graphite";
       };
       preStart = ''
         if ! test -e ${dataDir}/db-created; then
-          mkdir -p ${dataDir}/{whisper/,log/webapp/}
+          mkdir -m 0700 -p ${dataDir}/{whisper/,log/webapp/}
+          if [ "$(id -u)" = 0 ]; then chown -R graphite:graphite ${cfg.dataDir}; fi
 
           # populate database
           ${pkgs.python27Packages.graphite_web}/bin/manage-graphite.py syncdb --noinput
@@ -259,7 +280,6 @@ in {
       uid = config.ids.uids.graphite;
       description = "Graphite daemon user";
       home = dataDir;
-      createHome = true;
     };
     users.extraGroups.graphite.gid = config.ids.gids.graphite;
   };
diff --git a/nixos/modules/services/monitoring/statsd.nix b/nixos/modules/services/monitoring/statsd.nix
index 979debefdd9f..54b7e79f82eb 100644
--- a/nixos/modules/services/monitoring/statsd.nix
+++ b/nixos/modules/services/monitoring/statsd.nix
@@ -64,13 +64,13 @@ in
 
     graphiteHost = mkOption {
       description = "Hostname or IP of Graphite server";
-      default = "127.0.0.1";
+      default = config.services.graphite.web.host;
       type = types.str;
     };
 
     graphitePort = mkOption {
       description = "Port of Graphite server";
-      default = 2003;
+      default = config.services.graphite.web.port;
       type = types.uniq types.int;
     };
 
diff --git a/nixos/modules/services/network-filesystems/openafs-client/default.nix b/nixos/modules/services/network-filesystems/openafs-client/default.nix
index 4a888b64bd34..b34ebc3663e3 100644
--- a/nixos/modules/services/network-filesystems/openafs-client/default.nix
+++ b/nixos/modules/services/network-filesystems/openafs-client/default.nix
@@ -46,6 +46,16 @@ in
         description = "Cache directory.";
       };
 
+      crypt = mkOption {
+        default = false;
+        description = "Whether to enable (weak) protocol encryption.";
+      };
+
+      sparse = mkOption {
+        default = false;
+        description = "Minimal cell list in /afs.";
+      };
+
     };
   };
 
@@ -70,18 +80,23 @@ in
         startOn = "started network-interfaces";
         stopOn = "stopping network-interfaces";
 
-	preStart = ''
-	  mkdir -m 0755 /afs || true
-	  mkdir -m 0755 -p ${cfg.cacheDirectory} || true
+        preStart = ''
+          mkdir -p -m 0755 /afs
+          mkdir -m 0700 -p ${cfg.cacheDirectory}
           ${pkgs.module_init_tools}/sbin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true
-          ${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} -dynroot -fakestat
-	'';
-
-	postStop = ''
-	  umount /afs
+          ${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} ${if cfg.sparse then "-dynroot-sparse" else "-dynroot"} -fakestat -afsdb
+          ${openafsPkgs}/bin/fs setcrypt ${if cfg.crypt then "on" else "off"}
+        '';
+
+        # Doing this in preStop, because after these commands AFS is basically
+        # stopped, so systemd has nothing to do, just noticing it.  If done in
+        # postStop, then we get a hang + kernel oops, because AFS can't be
+        # stopped simply by sending signals to processes.
+        preStop = ''
+          ${pkgs.utillinux}/bin/umount /afs
           ${openafsPkgs}/sbin/afsd -shutdown
-	  rmmod libafs
-	'';
+          ${pkgs.module_init_tools}/sbin/rmmod libafs
+        '';
 
       };
 
diff --git a/nixos/modules/services/networking/btsync.nix b/nixos/modules/services/networking/btsync.nix
new file mode 100644
index 000000000000..e7fb471ccf41
--- /dev/null
+++ b/nixos/modules/services/networking/btsync.nix
@@ -0,0 +1,280 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+  cfg = config.services.btsync;
+  listenAddr = cfg.httpListenAddr + ":" + (toString cfg.httpListenPort);
+
+  boolStr = x: if x then "true" else "false";
+  optionalEmptyStr = b: v: optionalString (b != "") v;
+
+  webUIConfig = optionalString cfg.enableWebUI
+    ''
+      "webui":
+      {
+        ${optionalEmptyStr cfg.httpLogin "\"login\":    \"${cfg.httpLogin}\","}
+        ${optionalEmptyStr cfg.httpPass  "\"password\": \"${cfg.httpPass}\","}
+        ${optionalEmptyStr cfg.apiKey    "\"api_key\":  \"${cfg.apiKey}\","}
+        "listen": "${listenAddr}"
+      }
+    '';
+
+  knownHosts = e:
+    optionalString (e ? "knownHosts")
+      (concatStringsSep "," (map (v: "\"${v}\"") e."knownHosts"));
+
+  sharedFoldersRecord = with pkgs.lib;
+    concatStringsSep "," (map (entry:
+      let helper = attr: v:
+        if (entry ? attr) then boolStr entry.attr else boolStr v;
+      in
+      ''
+        {
+          "secret": "${entry.secret}",
+          "dir":    "${entry.directory}",
+
+          "use_relay_server": ${helper "useRelayServer" true},
+          "use_tracker":      ${helper "useTracker"     true},
+          "use_dht":          ${helper "useDHT"        false},
+
+          "search_lan":       ${helper "searchLAN"      true},
+          "use_sync_trash":   ${helper "useSyncTrash"   true},
+
+          "known_hosts": [${knownHosts entry}]
+        }
+      '') cfg.sharedFolders);
+
+  sharedFoldersConfig = optionalString (cfg.sharedFolders != [])
+    ''
+      "shared_folders":
+        [
+        ${sharedFoldersRecord}
+        ]
+    '';
+
+  configFile = pkgs.writeText "btsync.config"
+    ''
+      {
+        "device_name":     "${cfg.deviceName}",
+        "storage_path":    "/var/lib/btsync",
+        "listening_port":  ${toString cfg.listeningPort},
+        "use_gui":         false,
+
+        "check_for_updates": ${boolStr cfg.checkForUpdates},
+        "use_upnp":          ${boolStr cfg.useUpnp},
+        "download_limit":    ${toString cfg.downloadLimit},
+        "upload_limit":      ${toString cfg.uploadLimit},
+        "lan_encrypt_data":  ${boolStr cfg.encryptLAN},
+
+        ${webUIConfig}
+        ${sharedFoldersConfig}
+      }
+    '';
+in
+{
+  options = {
+    services.btsync = {
+      enable = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          If enabled, start the Bittorrent Sync daemon. Once enabled,
+          you can interact with the service through the Web UI, or
+          configure it in your NixOS configuration. Enabling the
+          <literal>btsync</literal> service also installs a
+          multi-instance systemd unit which can be used to start
+          user-specific copies of the daemon. Once installed, you can
+          use <literal>systemctl start btsync@user</literal> to start
+          the daemon only for user <literal>user</literal>, using the
+          configuration file located at
+          <literal>$HOME/.config/btsync.conf</literal>
+        '';
+      };
+
+      deviceName = mkOption {
+        type = types.str;
+        example = "Voltron";
+        description = ''
+          Name of the Bittorrent Sync device.
+        '';
+      };
+
+      listeningPort = mkOption {
+        type = types.int;
+        default = 0;
+        example = 44444;
+        description = ''
+          Listening port. Defaults to 0 which randomizes the port.
+        '';
+      };
+
+      checkForUpdates = mkOption {
+        type = types.bool;
+        default = true;
+        description = ''
+          Determines whether to check for updates and alert the user
+          about them in the UI.
+        '';
+      };
+
+      useUpnp = mkOption {
+        type = types.bool;
+        default = true;
+        description = ''
+          Use Universal Plug-n-Play (UPnP)
+        '';
+      };
+
+      downloadLimit = mkOption {
+        type = types.int;
+        default = 0;
+        example = 1024;
+        description = ''
+          Download speed limit. 0 is unlimited (default).
+        '';
+      };
+
+      uploadLimit = mkOption {
+        type = types.int;
+        default = 0;
+        example = 1024;
+        description = ''
+          Upload speed limit. 0 is unlimited (default).
+        '';
+      };
+
+      httpListenAddr = mkOption {
+        type = types.str;
+        default = "0.0.0.0";
+        example = "1.2.3.4";
+        description = ''
+          HTTP address to bind to.
+        '';
+      };
+
+      httpListenPort = mkOption {
+        type = types.int;
+        default = 9000;
+        description = ''
+          HTTP port to bind on.
+        '';
+      };
+
+      httpLogin = mkOption {
+        type = types.str;
+        example = "allyourbase";
+        description = ''
+          HTTP web login username.
+        '';
+      };
+
+      httpPass = mkOption {
+        type = types.str;
+        example = "arebelongtous";
+        description = ''
+          HTTP web login password.
+        '';
+      };
+
+      encryptLAN = mkOption {
+        type = types.bool;
+        default = true;
+        description = "Encrypt LAN data.";
+      };
+
+      enableWebUI = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Enable Web UI for administration. Bound to the specified
+          <literal>httpListenAddress</literal> and
+          <literal>httpListenPort</literal>.
+          '';
+      };
+
+      apiKey = mkOption {
+        type = types.str;
+        default = "";
+        description = "API key, which enables the developer API.";
+      };
+
+      sharedFolders = mkOption {
+        default = [];
+        example =
+          [ { secret         = "AHMYFPCQAHBM7LQPFXQ7WV6Y42IGUXJ5Y";
+              directory      = "/home/user/sync_test";
+              useRelayServer = true;
+              useTracker     = true;
+              useDHT         = false;
+              searchLAN      = true;
+              useSyncTrash   = true;
+              knownHosts     =
+                [ "192.168.1.2:4444"
+                  "192.168.1.3:4444"
+                ];
+            }
+          ];
+        description = ''
+          Shared folder list. If enabled, web UI must be
+          disabled. Secrets can be generated using <literal>btsync
+          --generate-secret</literal>. Note that this secret will be
+          put inside the Nix store, so it is realistically not very
+          secret.
+        '';
+      };
+    };
+  };
+
+  config = mkIf cfg.enable {
+    assertions =
+      [ { assertion = cfg.deviceName != "";
+          message   = "Device name cannot be empty.";
+        }
+        { assertion = cfg.enableWebUI -> cfg.sharedFolders == [];
+          message   = "If using shared folders, the web UI cannot be enabled.";
+        }
+        { assertion = cfg.apiKey != "" -> cfg.enableWebUI;
+          message   = "If you're using an API key, you must enable the web server.";
+        }
+        # TODO FIXME: the README says not specifying the login/pass means it
+        # should disable authentication, but apparently it doesn't?
+        { assertion = cfg.enableWebUI -> cfg.httpLogin != "" && cfg.httpPass != "";
+          message   = "If using the web UI, you must configure a login/password.";
+        }
+        # TODO FIXME: assert the existence of sharedFolder directories?
+      ];
+
+    users.extraUsers.btsync = {
+      description     = "Bittorrent Sync Service user";
+      home            = "/var/lib/btsync";
+      createHome      = true;
+      uid             = config.ids.uids.btsync;
+    };
+
+    systemd.services.btsync = with pkgs; {
+      description = "Bittorrent Sync Service";
+      wantedBy    = [ "multi-user.target" ];
+      after       = [ "network.target" ];
+      serviceConfig = {
+        Restart   = "on-abort";
+        User      = "btsync";
+        ExecStart =
+          "${bittorrentSync}/bin/btsync --nodaemon --config ${configFile}";
+      };
+    };
+
+    systemd.services."btsync@" = with pkgs; {
+      description = "Bittorrent Sync Service for %i";
+      after       = [ "network.target" ];
+      serviceConfig = {
+        Restart   = "on-abort";
+        User      = "%i";
+        ExecStart =
+          "${bittorrentSync}/bin/btsync --nodaemon --config %h/.config/btsync.conf";
+      };
+    };
+
+    environment.systemPackages = [ pkgs.bittorrentSync ];
+  };
+}
diff --git a/nixos/modules/services/networking/firewall.nix b/nixos/modules/services/networking/firewall.nix
index babde3e942b3..07e05fa6d051 100644
--- a/nixos/modules/services/networking/firewall.nix
+++ b/nixos/modules/services/networking/firewall.nix
@@ -171,6 +171,17 @@ in
         '';
     };
 
+    networking.firewall.pingLimit = mkOption {
+      default = null;
+      type = types.nullOr (types.separatedString " ");
+      description =
+        ''
+          If pings are allowed, this allows setting rate limits
+          on them. If non-null, this option should be in the form
+          of flags like "-limit 1/minute -limit-burst 5"
+        '';
+    };
+
     networking.firewall.checkReversePath = mkOption {
       default = kernelHasRPFilter;
       type = types.bool;
@@ -375,7 +386,9 @@ in
 
             # Optionally respond to ICMPv4 pings.
             ${optionalString cfg.allowPing ''
-              iptables -A nixos-fw -p icmp --icmp-type echo-request -j nixos-fw-accept
+              iptables -A nixos-fw -p icmp --icmp-type echo-request ${optionalString (cfg.pingLimit != null)
+                "-m limit ${cfg.pingLimit} "
+              }-j nixos-fw-accept
             ''}
 
             # Accept all ICMPv6 messages except redirects and node
diff --git a/nixos/modules/services/networking/ngircd.nix b/nixos/modules/services/networking/ngircd.nix
new file mode 100644
index 000000000000..49e5f3559803
--- /dev/null
+++ b/nixos/modules/services/networking/ngircd.nix
@@ -0,0 +1,58 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.services.ngircd;
+
+  configFile = pkgs.stdenv.mkDerivation {
+    name = "ngircd.conf";
+
+    text = cfg.config;
+
+    preferLocalBuild = true;
+
+    buildCommand = ''
+      echo -n "$text" > $out
+      ${cfg.package}/sbin/ngircd --config $out --configtest
+    '';
+  };
+in {
+  options = {
+    services.ngircd = {
+      enable = mkEnableOption "the ngircd IRC server";
+
+      config = mkOption {
+        description = "The ngircd configuration (see ngircd.conf(5)).";
+
+        type = types.lines;
+      };
+
+      package = mkOption {
+        description = "The ngircd package.";
+
+        type = types.package;
+
+        default = pkgs.ngircd;
+      };
+    };
+  };
+
+  config = mkIf cfg.enable {
+    #!!! TODO: Use ExecReload (see https://github.com/NixOS/nixpkgs/issues/1988)
+    systemd.services.ngircd = {
+      description = "The ngircd IRC server";
+
+      wantedBy = [ "multi-user.target" ];
+
+      serviceConfig.ExecStart = "${cfg.package}/sbin/ngircd --config ${configFile} --nodaemon";
+
+      serviceConfig.User = "ngircd";
+    };
+
+    users.extraUsers.ngircd = {
+      uid = config.ids.uids.ngircd;
+      description = "ngircd user.";
+    };
+  };
+}
diff --git a/nixos/modules/services/networking/notbit.nix b/nixos/modules/services/networking/notbit.nix
new file mode 100644
index 000000000000..83dafd083791
--- /dev/null
+++ b/nixos/modules/services/networking/notbit.nix
@@ -0,0 +1,93 @@
+{ config, pkgs, ... }:
+
+let
+  cfg = config.services.notbit;
+  varDir = "/var/lib/notbit";
+  
+  sendmail = pkgs.stdenv.mkDerivation {
+    name = "notbit-wrapper";
+    buildInputs = [ pkgs.makeWrapper ];
+    propagatedBuildInputs = [ pkgs.notbit ];
+    buildCommand = ''
+      mkdir -p $out/bin
+      makeWrapper ${pkgs.notbit}/bin/notbit-sendmail $out/bin/notbit-system-sendmail \
+        --set XDG_RUNTIME_DIR ${varDir}
+    '';
+  };
+in
+
+with pkgs.lib;
+{
+
+  ### configuration
+
+  options = {
+
+    services.notbit = {
+
+      enable = mkOption {
+        type = types.uniq types.bool;
+        default = false;
+        description = ''
+          Enables the notbit daemon and provides a sendmail binary named `notbit-system-sendmail` for sending mail over the system instance of notbit. Users must be in the notbit group in order to send mail over the system notbit instance. Currently mail recipt is not supported.
+        '';
+      };
+
+      port = mkOption {
+        type = types.uniq types.int;
+        default = 8443;
+        description = "The port which the daemon listens for other bitmessage clients";
+      };
+
+      nice = mkOption {
+        type = types.uniq types.int;
+        default = 10;
+        description = "Set the nice level for the notbit daemon";
+      };
+
+    };
+
+  };
+
+  ### implementation
+
+  config = mkIf cfg.enable {
+
+    environment.systemPackages = [ pkgs.notbit sendmail ];
+
+    systemd.services.notbit = {
+      description = "Notbit daemon";
+      after = [ "network.target" ];
+      wantedBy = [ "multi-user.target" ];
+      path = [ pkgs.notbit ];
+      environment = { XDG_RUNTIME_DIR = varDir; };
+
+      postStart = ''
+        [ ! -f "${varDir}/addr" ] && notbit-keygen > ${varDir}/addr
+        chmod 0640 ${varDir}/{addr,notbit/notbit-ipc.lock}
+        chmod 0750 ${varDir}/notbit/{,notbit-ipc}
+      '';
+
+      serviceConfig = {
+        Type = "forking";
+        ExecStart = "${pkgs.notbit}/bin/notbit -d -p ${toString cfg.port}";
+        User = "notbit";
+        Group = "notbit";
+        UMask = "0077";
+        WorkingDirectory = varDir;
+        Nice = cfg.nice;
+      };
+    };
+
+    users.extraUsers.notbit = {
+      group = "notbit";
+      description = "Notbit daemon user";
+      home = varDir;
+      createHome = true;
+      uid = config.ids.uids.notbit;
+    };
+
+    users.extraGroups.notbit.gid = config.ids.gids.notbit;
+  };
+
+}
diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix
index b3d934862abf..d647301889af 100644
--- a/nixos/modules/services/search/elasticsearch.nix
+++ b/nixos/modules/services/search/elasticsearch.nix
@@ -5,16 +5,22 @@ with pkgs.lib;
 let
   cfg = config.services.elasticsearch;
 
-  es_home = "/var/lib/elasticsearch";
-
-  configFile = pkgs.writeText "elasticsearch.yml" ''
+  esConfig = ''
     network.host: ${cfg.host}
-    network.port: ${cfg.port}
-    network.tcp.port: ${cfg.tcp_port}
+    network.port: ${toString cfg.port}
+    network.tcp.port: ${toString cfg.tcp_port}
     cluster.name: ${cfg.cluster_name}
     ${cfg.extraConf}
   '';
 
+  configDir = pkgs.buildEnv {
+    name = "elasticsearch-config";
+    paths = [
+      (pkgs.writeTextDir "elasticsearch.yml" esConfig)
+      (pkgs.writeTextDir "logging.yml" cfg.logging)
+    ];
+  };
+
 in {
 
   ###### interface
@@ -34,14 +40,14 @@ in {
 
     port = mkOption {
       description = "Elasticsearch port to listen for HTTP traffic";
-      default = "9200";
-      type = types.str;
+      default = 9200;
+      type = types.int;
     };
 
     tcp_port = mkOption {
       description = "Elasticsearch port for the node to node communication";
-      default = "9300";
-      type = types.str;
+      default = 9300;
+      type = types.int;
     };
 
     cluster_name = mkOption {
@@ -79,27 +85,32 @@ in {
       '';
       type = types.str;
     };
+
+    dataDir = mkOption {
+      type = types.path;
+      default = "/var/lib/elasticsearch";
+      description = ''
+        Data directory for elasticsearch.
+      '';
+    };
   };
 
   ###### implementation
 
   config = mkIf cfg.enable {
-    environment.etc = [
-      { source = configFile;
-        target = "elasticsearch/elasticsearch.yml"; }
-      { source = pkgs.writeText "logging.yml" cfg.logging;
-        target = "elasticsearch/logging.yml"; }
-    ];
-
     systemd.services.elasticsearch = {
       description = "Elasticsearch daemon";
       wantedBy = [ "multi-user.target" ];
       after = [ "network-interfaces.target" ];
-      environment = { ES_HOME = es_home; };
+      environment = { ES_HOME = cfg.dataDir; };
       serviceConfig = {
-        ExecStart = "${pkgs.elasticsearch}/bin/elasticsearch -f -Des.path.conf=/etc/elasticsearch";
+        ExecStart = "${pkgs.elasticsearch}/bin/elasticsearch -f -Des.path.conf=${configDir}";
         User = "elasticsearch";
       };
+      preStart = ''
+        mkdir -m 0700 -p ${cfg.dataDir}
+        if [ "$(id -u)" = 0 ]; then chown -R elasticsearch ${cfg.dataDir}; fi
+      '';
     };
 
     environment.systemPackages = [ pkgs.elasticsearch ];
@@ -108,8 +119,7 @@ in {
       name = "elasticsearch";
       uid = config.ids.uids.elasticsearch;
       description = "Elasticsearch daemon user";
-      home = es_home;
-      createHome = true;
+      home = cfg.dataDir;
     };
   };
 }
diff --git a/nixos/modules/services/search/solr.nix b/nixos/modules/services/search/solr.nix
index eab18c4229b7..a79b1194c80e 100644
--- a/nixos/modules/services/search/solr.nix
+++ b/nixos/modules/services/search/solr.nix
@@ -6,6 +6,26 @@ let
 
   cfg = config.services.solr;
 
+  # Assemble all jars needed for solr
+  solrJars = pkgs.stdenv.mkDerivation {
+    name = "solr-jars";
+
+    src = pkgs.fetchurl {
+      url = http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.36/bin/apache-tomcat-5.5.36.tar.gz;
+      sha256 = "01mzvh53wrs1p2ym765jwd00gl6kn8f9k3nhdrnhdqr8dhimfb2p";
+    };
+
+    buildPhases = [ "unpackPhase" "installPhase" ];
+
+    installPhase = ''
+      mkdir -p $out/lib
+      cp common/lib/*.jar $out/lib/
+      ln -s ${pkgs.ant}/lib/ant/lib/ant.jar $out/lib/
+      ln -s ${cfg.solrPackage}/lib/ext/* $out/lib/
+      ln -s ${pkgs.openjdk}/lib/openjdk/lib/tools.jar $out/lib/
+    '';
+  };
+
 in {
 
   options = {
@@ -101,7 +121,8 @@ in {
       inherit (cfg) user group javaPackage;
       warFile = "${cfg.solrPackage}/lib/solr.war";
       extraOptions = [
-        "--commonLibFolder=${cfg.solrPackage}/lib/ext"
+        "--commonLibFolder=${solrJars}/lib"
+        "--useJasper"
       ] ++ cfg.extraWinstoneOptions;
       extraJavaOptions = [
         "-Dsolr.solr.home=${cfg.solrHome}"
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index 1a39fe43bbee..621536133554 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -9,6 +9,11 @@ let
     user ${cfg.user} ${cfg.group};
     daemon off;
     ${cfg.config}
+    ${optionalString (cfg.httpConfig != "") ''
+    http {
+      ${cfg.httpConfig}
+    }
+    ''}
     ${cfg.appendConfig}
   '';
 in
@@ -51,6 +56,12 @@ in
         '';
       };
 
+      httpConfig = mkOption {
+        type = types.lines;
+        default = "";
+        description = "Configuration lines to be appended inside of the http {} block.";
+      };
+
       stateDir = mkOption {
         default = "/var/spool/nginx";
         description = "
diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix
index 456975015a22..85be61bfc1e9 100644
--- a/nixos/modules/services/x11/desktop-managers/gnome3.nix
+++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix
@@ -43,7 +43,7 @@ in {
         '';
       };
 
-    environment.variables.GIO_EXTRA_MODULES = "${gnome3.dconf}/lib/gio/modules";
+    environment.variables.GIO_EXTRA_MODULES = [ "${gnome3.dconf}/lib/gio/modules" ];
     environment.systemPackages =
       [ gnome3.evince
         gnome3.eog
diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix
index 3c67571ffd5b..9ce7744b0652 100644
--- a/nixos/modules/services/x11/desktop-managers/xfce.nix
+++ b/nixos/modules/services/x11/desktop-managers/xfce.nix
@@ -81,7 +81,7 @@ in
     environment.pathsToLink =
       [ "/share/xfce4" "/share/themes" "/share/mime" "/share/desktop-directories" "/share/gtksourceview-2.0" ];
 
-    environment.variables.GIO_EXTRA_MODULES = "${pkgs.xfce.gvfs}/lib/gio/modules";
+    environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.xfce.gvfs}/lib/gio/modules" ];
 
     # Enable helpful DBus services.
     services.udisks2.enable = true;
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix
index 327f3b7e1128..4cfd8a0b6187 100644
--- a/nixos/modules/system/boot/kernel.nix
+++ b/nixos/modules/system/boot/kernel.nix
@@ -203,6 +203,9 @@ in
 
         # To wait for SCSI devices to appear.
         "scsi_wait_scan"
+
+        # Needed by the stage 2 init script.
+        "rtc_cmos"
       ];
 
     boot.initrd.kernelModules =
diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh
index b749172a3ff3..ee042992b178 100644
--- a/nixos/modules/system/boot/stage-2-init.sh
+++ b/nixos/modules/system/boot/stage-2-init.sh
@@ -131,13 +131,12 @@ if ! mountpoint -q /run; then
     mount -t tmpfs -o "mode=0755,size=@runSize@" none /run
 fi
 
-# Create a ramfs on /run/keys to hold secrets that shouldn't
-# be written to disk (generally used for nixops, harmless
-# elsehwere)
+# Create a ramfs on /run/keys to hold secrets that shouldn't be
+# written to disk (generally used for NixOps, harmless elsewhere).
 if ! mountpoint -q /run/keys; then
     rm -rf /run/keys
     mkdir -m 0750 /run/keys
-    chown root:keys /run/keys
+    chown 0:96 /run/keys
     mount -t ramfs none /run/keys
 fi
 
@@ -162,6 +161,12 @@ echo "running activation script..."
 $systemConfig/activate
 
 
+# Restore the system time from the hardware clock.  We do this after
+# running the activation script to be sure that /etc/localtime points
+# at the current time zone.
+hwclock --hctosys
+
+
 # Record the boot configuration.
 ln -sfn "$systemConfig" /run/booted-system
 
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 7305fb17261a..49502b3e6851 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -130,6 +130,11 @@ let
     ++ optionals cfg.enableEmergencyMode [
       "emergency.target"
       "emergency.service"
+    ]
+
+    ++ optionals config.services.journald.enableHttpGateway [
+      "systemd-journal-gatewayd.socket"
+      "systemd-journal-gatewayd.service"
     ];
 
   upstreamWants =
@@ -371,6 +376,10 @@ let
 
       ln -s ../local-fs.target ../remote-fs.target ../network.target ../nss-lookup.target \
             ../nss-user-lookup.target ../swap.target $out/multi-user.target.wants/
+
+      ${ optionalString config.services.journald.enableHttpGateway ''
+      ln -s ../systemd-journal-gatewayd.service $out/multi-user-target.wants/
+      ''}
     ''; # */
 
 in
@@ -550,6 +559,14 @@ in
       '';
     };
 
+    services.journald.enableHttpGateway = mkOption {
+      default = false;
+      type = types.bool;
+      description = ''
+        Enable journal http gateway
+      '';
+    };
+
     services.logind.extraConfig = mkOption {
       default = "";
       type = types.lines;
@@ -659,6 +676,8 @@ in
       };
 
     users.extraGroups.systemd-journal.gid = config.ids.gids.systemd-journal;
+    users.extraUsers.systemd-journal-gateway.uid = config.ids.uids.systemd-journal-gateway;
+    users.extraGroups.systemd-journal-gateway.gid = config.ids.gids.systemd-journal-gateway;
 
     # Generate timer units for all services that have a ‘startAt’ value.
     systemd.timers =
diff --git a/nixos/modules/system/etc/etc.nix b/nixos/modules/system/etc/etc.nix
index a8f0a59b6fa9..e9c03df2ba34 100644
--- a/nixos/modules/system/etc/etc.nix
+++ b/nixos/modules/system/etc/etc.nix
@@ -19,6 +19,8 @@ let
     sources = map (x: x.source) etc';
     targets = map (x: x.target) etc';
     modes = map (x: x.mode) etc';
+    uids  = map (x: x.uid) etc';
+    gids  = map (x: x.gid) etc';
   };
 
 in
@@ -87,6 +89,24 @@ in
               '';
             };
 
+            uid = mkOption {
+              default = 0;
+              type = types.int;
+              description = ''
+                UID of created file. Only takes affect when the file is
+                copied (that is, the mode is not 'symlink').
+                '';
+            };
+
+            gid = mkOption {
+              default = 0;
+              type = types.int;
+              description = ''
+                GID of created file. Only takes affect when the file is
+                copied (that is, the mode is not 'symlink').
+              '';
+            };
+
           };
 
           config = {
diff --git a/nixos/modules/system/etc/make-etc.sh b/nixos/modules/system/etc/make-etc.sh
index 7cf68db9ddce..60d4ba1301a3 100644
--- a/nixos/modules/system/etc/make-etc.sh
+++ b/nixos/modules/system/etc/make-etc.sh
@@ -6,6 +6,8 @@ set -f
 sources_=($sources)
 targets_=($targets)
 modes_=($modes)
+uids_=($uids)
+gids_=($gids)
 set +f
 
 for ((i = 0; i < ${#targets_[@]}; i++)); do
@@ -35,6 +37,8 @@ for ((i = 0; i < ${#targets_[@]}; i++)); do
         
         if test "${modes_[$i]}" != symlink; then
             echo "${modes_[$i]}" > $out/etc/$target.mode
+            echo "${uids_[$i]}" > $out/etc/$target.uid
+            echo "${gids_[$i]}" > $out/etc/$target.gid
         fi
         
     fi
diff --git a/nixos/modules/system/etc/setup-etc.pl b/nixos/modules/system/etc/setup-etc.pl
index 4b79dbaab89e..8ba9a370b27a 100644
--- a/nixos/modules/system/etc/setup-etc.pl
+++ b/nixos/modules/system/etc/setup-etc.pl
@@ -60,7 +60,15 @@ sub link {
         if ($mode eq "direct-symlink") {
             atomicSymlink readlink("$static/$fn"), $target or warn;
         } else {
+            open UID, "<$_.uid";
+            my $uid = <UID>; chomp $uid;
+            close UID;
+            open GID, "<$_.gid";
+            my $gid = <GID>; chomp $gid;
+            close GID;
+
             copy "$static/$fn", "$target.tmp" or warn;
+            chown int($uid), int($gid), "$target.tmp" or warn;
             chmod oct($mode), "$target.tmp" or warn;
             rename "$target.tmp", $target or warn;
         }
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix
index 7c3c662eeac9..32e3da6a273c 100644
--- a/nixos/modules/tasks/filesystems/zfs.nix
+++ b/nixos/modules/tasks/filesystems/zfs.nix
@@ -11,18 +11,30 @@ with pkgs.lib;
 let
 
   cfgSpl = config.boot.spl;
+  cfgSnapshots = config.services.zfs.autoSnapshot;
+
   inInitrd = any (fs: fs == "zfs") config.boot.initrd.supportedFilesystems;
   inSystem = any (fs: fs == "zfs") config.boot.supportedFilesystems;
+
+  enableAutoSnapshots = cfgSnapshots.enable;
+  enableZfs = inInitrd || inSystem || enableAutoSnapshots;
+
   kernel = config.boot.kernelPackages;
 
+  autosnapPkg = pkgs.zfstools.override {
+    zfs = config.boot.kernelPackages.zfs;
+  };
+
+  zfsAutoSnap = "${autosnapPkg}/bin/zfs-auto-snapshot";
+
 in
 
 {
 
   ###### interface
-  
-  options = { 
-    boot.spl.hostid = mkOption { 
+
+  options = {
+    boot.spl.hostid = mkOption {
       default = "";
       example = "0xdeadbeef";
       description = ''
@@ -34,62 +46,177 @@ in
         manually import pools.
       '';
     };
-  };
 
-  ###### implementation
+    services.zfs.autoSnapshot = {
+      enable = mkOption {
+        default = false;
+        type = types.bool;
+        description = ''
+          Enable the (OpenSolaris-compatible) ZFS auto-snapshotting service.
+          Note that you must set the <literal>com.sun:auto-snapshot</literal>
+          property to <literal>true</literal> on all datasets which you wish
+          to auto-snapshot.
 
-  config = mkIf ( inInitrd || inSystem ) {
+          You can override a child dataset to use, or not use auto-snapshotting
+          by setting its flag with the given interval:
+          <literal>zfs set com.sun:auto-snapshot:weekly=false DATASET</literal>
+        '';
+      };
 
-    boot = { 
-      kernelModules = [ "spl" "zfs" ] ;
-      extraModulePackages = [ kernel.zfs kernel.spl ];
-      extraModprobeConfig = mkIf (cfgSpl.hostid != "") ''
-        options spl spl_hostid=${cfgSpl.hostid}
-      '';
-    };
+      frequent = mkOption {
+        default = 4;
+        type = types.int;
+        description = ''
+          Number of frequent (15-minute) auto-snapshots that you wish to keep.
+        '';
+      };
+
+      hourly = mkOption {
+        default = 24;
+        type = types.int;
+        description = ''
+          Number of hourly auto-snapshots that you wish to keep.
+        '';
+      };
+
+      daily = mkOption {
+        default = 7;
+        type = types.int;
+        description = ''
+          Number of daily auto-snapshots that you wish to keep.
+        '';
+      };
 
-    boot.initrd = mkIf inInitrd { 
-      kernelModules = [ "spl" "zfs" ] ;
-      extraUtilsCommands =
-        ''
-          cp -v ${kernel.zfs}/sbin/zfs $out/bin
-          cp -v ${kernel.zfs}/sbin/zdb $out/bin
-          cp -v ${kernel.zfs}/sbin/zpool $out/bin
-          cp -pdv ${kernel.zfs}/lib/lib*.so* $out/lib
-          cp -pdv ${pkgs.zlib}/lib/lib*.so* $out/lib
+      weekly = mkOption {
+        default = 4;
+        type = types.int;
+        description = ''
+          Number of weekly auto-snapshots that you wish to keep.
         '';
-      postDeviceCommands =
-        ''
-          zpool import -f -a -d /dev
+      };
+
+      monthly = mkOption {
+        default = 12;
+        type = types.int;
+        description = ''
+          Number of monthly auto-snapshots that you wish to keep.
         '';
+      };
     };
+  };
 
-    systemd.services."zpool-import" = {
-      description = "Import zpools";
-      after = [ "systemd-udev-settle.service" ];
-      serviceConfig = {
-        Type = "oneshot";
-        RemainAfterExit = true;
+  ###### implementation
+
+  config = mkMerge [
+    (mkIf enableZfs {
+      boot = {
+        kernelModules = [ "spl" "zfs" ] ;
+        extraModulePackages = [ kernel.zfs kernel.spl ];
+        extraModprobeConfig = mkIf (cfgSpl.hostid != "") ''
+          options spl spl_hostid=${cfgSpl.hostid}
+        '';
+      };
+
+      boot.initrd = mkIf inInitrd {
+        kernelModules = [ "spl" "zfs" ] ;
+        extraUtilsCommands =
+          ''
+            cp -v ${kernel.zfs}/sbin/zfs $out/bin
+            cp -v ${kernel.zfs}/sbin/zdb $out/bin
+            cp -v ${kernel.zfs}/sbin/zpool $out/bin
+            cp -pdv ${kernel.zfs}/lib/lib*.so* $out/lib
+            cp -pdv ${pkgs.zlib}/lib/lib*.so* $out/lib
+          '';
+        postDeviceCommands =
+          ''
+            zpool import -f -a
+          '';
+      };
+
+      systemd.services."zpool-import" = {
+        description = "Import zpools";
+        after = [ "systemd-udev-settle.service" ];
+        serviceConfig = {
+          Type = "oneshot";
+          RemainAfterExit = true;
+          ExecStart = "${kernel.zfs}/sbin/zpool import -f -a";
+        };
         restartIfChanged = false;
-        ExecStart = "${kernel.zfs}/sbin/zpool import -f -a -d /dev";
       };
-    };
 
-    systemd.services."zfs-mount" = {
-      description = "Mount ZFS Volumes";
-      after = [ "zpool-import.service" ];
-      wantedBy = [ "local-fs.target" ];
-      serviceConfig = {
-        Type = "oneshot";
-        RemainAfterExit = true;
+      systemd.services."zfs-mount" = {
+        description = "Mount ZFS Volumes";
+        after = [ "zpool-import.service" ];
+        wantedBy = [ "local-fs.target" ];
+        serviceConfig = {
+          Type = "oneshot";
+          RemainAfterExit = true;
+          ExecStart = "${kernel.zfs}/sbin/zfs mount -a";
+          ExecStop = "${kernel.zfs}/sbin/zfs umount -a";
+        };
         restartIfChanged = false;
-        ExecStart = "${kernel.zfs}/sbin/zfs mount -a";
-        ExecStop = "${kernel.zfs}/sbin/zfs umount -a";
       };
-    };
 
-    system.fsPackages = [ kernel.zfs ];                  # XXX: needed? zfs doesn't have (need) a fsck
-    environment.systemPackages = [ kernel.zfs ];
-    services.udev.packages = [ kernel.zfs ];             # to hook zvol naming, etc. 
-  };
+      system.fsPackages = [ kernel.zfs ];                  # XXX: needed? zfs doesn't have (need) a fsck
+      environment.systemPackages = [ kernel.zfs ];
+      services.udev.packages = [ kernel.zfs ];             # to hook zvol naming, etc.
+    })
+
+    (mkIf enableAutoSnapshots {
+      systemd.services."zfs-snapshot-frequent" = {
+        description = "ZFS auto-snapshotting every 15 mins";
+        after = [ "zpool-import.service" ];
+        serviceConfig = {
+          Type = "oneshot";
+          ExecStart = "${zfsAutoSnap} frequent ${toString cfgSnapshots.frequent}";
+        };
+        restartIfChanged = false;
+        startAt = "*:15,30,45";
+      };
+
+      systemd.services."zfs-snapshot-hourly" = {
+        description = "ZFS auto-snapshotting every hour";
+        after = [ "zpool-import.service" ];
+        serviceConfig = {
+          Type = "oneshot";
+          ExecStart = "${zfsAutoSnap} hourly ${toString cfgSnapshots.hourly}";
+        };
+        restartIfChanged = false;
+        startAt = "hourly";
+      };
+
+      systemd.services."zfs-snapshot-daily" = {
+        description = "ZFS auto-snapshotting every day";
+        after = [ "zpool-import.service" ];
+        serviceConfig = {
+          Type = "oneshot";
+          ExecStart = "${zfsAutoSnap} daily ${toString cfgSnapshots.daily}";
+        };
+        restartIfChanged = false;
+        startAt = "daily";
+      };
+
+      systemd.services."zfs-snapshot-weekly" = {
+        description = "ZFS auto-snapshotting every week";
+        after = [ "zpool-import.service" ];
+        serviceConfig = {
+          Type = "oneshot";
+          ExecStart = "${zfsAutoSnap} weekly ${toString cfgSnapshots.weekly}";
+        };
+        restartIfChanged = false;
+        startAt = "weekly";
+      };
+
+      systemd.services."zfs-snapshot-monthly" = {
+        description = "ZFS auto-snapshotting every month";
+        after = [ "zpool-import.service" ];
+        serviceConfig = {
+          Type = "oneshot";
+          ExecStart = "${zfsAutoSnap} monthly ${toString cfgSnapshots.monthly}";
+        };
+        restartIfChanged = false;
+        startAt = "monthly";
+      };
+    })
+  ];
 }
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index bbfcb62c5d7a..548685377a90 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -50,6 +50,26 @@ let
         '';
       };
 
+      ipv6Address = mkOption {
+        default = null;
+        example = "2001:1470:fffd:2098::e006";
+        type = types.nullOr types.string;
+        description = ''
+          IPv6 address of the interface.  Leave empty to configure the
+          interface using NDP.
+        '';
+      };
+
+      ipv6prefixLength = mkOption {
+        default = 64;
+        example = 64;
+        type = types.int;
+        description = ''
+          Subnet mask of the interface, specified as the number of
+          bits in the prefix (<literal>64</literal>).
+        '';
+      };
+
       macAddress = mkOption {
         default = null;
         example = "00:11:22:33:44:55";
@@ -437,6 +457,7 @@ in
           (let mask =
                 if i.prefixLength != null then toString i.prefixLength else
                 if i.subnetMask != "" then i.subnetMask else "32";
+               staticIPv6 = cfg.enableIPv6 && i.ipv6Address != null;
           in
           { description = "Configuration of ${i.name}";
             wantedBy = [ "network-interfaces.target" ];
@@ -470,11 +491,31 @@ in
                     echo "configuring interface..."
                     ip -4 addr flush dev "${i.name}"
                     ip -4 addr add "${i.ipAddress}/${mask}" dev "${i.name}"
+                    restart_network_setup=true
+                  else
+                    echo "skipping configuring interface"
+                  fi
+                ''
+              + optionalString (staticIPv6)
+                ''
+                  # Only do a flush/add if it's necessary.  This is
+                  # useful when the Nix store is accessed via this
+                  # interface (e.g. in a QEMU VM test).
+                  if ! ip -6 -o a show dev "${i.name}" | grep "${i.ipv6Address}/${toString i.ipv6prefixLength}"; then
+                    echo "configuring interface..."
+                    ip -6 addr flush dev "${i.name}"
+                    ip -6 addr add "${i.ipv6Address}/${toString i.ipv6prefixLength}" dev "${i.name}"
+                    restart_network_setup=true
+                  else
+                    echo "skipping configuring interface"
+                  fi
+                ''
+              + optionalString (i.ipAddress != null || staticIPv6)
+                ''
+                  if [ restart_network_setup = true ]; then
                     # Ensure that the default gateway remains set.
                     # (Flushing this interface may have removed it.)
                     ${config.systemd.package}/bin/systemctl try-restart --no-block network-setup.service
-                  else
-                    echo "skipping configuring interface"
                   fi
                   ${config.systemd.package}/bin/systemctl start ip-up.target
                 ''
diff --git a/nixos/modules/virtualisation/google-compute-image.nix b/nixos/modules/virtualisation/google-compute-image.nix
index 634932ff0077..5fca115b819c 100644
--- a/nixos/modules/virtualisation/google-compute-image.nix
+++ b/nixos/modules/virtualisation/google-compute-image.nix
@@ -1,7 +1,9 @@
 { config, pkgs, ... }:
 
 with pkgs.lib;
-
+let
+  diskSize = "100G";
+in
 {
   imports = [ ../profiles/headless.nix ../profiles/qemu-guest.nix ];
 
@@ -12,7 +14,7 @@ with pkgs.lib;
             ''
               mkdir $out
               diskImage=$out/$diskImageBase
-              truncate $diskImage --size 10G
+              truncate $diskImage --size ${diskSize}
               mv closure xchg/
             '';
 
@@ -20,8 +22,9 @@ with pkgs.lib;
             ''
               PATH=$PATH:${pkgs.gnutar}/bin:${pkgs.gzip}/bin
               pushd $out
-              tar -Szcf $diskImageBase.tar.gz $diskImageBase
-              rm $out/$diskImageBase
+              mv $diskImageBase disk.raw
+              tar -Szcf $diskImageBase.tar.gz disk.raw
+              rm $out/disk.raw
               popd
             '';
           diskImageBase = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
@@ -32,7 +35,7 @@ with pkgs.lib;
         ''
           # Create partition table
           ${pkgs.parted}/sbin/parted /dev/vda mklabel msdos
-          ${pkgs.parted}/sbin/parted /dev/vda mkpart primary ext4 1 10G
+          ${pkgs.parted}/sbin/parted /dev/vda mkpart primary ext4 1 ${diskSize}
           ${pkgs.parted}/sbin/parted /dev/vda print
           . /sys/class/block/vda1/uevent
           mknod /dev/vda1 b $MAJOR $MINOR
diff --git a/nixos/tests/default.nix b/nixos/tests/default.nix
index b37a0d5fa0c9..5b68862a2cd1 100644
--- a/nixos/tests/default.nix
+++ b/nixos/tests/default.nix
@@ -14,6 +14,7 @@ with import ../lib/testing.nix { inherit system minimal; };
   efi-installer = makeTests (import ./efi-installer.nix);
   gnome3 = makeTest (import ./gnome3.nix);
   ipv6 = makeTest (import ./ipv6.nix);
+  jenkins = makeTest (import ./jenkins.nix);
   kde4 = makeTest (import ./kde4.nix);
   #kexec = makeTest (import ./kexec.nix);
   login = makeTest (import ./login.nix {});
diff --git a/nixos/tests/jenkins.nix b/nixos/tests/jenkins.nix
new file mode 100644
index 000000000000..e6524ec56538
--- /dev/null
+++ b/nixos/tests/jenkins.nix
@@ -0,0 +1,35 @@
+# verifies:
+#   1. jenkins service starts on master node
+#   2. jenkins user can be extended on both master and slave
+#   3. jenkins service not started on slave node
+{ pkgs, ... }:
+{
+  nodes = {
+    master = { pkgs, config, ... }: {
+        services.jenkins.enable = true;
+
+        # should have no effect
+        services.jenkinsSlave.enable = true;
+
+        users.extraUsers.jenkins.extraGroups = [ "users" ];
+      };
+    slave = { pkgs, config, ... }: {
+        services.jenkinsSlave.enable = true;
+
+        users.extraUsers.jenkins.extraGroups = [ "users" ];
+      };
+  };
+
+  testScript = ''
+    startAll;
+
+    $master->waitForUnit("jenkins");
+    print $master->execute("sudo -u jenkins groups");
+    $master->mustSucceed("sudo -u jenkins groups | grep jenkins | grep users");
+
+    print $slave->execute("sudo -u jenkins groups");
+    $slave->mustSucceed("sudo -u jenkins groups | grep jenkins | grep users");
+
+    $slave->mustFail("systemctl status jenkins.service");
+  '';
+}
diff --git a/pkgs/applications/audio/a2jmidid/default.nix b/pkgs/applications/audio/a2jmidid/default.nix
index 9dbdada07d49..c5e35d8867c8 100644
--- a/pkgs/applications/audio/a2jmidid/default.nix
+++ b/pkgs/applications/audio/a2jmidid/default.nix
@@ -22,6 +22,6 @@ stdenv.mkDerivation rec {
     description = "Daemon for exposing legacy ALSA sequencer applications in JACK MIDI system";
     license = licenses.gpl2;
     maintainers = [ maintainers.goibhniu ];
-
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/audio/ardour/ardour3.nix b/pkgs/applications/audio/ardour/ardour3.nix
deleted file mode 100644
index 4315a5a7547e..000000000000
--- a/pkgs/applications/audio/ardour/ardour3.nix
+++ /dev/null
@@ -1,62 +0,0 @@
-{ stdenv, fetchgit, alsaLib, aubio, boost, cairomm, curl, fftw
-, fftwSinglePrec, flac, glibc, glibmm, gtk, gtkmm, jackaudio
-, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
-, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
-, libusb, libuuid, libxml2, libxslt, lilv, lv2, makeWrapper, pango
-, perl, pkgconfig, python, serd, sord, sratom, suil }:
-
-let
-  tag = "3.5.357";
-in
-
-stdenv.mkDerivation rec {
-  name = "ardour-${tag}";
-
-  src = fetchgit {
-    url = git://git.ardour.org/ardour/ardour.git;
-    rev = "refs/tags/${tag}";
-    sha256 = "1e026fb9a6ad4179d52c4b578cc3861bdfd3629b9e7b7a7341d431c7d3692c42";
-  };
-
-  buildInputs = 
-    [ alsaLib aubio boost cairomm curl fftw fftwSinglePrec flac glibc
-      glibmm gtk gtkmm jackaudio libgnomecanvas libgnomecanvasmm liblo
-      libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
-      libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv lv2
-      makeWrapper pango perl pkgconfig python serd sord sratom suil
-    ];
-
-  patchPhase = ''
-    # The funny revision number is from `git describe rev`
-    printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${tag}-gce4d125\"; }\n' > libs/ardour/revision.cc
-    # Note the different version number
-    sed -i '33i rev = \"3.5-357-gce4d125\"' wscript
-    sed 's|/usr/include/libintl.h|${glibc}/include/libintl.h|' -i wscript
-    sed -e 's|^#!/usr/bin/perl.*$|#!${perl}/bin/perl|g' -i tools/fmt-bindings
-    sed -e 's|^#!/usr/bin/env.*$|#!${perl}/bin/perl|g' -i tools/*.pl
-  '';
-
-  configurePhase = "python waf configure --optimize --prefix=$out";
-
-  buildPhase = "python waf";
-
-  # For the custom ardour clearlooks gtk-engine to work, it must be
-  # moved to a directory called "engines" and added to GTK_PATH
-  installPhase = ''
-    python waf install
-    mkdir -pv $out/gtk2/engines
-    cp build/libs/clearlooks-newer/libclearlooks.so $out/gtk2/engines/
-    wrapProgram $out/bin/ardour3 --prefix GTK_PATH : $out/gtk2
-  '';
-
-  meta = with stdenv.lib; {
-    description = "Multi-track hard disk recording software";
-    longDescription = ''
-      Also read "The importance of Paying Something" on their homepage, please!
-    '';
-    homepage = http://ardour.org/;
-    license = licenses.gpl2;
-    platforms = platforms.linux;
-    maintainers = [ maintainers.goibhniu ];
-  };
-}
diff --git a/pkgs/applications/audio/ardour/default.nix b/pkgs/applications/audio/ardour/default.nix
index 08cecfea064d..4315a5a7547e 100644
--- a/pkgs/applications/audio/ardour/default.nix
+++ b/pkgs/applications/audio/ardour/default.nix
@@ -1,51 +1,62 @@
-{ 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, libgnomecanvasmm, liblo, aubio
-, fftwSinglePrec, libmad, automake, autoconf, libtool, liblrdf, curl }:
+{ stdenv, fetchgit, alsaLib, aubio, boost, cairomm, curl, fftw
+, fftwSinglePrec, flac, glibc, glibmm, gtk, gtkmm, jackaudio
+, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
+, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
+, libusb, libuuid, libxml2, libxslt, lilv, lv2, makeWrapper, pango
+, perl, pkgconfig, python, serd, sord, sratom, suil }:
+
+let
+  tag = "3.5.357";
+in
 
 stdenv.mkDerivation rec {
-  name = "ardour-${version}";
-  version = "2.8.16";
+  name = "ardour-${tag}";
 
-  src = fetchurl {
-    url = "mirror://gentoo/distfiles/${name}.tar.bz2";
-    sha256 = "0h2y0x4yznalllja53anjil2gmgcb26f39zshc4gl1d1kc8k5vip";
+  src = fetchgit {
+    url = git://git.ardour.org/ardour/ardour.git;
+    rev = "refs/tags/${tag}";
+    sha256 = "1e026fb9a6ad4179d52c4b578cc3861bdfd3629b9e7b7a7341d431c7d3692c42";
   };
 
-  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 = 
+    [ alsaLib aubio boost cairomm curl fftw fftwSinglePrec flac glibc
+      glibmm gtk gtkmm jackaudio libgnomecanvas libgnomecanvasmm liblo
+      libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
+      libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv lv2
+      makeWrapper pango perl pkgconfig python serd sord sratom suil
+    ];
 
-  buildInputs = [
-    scons boost pkgconfig fftw librdf_raptor2 librdf_rasqal jackaudio
-    flac libsamplerate alsaLib libxml2 libxslt libsndfile libsigcxx
-    #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 SYSLIBS=1 install
+  patchPhase = ''
+    # The funny revision number is from `git describe rev`
+    printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${tag}-gce4d125\"; }\n' > libs/ardour/revision.cc
+    # Note the different version number
+    sed -i '33i rev = \"3.5-357-gce4d125\"' wscript
+    sed 's|/usr/include/libintl.h|${glibc}/include/libintl.h|' -i wscript
+    sed -e 's|^#!/usr/bin/perl.*$|#!${perl}/bin/perl|g' -i tools/fmt-bindings
+    sed -e 's|^#!/usr/bin/env.*$|#!${perl}/bin/perl|g' -i tools/*.pl
   '';
 
-  installPhase = ":";
+  configurePhase = "python waf configure --optimize --prefix=$out";
+
+  buildPhase = "python waf";
+
+  # For the custom ardour clearlooks gtk-engine to work, it must be
+  # moved to a directory called "engines" and added to GTK_PATH
+  installPhase = ''
+    python waf install
+    mkdir -pv $out/gtk2/engines
+    cp build/libs/clearlooks-newer/libclearlooks.so $out/gtk2/engines/
+    wrapProgram $out/bin/ardour3 --prefix GTK_PATH : $out/gtk2
+  '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Multi-track hard disk recording software";
     longDescription = ''
-      Broken: use ardour3-svn instead
       Also read "The importance of Paying Something" on their homepage, please!
     '';
     homepage = http://ardour.org/;
-    branch  = "2";
-    license = "GPLv2";
-    maintainers = [ stdenv.lib.maintainers.marcweber ];
-    platforms = stdenv.lib.platforms.linux;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
   };
 }
diff --git a/pkgs/applications/audio/ekho/default.nix b/pkgs/applications/audio/ekho/default.nix
new file mode 100644
index 000000000000..dd9b830be841
--- /dev/null
+++ b/pkgs/applications/audio/ekho/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl, pkgconfig
+, libsndfile, pulseaudio
+}:
+
+let
+  version = "5.8.2";
+in stdenv.mkDerivation rec {
+  name = "ekho-${version}";
+
+  meta = with stdenv.lib; {
+    description = "Chinese text-to-speech software";
+    homepage    = "http://www.eguidedog.net/ekho.php";
+    longDescription = ''
+      Ekho (余音) is a free, open source and multilingual text-to-speech (TTS)
+      software. It supports Cantonese (Chinese dialect spoken in Hong Kong and
+      part of Guangdong province), Mandarin (standard Chinese), Zhaoan Hakka
+      (a dialect in Taiwan), Tibetan, Ngangien (an ancient Chinese before
+      Yuan Dynasty) and Korean (in trial).
+    '';
+    license        = licenses.gpl2Plus;
+    platforms      = platforms.linux;
+    hydraPlatforms = [];
+    maintainers    = with maintainers; [ iyzsong ];
+  };
+
+  src = fetchurl {
+    url = "mirror://sourceforge/e-guidedog/Ekho/${version}/${name}.tar.xz";
+    sha256 = "0ym6lpcpsvwvsiwlzkl1509a2hljwcw7synngrmqjq1n49ww00nj";
+  };
+
+  preConfigure = with stdenv.lib; ''
+    NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE ${optionalString stdenv.is64bit "-D_x86_64"}"
+    NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -DEKHO_DATA_PATH=\"$out/share/ekho-data\""
+  '';
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [ libsndfile pulseaudio ];
+}
diff --git a/pkgs/applications/audio/gigedit/default.nix b/pkgs/applications/audio/gigedit/default.nix
index be6970f01e16..269b48aebb8f 100644
--- a/pkgs/applications/audio/gigedit/default.nix
+++ b/pkgs/applications/audio/gigedit/default.nix
@@ -26,5 +26,6 @@ stdenv.mkDerivation rec {
     description = "Gigasampler file access library";
     license = licenses.gpl2;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/audio/jalv/default.nix b/pkgs/applications/audio/jalv/default.nix
index 6b15052769be..2baf69cef4fd 100644
--- a/pkgs/applications/audio/jalv/default.nix
+++ b/pkgs/applications/audio/jalv/default.nix
@@ -25,5 +25,6 @@ stdenv.mkDerivation  rec {
     homepage = http://drobilla.net/software/jalv;
     license = licenses.isc;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/audio/lash/default.nix b/pkgs/applications/audio/lash/default.nix
index 72087c76b05d..ad52e7b2d85c 100644
--- a/pkgs/applications/audio/lash/default.nix
+++ b/pkgs/applications/audio/lash/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation  rec {
   '';
 
   meta = with stdenv.lib; {
-    description = "LASH Audio Session Handler";
+    description = "A Linux Audio Session Handler";
     longDescription = ''
       Session management system for GNU/Linux audio applications.
     '';
diff --git a/pkgs/applications/audio/mid2key/default.nix b/pkgs/applications/audio/mid2key/default.nix
index 1e163391a397..26ea2c7b0b2c 100644
--- a/pkgs/applications/audio/mid2key/default.nix
+++ b/pkgs/applications/audio/mid2key/default.nix
@@ -21,5 +21,6 @@ stdenv.mkDerivation rec {
     description = "A simple tool which maps midi notes to simulated keystrokes";
     license = licenses.gpl3;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/audio/mpg123/default.nix b/pkgs/applications/audio/mpg123/default.nix
index 8d4b8d4d778b..3edb7ae6793b 100644
--- a/pkgs/applications/audio/mpg123/default.nix
+++ b/pkgs/applications/audio/mpg123/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl, alsaLib }:
 
 stdenv.mkDerivation {
-  name = "mpg123-1.18.1";
+  name = "mpg123-1.19.0";
 
   src = fetchurl {
-    url = mirror://sourceforge/mpg123/mpg123-1.18.1.tar.bz2;
-    sha256 = "0bb5hv0qw3ln09xisi7d19gb4p2y69sx3905rdc293q3gr7khvdw";
+    url = mirror://sourceforge/mpg123/mpg123-1.19.0.tar.bz2;
+    sha256 = "06xhd68mj9yp0r6l771aq0d7xgnl402a3wm2mvhxmd3w3ph29446";
   };
 
   buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
diff --git a/pkgs/applications/audio/qsampler/default.nix b/pkgs/applications/audio/qsampler/default.nix
index 7cfe73c9c750..b851517b8724 100644
--- a/pkgs/applications/audio/qsampler/default.nix
+++ b/pkgs/applications/audio/qsampler/default.nix
@@ -20,5 +20,6 @@ stdenv.mkDerivation rec {
     description = "graphical frontend to LinuxSampler";
     license = licenses.gpl2;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/audio/vmpk/default.nix b/pkgs/applications/audio/vmpk/default.nix
new file mode 100644
index 000000000000..7fffa77b5a39
--- /dev/null
+++ b/pkgs/applications/audio/vmpk/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, cmake, pkgconfig
+, qt4, jackaudio
+}:
+
+let
+  version = "0.5.1";
+in stdenv.mkDerivation rec {
+  name = "vmpk-${version}";
+
+  meta = with stdenv.lib; {
+    description = "Virtual MIDI Piano Keyboard";
+    homepage    = "http://vmpk.sourceforge.net/";
+    license     = licenses.gpl3Plus;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ iyzsong ];
+  };
+
+  src = fetchurl {
+    url = "mirror://sourceforge/vmpk/${version}/${name}.tar.bz2";
+    sha256 = "11fqnxgs9hr9255d93n7lazxzjwn8jpmn23nywdksh0pb1ffvfrc";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  buildInputs = [ qt4 jackaudio ];
+}
diff --git a/pkgs/applications/editors/emacs-modes/darcsum/darcs_context b/pkgs/applications/editors/emacs-modes/darcsum/darcs_context
new file mode 100644
index 000000000000..7e9de1ed80b5
--- /dev/null
+++ b/pkgs/applications/editors/emacs-modes/darcsum/darcs_context
@@ -0,0 +1,7 @@
+
+Context:
+
+[TAG 1.3
+Simon Michael <simon@joyful.com>**20131103203640
+ Ignore-this: d12bac373e4aa0e5ffe6c390e1dfe269
+] 
diff --git a/pkgs/applications/editors/emacs-modes/darcsum/default.nix b/pkgs/applications/editors/emacs-modes/darcsum/default.nix
new file mode 100644
index 000000000000..cf2bcc6e30b9
--- /dev/null
+++ b/pkgs/applications/editors/emacs-modes/darcsum/default.nix
@@ -0,0 +1,34 @@
+# To automatically load darcsum when needed, add the following to your emacs init file:
+#
+#   (autoload 'darcsum-changes "darcsum" nil t)
+#   (autoload 'darcsum-whatsnew "darcsum" nil t)
+#   (autoload 'darcsum-view "darcsum" nil t)
+#
+# (These lines were copied from 50darcsum.el in the darcsum repository.)
+
+
+{ fetchdarcs, stdenv }:
+
+stdenv.mkDerivation {
+  name = "darcsum-1.3";
+
+  src = fetchdarcs {
+    url = http://hub.darcs.net/simon/darcsum;
+    context = ./darcs_context;
+    sha256 = "18dyk2apmnjapd604a5njfqwjri1mc7lgjaajy9phicpibgdrwzh";
+  };
+
+  phases = [ "unpackPhase" "installPhase" ];
+
+  installPhase = ''
+    install -d "$out/share/emacs/site-lisp"
+    install darcsum.el "$out/share/emacs/site-lisp"
+  '';
+
+  meta = {
+    description = "A pcl-cvs like interface for managing darcs patches.";
+    homepage = "http://hub.darcs.net/simon/darcsum";
+    license = "GPLv2+";
+    maintainers = [ stdenv.lib.maintainers.falsifian ];
+  };
+}
diff --git a/pkgs/applications/editors/kdevelop/default.nix b/pkgs/applications/editors/kdevelop/default.nix
index 14f9c1eb0d49..b815b0523471 100644
--- a/pkgs/applications/editors/kdevelop/default.nix
+++ b/pkgs/applications/editors/kdevelop/default.nix
@@ -1,28 +1,20 @@
 { stdenv, fetchurl, kdevplatform, cmake, pkgconfig, automoc4, shared_mime_info,
-  kdebase_workspace, gettext, perl, okteta }:
+  kdebase_workspace, gettext, perl, okteta, qjson }:
 
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
-  version = "4.3.1";
+  version = "4.6.0";
   pname = "kdevelop";
 
   src = fetchurl {
-    url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.bz2";
-    sha256 = "0015hv39rqhyq1w6jw65lx7ls4l5pc3a2asvd5zsd65831vrfxxs";
+    url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
+    sha256 = "1ee9e7b8c46f575dd29d920cfd6284130f2e738a2e1f52dfd97b075fab2e4c73";
   };
 
-  buildInputs = [ kdevplatform kdebase_workspace okteta ];
+  buildInputs = [ kdevplatform kdebase_workspace okteta qjson ];
 
   nativeBuildInputs = [ cmake pkgconfig automoc4 shared_mime_info gettext perl ];
 
-  patches =
-    [ ( fetchurl {
-        url = https://git.reviewboard.kde.org/r/105211/diff/raw/;
-        name = "okteta-0.9.patch"; # fixes build with KDE-4.9.x
-        sha256 = "1mvqhw7jr1vi66l3jgam3slyfafcvwy4g3iapfi69dpfnzhmcxl0";
-      } )
-    ];
-
   NIX_CFLAGS_COMPILE = "-I${okteta}/include/KDE";
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/editors/vim/wrapper.nix b/pkgs/applications/editors/vim/wrapper.nix
index 709753ff8eb5..72e868050537 100644
--- a/pkgs/applications/editors/vim/wrapper.nix
+++ b/pkgs/applications/editors/vim/wrapper.nix
@@ -2,10 +2,12 @@
 
 let
 
-  vimrcfile = writeText "vimrc" (if vimrc == null then "" else vimrc);
+  vimrcfile = writeText "vimrc" vimrc;
+
+  p = builtins.parseDrvName vim.name;
 
 in stdenv.mkDerivation rec {
-  name = "vimwrapper-${vim.version}";
+  name = "${p.name}-with-vimrc-${p.version}";
 
   buildInputs = [ makeWrapper vim vimrcfile ];
 
diff --git a/pkgs/applications/editors/yi/yi-contrib.nix b/pkgs/applications/editors/yi/yi-contrib.nix
index 0ed6e8778622..6dd75301187e 100644
--- a/pkgs/applications/editors/yi/yi-contrib.nix
+++ b/pkgs/applications/editors/yi/yi-contrib.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "yi-contrib";
-  version = "0.7.1";
-  sha256 = "0915ikck01kc5npbvywd9r7azylqrhfymzc72rf4iaghz4w939li";
+  version = "0.7.2";
+  sha256 = "074cq1y0pp66r2fqqszd8w2pws8jbfwq9g39w3rsgjnw83058fr8";
   buildDepends = [ dataAccessor filepath mtl split yi ];
   meta = {
     homepage = "http://haskell.org/haskellwiki/Yi";
diff --git a/pkgs/applications/editors/yi/yi.nix b/pkgs/applications/editors/yi/yi.nix
index b504af149045..b358f5488dcd 100644
--- a/pkgs/applications/editors/yi/yi.nix
+++ b/pkgs/applications/editors/yi/yi.nix
@@ -9,8 +9,8 @@
 
 cabal.mkDerivation (self: {
   pname = "yi";
-  version = "0.7.1";
-  sha256 = "111xg7qpjhsqf6pfr136wh8km3lrgpzghd9h5rlypafr61w59vly";
+  version = "0.7.2";
+  sha256 = "0g0hvr4zqcrmdl6mbdmrfxd5m51fhkhslvl9piwq83g2wirxqbvm";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/applications/graphics/openscad/default.nix b/pkgs/applications/graphics/openscad/default.nix
index a1238fe3dcd9..d831df5d7b66 100644
--- a/pkgs/applications/graphics/openscad/default.nix
+++ b/pkgs/applications/graphics/openscad/default.nix
@@ -1,17 +1,19 @@
 { stdenv, fetchurl, qt4, bison, flex, eigen, boost, mesa, glew, opencsg, cgal
-, mpfr, gmp
+, mpfr, gmp, glib, pkgconfig
 }:
 
 stdenv.mkDerivation rec {
-  version = "2013.06";
+  version = "2014.03";
   name = "openscad-${version}";
 
   src = fetchurl {
-    url = "https://openscad.googlecode.com/files/${name}.src.tar.gz";
-    sha256 = "01r013l8zyfkgmqn05axh3rlfsjwd6j403w5ffl7nby4i2spiw1f";
+    url = "http://files.openscad.org/${name}.src.tar.gz";
+    sha256 = "1hv1lmq1ayhlvrz5sqipg650xryq25a9k22ysdw0dsrwg9ixqpw6";
   };
 
-  buildInputs = [ qt4 bison flex eigen boost mesa glew opencsg cgal gmp mpfr ];
+  buildInputs = [
+    qt4 bison flex eigen boost mesa glew opencsg cgal mpfr gmp glib pkgconfig
+  ];
 
   configurePhase = ''
     export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${eigen}/include/eigen*) "
diff --git a/pkgs/applications/graphics/shotwell/default.nix b/pkgs/applications/graphics/shotwell/default.nix
new file mode 100644
index 000000000000..2a3ed77609fb
--- /dev/null
+++ b/pkgs/applications/graphics/shotwell/default.nix
@@ -0,0 +1,56 @@
+{ fetchurl, stdenv, m4, glibc, gtk3, libexif, libgphoto2, libsoup, libxml2, vala, sqlite, webkit
+, pkgconfig, gnome3, gst_all_1, which, udev, libraw, glib, json_glib, gettext, desktop_file_utils
+, lcms2, gdk_pixbuf, librsvg, makeWrapper, gnome_doc_utils }:
+
+# for dependencies see http://www.yorba.org/projects/shotwell/install/
+
+let
+  rest = stdenv.mkDerivation rec {
+    name = "rest-0.7.12";
+
+    src = fetchurl {
+      url = "mirror://gnome/sources/rest/0.7/${name}.tar.xz";
+      sha256 = "0fmg7fq5fx0jg3ryk71kwdkspsvj42acxy9imk7vznkqj29a9zqn";
+    };
+    
+    configureFlags = "--with-ca-certificates=/etc/ssl/certs/ca-bundle.crt";
+    
+    buildInputs = [ pkgconfig glib libsoup ];
+  };
+in stdenv.mkDerivation rec {
+  version = "0.18.0";
+  name = "shotwell-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/shotwell/0.18/${name}.tar.xz";
+    sha256 = "0cq0zs13f3f4xyz46yvj4qfpm5nh4ypds7r53pkqm4a3n8ybf5v7";
+  };
+
+  NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include";
+  
+  configureFlags = [ "--disable-gsettings-convert-install" ];
+  
+  preConfigure = ''
+    patchShebangs .
+  '';
+  
+  postInstall = ''
+    wrapProgram "$out/bin/shotwell" \
+     --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+     --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gnome3.gsettings_desktop_schemas}/share:${gtk3}/share:$out/share"
+  '';
+
+
+  buildInputs = [ m4 glibc gtk3 libexif libgphoto2 libsoup libxml2 vala sqlite webkit pkgconfig
+                  gst_all_1.gstreamer gst_all_1.gst-plugins-base gnome3.libgee which udev gnome3.gexiv2
+                  libraw rest json_glib gettext desktop_file_utils glib lcms2 gdk_pixbuf librsvg
+                  makeWrapper gnome_doc_utils ];
+
+  meta = with stdenv.lib; {
+    description = "Popular photo organizer for the GNOME desktop";
+    homepage = http://www.yorba.org/projects/shotwell/;
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [iElectric];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/ike/default.nix b/pkgs/applications/ike/default.nix
index 7bba42152e8c..d595cb60da8c 100644
--- a/pkgs/applications/ike/default.nix
+++ b/pkgs/applications/ike/default.nix
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
   installPhase = ''
     make install
     for file in "$out"/bin/* "$out"/sbin/*; do
-        wrapProgram $file --prefix LD_LIBRARY_PATH ":" "$out/lib:${openssl}/lib:${gcc.gcc}/lib:${libedit}/lib:${qt4}/lib"
+        wrapProgram $file --prefix LD_LIBRARY_PATH ":" "$out/lib:${openssl}/lib:${gcc.gcc}/lib:${stdenv.glibc}/lib::${gcc.gcc}/lib64:${stdenv.glibc}/lib64:${libedit}/lib:${qt4}/lib"
     done
   '';
 
diff --git a/pkgs/applications/misc/nut/default.nix b/pkgs/applications/misc/nut/default.nix
index 92cd0de8b312..3e972f672cc2 100644
--- a/pkgs/applications/misc/nut/default.nix
+++ b/pkgs/applications/misc/nut/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
       "--without-powerman" # Until we have it ...
       "--without-cgi"
       "--without-hal"
-      "--with-systemdsystemunitdir=$(out)/etc/systemd/systemd"
+      "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
       "--with-udev-dir=$(out)/etc/udev"
     ];
 
diff --git a/pkgs/applications/misc/xmobar/default.nix b/pkgs/applications/misc/xmobar/default.nix
index 49c1a403814b..a7aeed339e24 100644
--- a/pkgs/applications/misc/xmobar/default.nix
+++ b/pkgs/applications/misc/xmobar/default.nix
@@ -5,8 +5,8 @@
 
 cabal.mkDerivation (self: {
   pname = "xmobar";
-  version = "0.20";
-  sha256 = "06ra5nx53rlijkb3hhp5p5a0b3bx14921jgkkp1xqciscnspj2nv";
+  version = "0.20.1";
+  sha256 = "16jfgn6ciqxrwj6qjhbcpms7mzlbxfaxyxfxp64xvnw626xlpjvk";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index eba32738e0b8..baf67371769d 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -275,7 +275,7 @@ in stdenv.mkDerivation rec {
   meta = {
     description = "An open source web browser from Google";
     homepage = http://www.chromium.org/;
-    maintainers = with maintainers; [ goibhniu chaoflow aszlig ];
+    maintainers = with maintainers; [ goibhniu chaoflow aszlig wizeman ];
     license = licenses.bsd3;
     platforms = platforms.linux;
   };
diff --git a/pkgs/applications/networking/browsers/chromium/sources.nix b/pkgs/applications/networking/browsers/chromium/sources.nix
index a3645b2ac691..782356640c8d 100644
--- a/pkgs/applications/networking/browsers/chromium/sources.nix
+++ b/pkgs/applications/networking/browsers/chromium/sources.nix
@@ -6,13 +6,13 @@
     sha256 = "0qbv6prxl18y5824pfd13ng9798g561gzb6nypwp502hqr45jvb6";
   };
   beta = {
-    version = "34.0.1847.45";
-    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-34.0.1847.45.tar.xz";
-    sha256 = "0ypz6cclddiasmy8z5p97ndpl9xb7p5ncn9dxm6zkffxyagnx531";
+    version = "34.0.1847.60";
+    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-34.0.1847.60.tar.xz";
+    sha256 = "1na5d6z4a0wkabn7cj62vyiv3mmvcb6qdvrkyy6fj79h7gk2hb7k";
   };
   stable = {
-    version = "33.0.1750.149";
-    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-33.0.1750.149.tar.xz";
-    sha256 = "111hml6kjfzps9addvhcjygjb2k65spknx2zc6pnz4ygshynspqn";
+    version = "33.0.1750.152";
+    url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-33.0.1750.152.tar.xz";
+    sha256 = "0byc23vwn9alsva0jqvwvgnbx2bm7x48m3jln02y4fpf1f265m4z";
   };
 }
diff --git a/pkgs/applications/networking/browsers/firefox/default.nix b/pkgs/applications/networking/browsers/firefox/default.nix
index db89903c3ad6..b45fb4bbae75 100644
--- a/pkgs/applications/networking/browsers/firefox/default.nix
+++ b/pkgs/applications/networking/browsers/firefox/default.nix
@@ -195,7 +195,7 @@ rec {
     meta = {
       description = "Mozilla Firefox - the browser, reloaded";
       homepage = http://www.mozilla.com/en-US/firefox/;
-      maintainers = [ stdenv.lib.maintainers.eelco ];
+      maintainers = with stdenv.lib.maintainers; [ eelco wizeman ];
     };
 
     passthru = {
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 5bf0d0785a38..a33c879ad92d 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
@@ -88,5 +88,7 @@ stdenv.mkDerivation {
   meta = {
     description = "Adobe Flash Player browser plugin";
     homepage = http://www.adobe.com/products/flashplayer/;
+    maintainer = with stdenv.lib.maintainers; [ wizeman ];
+    license = "unfree";
   };
 }
diff --git a/pkgs/applications/networking/cluster/spark/default.nix b/pkgs/applications/networking/cluster/spark/default.nix
index 34c3af161261..61f2d0c6e202 100644
--- a/pkgs/applications/networking/cluster/spark/default.nix
+++ b/pkgs/applications/networking/cluster/spark/default.nix
@@ -120,8 +120,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Spark cluster computing";
     homepage    = "http://spark.incubator.apache.org";
-    platforms   = stdenv.lib.platforms.all;
     license     = stdenv.lib.licenses.asl20;
+    platforms   = stdenv.lib.platforms.all;
     maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/applications/networking/feedreaders/newsbeuter/default.nix b/pkgs/applications/networking/feedreaders/newsbeuter/default.nix
index 029a6f8e6339..e5f18f72cedc 100644
--- a/pkgs/applications/networking/feedreaders/newsbeuter/default.nix
+++ b/pkgs/applications/networking/feedreaders/newsbeuter/default.nix
@@ -1,23 +1,24 @@
-{ stdenv, fetchurl, sqlite, curl, pkgconfig, libxml2, stfl, json_c, ncurses
+{ stdenv, fetchurl, sqlite, curl, pkgconfig, libxml2, stfl, json-c-0-11, ncurses
 , gettext, libiconvOrEmpty, makeWrapper, perl }:
 
 stdenv.mkDerivation rec {
-  name = "newsbeuter-2.7";
+  name = "newsbeuter-2.8";
 
   src = fetchurl {
     url = "http://www.newsbeuter.org/downloads/${name}.tar.gz";
-    sha256 = "0flhzzlbdirjmrq738gmcxqqnifg3kb7plcwqcxshpizmjkhswp6";
+    sha256 = "013qi8yghpms2qq1b3xbrlmfgpj0ybgk0qhj245ni4kpxila0wn8";
+
   };
 
   buildInputs
     # use gettext instead of libintlOrEmpty so we have access to the msgfmt
     # command
-    = [ pkgconfig sqlite curl libxml2 stfl json_c ncurses gettext perl ]
+    = [ pkgconfig sqlite curl libxml2 stfl json-c-0-11 ncurses gettext perl ]
       ++ libiconvOrEmpty
       ++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
 
   preBuild = ''
-    sed -i -e 104,108d config.sh
+    sed -i -e 110,114d config.sh
     sed -i "1 s%^.*$%#!${perl}/bin/perl%" txt2h.pl
     export LDFLAGS=-lncursesw
   '';
diff --git a/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix
index 17e97d92b897..4390360ff9e8 100644
--- a/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix
+++ b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix
@@ -2,11 +2,12 @@
 , gettext, libiconvOrEmpty, makeWrapper, perl }:
 
 stdenv.mkDerivation rec {
-  name = "newsbeuter-dev-20131118";
+  name = "newsbeuter-dev-20140309";
 
   src = fetchgit {
     url = "https://github.com/akrennmair/newsbeuter.git";
-    rev = "18b73f7d44a99a698d4878fe7d226f55842132c2";
+    rev = "1427bdb0705806368db39576a9b803df82fa0415";
+    sha256 = "b29a304a46bf56b439d0d35ea586f7fd0fbf1a5565dca95de76e774885d8b64b";
   };
 
   buildInputs
@@ -17,7 +18,7 @@ stdenv.mkDerivation rec {
       ++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
 
   preBuild = ''
-    sed -i -e 104,108d config.sh
+    sed -i -e 110,114d config.sh
     sed -i "1 s%^.*$%#!${perl}/bin/perl%" txt2h.pl
     export LDFLAGS=-lncursesw
   '';
diff --git a/pkgs/applications/networking/irc/konversation/default.nix b/pkgs/applications/networking/irc/konversation/default.nix
index d3009115b178..7554ad7d1a8c 100644
--- a/pkgs/applications/networking/irc/konversation/default.nix
+++ b/pkgs/applications/networking/irc/konversation/default.nix
@@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "Integrated IRC client for KDE";
+    repositories.git = git://anongit.kde.org/konversation;
     license = "GPL";
     inherit (kdelibs.meta) maintainers platforms;
   };
diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix
index 89b437acc905..b47018e0d970 100644
--- a/pkgs/applications/networking/irc/weechat/default.nix
+++ b/pkgs/applications/networking/irc/weechat/default.nix
@@ -17,6 +17,13 @@ stdenv.mkDerivation rec {
       cacert cmake
     ];
 
+  # This patch is based on
+  # weechat/c324610226cef15ecfb1235113c8243b068084c8. It fixes
+  # freeze/crash on /exit when using nixpkgs' gnutls 3.2. The next
+  # weechat release (0.4.4) will include this, so it's safe to remove
+  # then.
+  patches = [ ./fix-gnutls-32.diff ];
+
   postInstall = ''
        wrapProgram "$out/bin/weechat" \
          --prefix PYTHONPATH : "$PYTHONPATH" \
diff --git a/pkgs/applications/networking/irc/weechat/fix-gnutls-32.diff b/pkgs/applications/networking/irc/weechat/fix-gnutls-32.diff
new file mode 100644
index 000000000000..56e357c8f7dc
--- /dev/null
+++ b/pkgs/applications/networking/irc/weechat/fix-gnutls-32.diff
@@ -0,0 +1,16 @@
+diff --git a/src/gui/curses/CMakeLists.txt b/src/gui/curses/CMakeLists.txt
+index 325c611..a8927bc 100644
+--- a/src/gui/curses/CMakeLists.txt
++++ b/src/gui/curses/CMakeLists.txt
+@@ -53,9 +53,7 @@ IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+   ENDIF(HAVE_BACKTRACE)
+ ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+ 
+-IF(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
+-  LIST(APPEND EXTRA_LIBS "pthread")
+-ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
++LIST(APPEND EXTRA_LIBS "pthread")
+ 
+ IF(ICONV_LIBRARY)
+   LIST(APPEND EXTRA_LIBS ${ICONV_LIBRARY})
+
diff --git a/pkgs/applications/networking/mailreaders/sup/default.nix b/pkgs/applications/networking/mailreaders/sup/default.nix
index a8fb387e7296..70aeb0009814 100644
--- a/pkgs/applications/networking/mailreaders/sup/default.nix
+++ b/pkgs/applications/networking/mailreaders/sup/default.nix
@@ -3,7 +3,7 @@
 , gettext, iconv, locale, text, highline, rmail_sup, unicode, gnupg, which }:
 
 stdenv.mkDerivation rec {
-  version = "20131130";
+  version = "20140312";
   name    = "sup-${version}";
   
   meta = {
@@ -18,8 +18,8 @@ stdenv.mkDerivation rec {
 
   src = fetchgit {
     url = git://github.com/sup-heliotrope/sup.git;
-    rev = "a5a1e39034204ac4b05c9171a71164712690b010";
-    sha256 = "0w2w7dcif1ri1qq81csz7gj45rqd9z7hjd6x29awibybyyqyvj5s";
+    rev = "0cad7b308237c07b8a46149908b2ad4806ac3d1d";
+    sha256 = "83534b6ad9fb6aa883d630c927e3a71bd09a646e3254b4eb0cc7a09f69a525bc";
   };
 
   buildInputs =
diff --git a/pkgs/applications/networking/newsreaders/liferea/default.nix b/pkgs/applications/networking/newsreaders/liferea/default.nix
index caf7da3cf3c1..c0892740dbdc 100644
--- a/pkgs/applications/networking/newsreaders/liferea/default.nix
+++ b/pkgs/applications/networking/newsreaders/liferea/default.nix
@@ -6,14 +6,14 @@
 }:
 
 let pname = "liferea";
-    version = "1.10.6";
+    version = "1.10.7";
 in
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
 
   src = fetchurl {
-    url = "https://github.com/lwindolf/${pname}/releases/download/v${version}/${name}.tar.gz";
-    sha256 = "0vp19z4p3cn3zbg1zjpg2iyzwq893dx5c1kh6aac06s3rf1124gm";
+    url = "https://github.com/lwindolf/${pname}/releases/download/v${version}/${name}.tar.bz2";
+    sha256 = "17kvg44brdz99firr5h5qx8icvadlr7p1cz3xr3437sf5rhj25wh";
   };
 
   buildInputs = with gst_all_1; [
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
         --prefix LD_LIBRARY_PATH : "${gnome3.libgnome_keyring}/lib" \
         --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
         --prefix GIO_EXTRA_MODULES : "${gnome3.dconf}/lib/gio/modules:${glib_networking}/lib/gio/modules" \
-        --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gnome3.gnome_icon_theme}/share:${gnome3.gsettings_desktop_schemas}/share:$out/share"
+        --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gnome3.gnome_icon_theme}/share:${gnome3.gsettings_desktop_schemas}/share:${gnome3.gtk}/share:$out/share"
     done
   '';
 
diff --git a/pkgs/applications/networking/newsreaders/slrn/default.nix b/pkgs/applications/networking/newsreaders/slrn/default.nix
new file mode 100644
index 000000000000..c933460af43b
--- /dev/null
+++ b/pkgs/applications/networking/newsreaders/slrn/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl,
+slang, ncurses
+}:
+
+let version = "1.0.1"; in
+
+stdenv.mkDerivation {
+  name = "slrn-${version}";
+
+  src = fetchurl {
+    url = "http://www.jedsoft.org/slrn/download/slrn-1.0.1.tar.gz";
+    sha256 = "1rmaprfwvshzkv0c5vi43839cz3laqjpl306b9z0ghwyjdha1d06";
+  };
+
+  preConfigure = ''
+    sed -i -e "s|-ltermcap|-lncurses|" configure
+    sed -i autoconf/Makefile.in src/Makefile.in \
+      -e "s|/bin/cp|cp|"  \
+      -e "s|/bin/rm|rm|"
+  '';
+
+  configureFlags = "--with-slang=${slang}";
+
+  buildInputs = [ slang ncurses ];
+
+  meta = {
+    description = "The slrn (S-Lang read news) newsreader";
+    homepage = http://slrn.sourceforge.net/index.html;
+    license = stdenv.lib.licenses.gpl2;
+  };
+}
diff --git a/pkgs/applications/networking/p2p/ktorrent/default.nix b/pkgs/applications/networking/p2p/ktorrent/default.nix
index b408f20b7110..e53fda089111 100644
--- a/pkgs/applications/networking/p2p/ktorrent/default.nix
+++ b/pkgs/applications/networking/p2p/ktorrent/default.nix
@@ -5,11 +5,11 @@ stdenv.mkDerivation rec {
   name = pname + "-" + version;
 
   pname = "ktorrent";
-  version = "4.2.1";
+  version = "4.3.1";
 
   src = fetchurl {
     url = "${meta.homepage}/downloads/${version}/${name}.tar.bz2";
-    sha256 = "1b6w7i1vvq8mlw9yrlxvb51hvaj6rpl8lv9b9zagyl3wcanz73zd";
+    sha256 = "66094f6833347afb0c49e332f0ec15ec48db652cbe66476840846ffd5ca0e4a1";
   };
 
   patches = [ ./find-workspace.diff ];
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "KDE integrated BtTorrent client";
-    homepage = http://ktorrent.org;
+    homepage = http://ktorrent.pwsp.net;
     maintainers = with stdenv.lib.maintainers; [ sander urkud ];
     inherit (libktorrent.meta) platforms;
   };
diff --git a/pkgs/applications/networking/p2p/transmission/default.nix b/pkgs/applications/networking/p2p/transmission/default.nix
index cb439ddb4624..958e19a0986f 100644
--- a/pkgs/applications/networking/p2p/transmission/default.nix
+++ b/pkgs/applications/networking/p2p/transmission/default.nix
@@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
     '';
     homepage = http://www.transmissionbt.com/;
     license = licenses.gpl2; # parts are under MIT
-    maintainers = with maintainers; [ astsmtl vcunat ];
+    maintainers = with maintainers; [ astsmtl vcunat wizeman ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/office/gnumeric/default.nix b/pkgs/applications/office/gnumeric/default.nix
index 0108f934693e..0ae27e322b7c 100644
--- a/pkgs/applications/office/gnumeric/default.nix
+++ b/pkgs/applications/office/gnumeric/default.nix
@@ -3,11 +3,11 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "gnumeric-1.12.9";
+  name = "gnumeric-1.12.12";
 
   src = fetchurl {
     url = "mirror://gnome/sources/gnumeric/1.12/${name}.tar.xz";
-    sha256 = "1rv2ifw6rp0iza4fkf3bffvdkyi77dwvzdnvcbpqcyn2kxfsvlsc";
+    sha256 = "096i9x6b4i6x24vc4lsxx8fg2n2pjs2jb6x3bkg3ppa2c60w1jq0";
   };
 
   preConfigure = ''sed -i 's/\(SUBDIRS.*\) doc/\1/' Makefile.in''; # fails when installing docs
diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix
index b4a7a203a3c4..aa3ba878eb59 100644
--- a/pkgs/applications/science/logic/coq/default.nix
+++ b/pkgs/applications/science/logic/coq/default.nix
@@ -3,7 +3,7 @@
 {stdenv, fetchurl, pkgconfig, ocaml, findlib, camlp5, ncurses, lablgtk ? null}:
 
 let 
-  version = "8.4pl2";
+  version = "8.4pl3";
   buildIde = lablgtk != null;
   ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
   idePath = if buildIde then ''
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://coq.inria.fr/distrib/V${version}/files/coq-${version}.tar.gz";
-    sha256 = "1n52pky7bb45irk2jw6f4rd3kvy8lm2yfldjwdhiic0kyqw9lwgv";
+    sha256 = "0f7v3j4zsrhpswdh47bb30vwgsr0ck79jkkz01a5a74qgxiksn4p";
   };
 
   buildInputs = [ pkgconfig ocaml findlib camlp5 ncurses lablgtk ];
@@ -54,7 +54,7 @@ stdenv.mkDerivation {
     '';
     homepage = "http://coq.inria.fr";
     license = "LGPL";
-    maintainers = [ stdenv.lib.maintainers.roconnor ];
+    maintainers = with stdenv.lib.maintainers; [ roconnor thoughtpolice ];
     platforms = stdenv.lib.platforms.linux;
   };
 }
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 49129e6b8ce7..d64230aa50dd 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,4 +1,4 @@
-{ cabal, aeson, async, blazeBuilder, bloomfilter, bup
+{ cabal, aeson, async, blazeBuilder, bloomfilter, bup, byteable
 , caseInsensitive, clientsession, cryptoApi, cryptohash, curl
 , dataDefault, dataenc, DAV, dbus, dlist, dns, editDistance
 , extensibleExceptions, feed, filepath, git, gnupg1, gnutls, hamlet
@@ -7,31 +7,31 @@
 , MonadCatchIOTransformers, monadControl, mtl, network
 , networkConduit, networkInfo, networkMulticast
 , networkProtocolXmpp, openssh, optparseApplicative, perl
-, QuickCheck, random, regexTdfa, rsync, SafeSemaphore, SHA, stm
-, tasty, tastyHunit, tastyQuickcheck, tastyRerun, text, time
-, transformers, unixCompat, utf8String, uuid, wai, waiLogger, warp
-, warpTls, which, xmlTypes, yesod, yesodCore, yesodDefault
+, QuickCheck, random, regexTdfa, rsync, SafeSemaphore, securemem
+, SHA, stm, tasty, tastyHunit, tastyQuickcheck, tastyRerun, text
+, time, transformers, unixCompat, utf8String, uuid, wai, waiLogger
+, warp, warpTls, which, xmlTypes, yesod, yesodCore, yesodDefault
 , yesodForm, yesodStatic
 }:
 
 cabal.mkDerivation (self: {
   pname = "git-annex";
-  version = "5.20140306";
-  sha256 = "1kjgqrz0wnccylrbdiwj1yndg7v2k09f5h2vkk06bnx02xmwvjl9";
+  version = "5.20140320";
+  sha256 = "0jhg5nbvdsiaprpj4h57fpfskhx0nqva4yx6krfd90i9gwgkm8l5";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
-    aeson async blazeBuilder bloomfilter caseInsensitive clientsession
-    cryptoApi cryptohash dataDefault dataenc DAV dbus dlist dns
-    editDistance extensibleExceptions feed filepath gnutls hamlet
-    hinotify hS3 hslogger HTTP httpClient httpConduit httpTypes IfElse
-    json liftedBase MissingH MonadCatchIOTransformers monadControl mtl
-    network networkConduit networkInfo networkMulticast
-    networkProtocolXmpp optparseApplicative QuickCheck random regexTdfa
-    SafeSemaphore SHA stm tasty tastyHunit tastyQuickcheck tastyRerun
-    text time transformers unixCompat utf8String uuid wai waiLogger
-    warp warpTls xmlTypes yesod yesodCore yesodDefault yesodForm
-    yesodStatic
+    aeson async blazeBuilder bloomfilter byteable caseInsensitive
+    clientsession cryptoApi cryptohash dataDefault dataenc DAV dbus
+    dlist dns editDistance extensibleExceptions feed filepath gnutls
+    hamlet hinotify hS3 hslogger HTTP httpClient httpConduit httpTypes
+    IfElse json liftedBase MissingH MonadCatchIOTransformers
+    monadControl mtl network networkConduit networkInfo
+    networkMulticast networkProtocolXmpp optparseApplicative QuickCheck
+    random regexTdfa SafeSemaphore securemem SHA stm tasty tastyHunit
+    tastyQuickcheck tastyRerun text time transformers unixCompat
+    utf8String uuid wai waiLogger warp warpTls xmlTypes yesod yesodCore
+    yesodDefault yesodForm yesodStatic
   ];
   buildTools = [ bup curl git gnupg1 lsof openssh perl rsync which ];
   configureFlags = "-fS3
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 c14eb36acf9e..9be32b9accdf 100644
--- a/pkgs/applications/version-management/git-and-tools/git/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/git/default.nix
@@ -10,7 +10,7 @@
 
 let
 
-  version = "1.9.0";
+  version = "1.9.1";
 
   svn = subversionClient.override { perlBindings = true; };
 
@@ -20,8 +20,8 @@ stdenv.mkDerivation {
   name = "git-${version}";
 
   src = fetchurl {
-    url = "http://git-core.googlecode.com/files/git-${version}.tar.gz";
-    sha256 = "10lq71vrg1zbqm923wb0p36ily6y5x057f2bryk4wqkdqgyrfc6y";
+    url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
+    sha256 = "0yx7qf9hqgfvrliqvk775pw3zh982nx5r16iw7n997q4ik7gnqpr";
   };
 
   patches = [ ./docbook2texi.patch ./symlinks-in-bin.patch ];
diff --git a/pkgs/applications/video/aegisub/default.nix b/pkgs/applications/video/aegisub/default.nix
index cbbb23b04a05..9bbc7c9e7395 100644
--- a/pkgs/applications/video/aegisub/default.nix
+++ b/pkgs/applications/video/aegisub/default.nix
@@ -5,7 +5,7 @@
 , libass, fftw, ffms
 , ffmpeg, pkgconfig, zlib # Undocumented (?) dependencies
 , spellChecking ? true, hunspell ? null
-, automationSupport ? true, lua ? null 
+, automationSupport ? true, lua ? null
 , openalSupport ? false, openal ? null
 , alsaSupport ? true, alsaLib ? null
 , pulseaudioSupport ? true, pulseaudio ? null
@@ -39,11 +39,11 @@ stdenv.mkDerivation rec {
   ;
 
   NIX_LDFLAGS = "-liconv -lavutil -lavformat -lavcodec -lswscale -lz -lm";
-  
-  preConfigure = "cd aegisub"; 
-  
+
+  preConfigure = "cd aegisub";
+
   postInstall = "ln -s $out/bin/aegisub-3.0 $out/bin/aegisub";
-  
+
   meta = {
     description = "An advanced subtitle editor";
     longDescription = ''
@@ -53,7 +53,12 @@ stdenv.mkDerivation rec {
       built-in real-time video preview.
     '';
     homepage = http://www.aegisub.org/;
-    license = "BSD"; # The Aegisub sources are itself BSD/ISC, but they are linked against GPL'd softwares
+    license = stdenv.lib.licenses.bsd3;
+              # The Aegisub sources are itself BSD/ISC,
+              # but they are linked against GPL'd softwares
+              # - so the resulting program will be GPL
+    maintainers = [ stdenv.lib.maintainers.AndersonTorres ];
     platforms = stdenv.lib.platforms.linux;
+
   };
 }
diff --git a/pkgs/applications/video/kazam/default.nix b/pkgs/applications/video/kazam/default.nix
index ed93f81b6623..17bf282a459a 100644
--- a/pkgs/applications/video/kazam/default.nix
+++ b/pkgs/applications/video/kazam/default.nix
@@ -5,6 +5,7 @@
 python3Packages.buildPythonPackage rec {
   name = "kazam-${version}";
   version = "1.4.3";
+  namePrefix = "";
 
   src = fetchurl {
     url = "https://launchpad.net/kazam/stable/${version}/+download/kazam-${version}.tar.gz";
diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix
index a20dc0cf590e..f059472aa9b6 100644
--- a/pkgs/applications/video/mpv/default.nix
+++ b/pkgs/applications/video/mpv/default.nix
@@ -46,7 +46,7 @@ assert cacaSupport -> libcaca != null;
 # but by purity reasons it should be avoided; thanks the-kenny to point it out!
 # Now, it will just download and package Waf, mimetizing bootstrap.py behaviour
 
-let 
+let
   waf = fetchurl {
     url = https://waf.googlecode.com/files/waf-1.7.13;
     sha256 = "03cc750049350ee01cdbc584b70924e333fcc17ba4a2d04648dab1535538a873";
@@ -109,7 +109,7 @@ stdenv.mkDerivation rec {
     python3 ${waf} install
     # Maybe not needed, but it doesn't hurt anyway: a standard font
     mkdir -p $out/share/mpv
-    ln -s ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf  $out/share/mpv/subfont.ttf 
+    ln -s ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf  $out/share/mpv/subfont.ttf
     '';
 
   meta = {
@@ -118,7 +118,8 @@ stdenv.mkDerivation rec {
     mpv is a free and open-source general-purpose video player, based on the MPlayer and mplayer2 projects, with great improvements above both.
     '';
     homepage = "http://mpv.io";
-    license = "GPLv2+";
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.AndersonTorres ];
     platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/virtualization/8086tiny/default.nix b/pkgs/applications/virtualization/8086tiny/default.nix
index 0b4ff90e4095..1ad9203b94cc 100644
--- a/pkgs/applications/virtualization/8086tiny/default.nix
+++ b/pkgs/applications/virtualization/8086tiny/default.nix
@@ -13,12 +13,12 @@ stdenv.mkDerivation rec {
   version = "1.20";
 
   src = fetchurl {
-    url ="http://www.megalith.co.uk/8086tiny/downloads/8086tiny_120.tar.bz2"; 
+    url ="http://www.megalith.co.uk/8086tiny/downloads/8086tiny_120.tar.bz2";
     sha256 = "0yapnr8wvlx7h1q1w98yfy2vsbf0rlp4wd99r3xb0b7l70b36mpw";
   };
-  
+
   buildInputs = with stdenv.lib;
-  optionals localBios [ nasm ] 
+  optionals localBios [ nasm ]
   ++  optionals sdlSupport [ SDL ];
 
   builder = ./builder.sh;
@@ -27,11 +27,12 @@ stdenv.mkDerivation rec {
     description = "An open-source 8086 emulator";
     longDescription = ''
     8086tiny is a tiny, open source (MIT), portable (little-endian hosts) Intel PC emulator, powerful enough to run DOS, Windows 3.0, Excel, MS Flight Simulator, AutoCAD, Lotus 1-2-3, and similar applications. 8086tiny emulates a "late 80's era" PC XT-type machine.
-    
+
     8086tiny is based on an IOCCC 2013 winning entry. In fact that is the "unobfuscated" version :)
     '';
     homepage = http://www.megalith.co.uk/8086tiny/index.html;
-    license = "MIT";
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.AndersonTorres ];
     platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/virtualization/bochs/default.nix b/pkgs/applications/virtualization/bochs/default.nix
index 6b8cf5dc0356..75afcb41f808 100644
--- a/pkgs/applications/virtualization/bochs/default.nix
+++ b/pkgs/applications/virtualization/bochs/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
     url = "http://downloads.sourceforge.net/project/bochs/bochs/${version}/${name}.tar.gz";
     sha256 = "042blm1xb9ig4fh2bv8nrrfpgkcxy4hq8yrkx7mrdpm5g4mvfwyr";
   };
-  
+
   buildInputs = with stdenv.lib;
   [ libX11 mesa ]
   ++ optionals sdlSupport [ SDL ]
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
   ++ optionals curlSupport [ curl ];
 
   configureFlags = ''
-    --with-x11 
+    --with-x11
     --with-term=${if termSupport then "yes" else "no"}
     --with-sdl=${if sdlSupport then "yes" else "no"}
     --with-svga=no
@@ -42,11 +42,11 @@ stdenv.mkDerivation rec {
     --enable-plugins=no
     --enable-disasm
     --enable-debugger
-    --enable-ne2000 
-    --enable-e1000 
-    --enable-sb16 
-    --enable-voodoo 
-    --enable-usb 
+    --enable-ne2000
+    --enable-e1000
+    --enable-sb16
+    --enable-voodoo
+    --enable-usb
     --enable-pnic
 '';
 
@@ -56,7 +56,8 @@ stdenv.mkDerivation rec {
     Bochs is an open-source (LGPL), highly portable IA-32 PC emulator, written in C++, that runs on most popular platforms. It includes emulation of the Intel x86 CPU, common I/O devices, and a custom BIOS.
     '';
     homepage = http://bochs.sourceforge.net/;
-    license = "LGPL";
+    license = stdenv.lib.licenses.lgpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.AndersonTorres ];
     platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix
index dcf5b4e50097..7f3bf8fafc80 100644
--- a/pkgs/applications/virtualization/qemu/default.nix
+++ b/pkgs/applications/virtualization/qemu/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, python, zlib, pkgconfig, glib, ncurses, perl, pixman
-, attr, libcap, vde2, alsaLib, texinfo, libuuid
+, attr, libcap, vde2, alsaLib, texinfo, libuuid, flex, bison
 , makeWrapper
 , sdlSupport ? true, SDL
 , vncSupport ? true, libjpeg, libpng
@@ -7,19 +7,19 @@
 , x86Only ? false
 }:
 
-let n = "qemu-1.5.2"; in
+let n = "qemu-1.7.0"; in
 
 stdenv.mkDerivation rec {
   name = n + (if x86Only then "-x86-only" else "");
 
   src = fetchurl {
     url = "http://wiki.qemu.org/download/${n}.tar.bz2";
-    sha256 = "0l52jwlxmwp9g3jpq0g7ix9dq4qgh46nd2h58lh47f0a35yi8qgn";
+    sha256 = "050kq9mz8c2jcshm7nn7dldypsk8jr590ybnlw2wc51dbyl37wri";
   };
 
   buildInputs =
     [ python zlib pkgconfig glib ncurses perl pixman attr libcap
-      vde2 alsaLib texinfo libuuid makeWrapper
+      vde2 alsaLib texinfo libuuid flex bison makeWrapper
     ]
     ++ stdenv.lib.optionals sdlSupport [ SDL ]
     ++ stdenv.lib.optionals vncSupport [ libjpeg libpng ]
@@ -43,11 +43,11 @@ stdenv.mkDerivation rec {
       fi
     '';
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://www.qemu.org/;
     description = "A generic and open source machine emulator and virtualizer";
-    license = "GPLv2+";
-    maintainers = with stdenv.lib.maintainers; [ viric shlevy eelco ];
-    platforms = stdenv.lib.platforms.linux;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ viric shlevy eelco ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix
index 3dcb8aa17055..274cd05024bd 100644
--- a/pkgs/build-support/vm/default.nix
+++ b/pkgs/build-support/vm/default.nix
@@ -2,7 +2,7 @@
 , kernel ? pkgs.linux_3_10
 , img ? "bzImage"
 , rootModules ?
-    [ "virtio_pci" "virtio_blk" "virtio_balloon" "ext4" "unix" "9p" "9pnet_virtio" ]
+    [ "virtio_pci" "virtio_blk" "virtio_balloon" "ext4" "unix" "9p" "9pnet_virtio" "rtc_cmos" ]
 }:
 
 with pkgs;
@@ -57,6 +57,7 @@ rec {
       mknod ${dev}/random  c 1 8
       mknod ${dev}/urandom c 1 9
       mknod ${dev}/tty     c 5 0
+      mknod ${dev}/rtc     c 254 0
       . /sys/class/block/${hd}/uevent
       mknod ${dev}/${hd} b $MAJOR $MINOR
     '';
@@ -159,6 +160,10 @@ rec {
     #! ${bash}/bin/sh
     source /tmp/xchg/saved-env
 
+    # Set the system time from the hardware clock.  Works around an
+    # apparent KVM > 1.5.2 bug.
+    ${pkgs.utillinux}/sbin/hwclock -s
+
     export NIX_STORE=/nix/store
     export NIX_BUILD_TOP=/tmp
     export TMPDIR=/tmp
diff --git a/pkgs/data/documentation/man-pages-posix/default.nix b/pkgs/data/documentation/man-pages-posix/default.nix
index 8c126db07929..78b3aa1c8b3e 100644
--- a/pkgs/data/documentation/man-pages-posix/default.nix
+++ b/pkgs/data/documentation/man-pages-posix/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl}:
 
 stdenv.mkDerivation rec {
-  name = "man-pages-posix-2003a";
+  name = "man-pages-posix-2013-a";
 
   src = fetchurl {
-    url = "mirror://kernel/linux/docs/man-pages/man-pages-posix/man-pages-posix-2003-a.tar.bz2";
-    sha256 = "1sj97lbj27w935f9ia91ih1mwlz4j3qcr3d3nkvcxm6cpfvv2mg3";
+    url = "mirror://kernel/linux/docs/man-pages/man-pages-posix/${name}.tar.xz";
+    sha256 = "0258j05zdrxpgdj8nndbyi7bvrs8fxdksb0xbfrylzgzfmf3lqqr";
   };
 
   preBuild =
diff --git a/pkgs/data/fonts/wqy-microhei/default.nix b/pkgs/data/fonts/wqy-microhei/default.nix
new file mode 100644
index 000000000000..065bb4bc828f
--- /dev/null
+++ b/pkgs/data/fonts/wqy-microhei/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "wqy-microhei-0.2.0-beta";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/wqy/${name}.tar.gz";
+    sha256 = "0gi1yxqph8xx869ichpzzxvx6y50wda5hi77lrpacdma4f0aq0i8";
+  };
+
+  installPhase = ''install -Dm644 wqy-microhei.ttc $out/share/fonts/wqy-microhei.ttc'';
+
+  meta = {
+    description = "A (mainly) Chinese Unicode font";
+    homepage = "http://wenq.org";
+    license = stdenv.lib.licenses.asl20;
+    maintainers = stdenv.lib.maintainers.pkmx;
+    platforms = stdenv.lib.platforms.all;
+  };
+}
+
diff --git a/pkgs/data/fonts/wqy-zenhei/default.nix b/pkgs/data/fonts/wqy-zenhei/default.nix
index 960c74f68413..d42665c69cca 100644
--- a/pkgs/data/fonts/wqy-zenhei/default.nix
+++ b/pkgs/data/fonts/wqy-zenhei/default.nix
@@ -1,21 +1,28 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
-  name = "wqy-zenhei-0.4.23-1";
+  name = "wqy-zenhei-${version}";
+  version = "0.9.45";
 
   src = fetchurl {
-    url = mirror://sourceforge/wqy/wqy-zenhei-0.4.23-1.tar.gz;
-    sha256 = "138nn81ai240av0xvcq4ab3rl73n0qlj3gwr3a36i63ry8vdj5qm";
+    url = "mirror://sourceforge/wqy/${name}.tar.gz";
+    sha256 = "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4";
   };
 
+  dontBuild = true;
+
   installPhase =
     ''
       mkdir -p $out/share/fonts
-      cp *.ttf $out/share/fonts
+      install -m644 *.ttc $out/share/fonts/
     '';
 
   meta = {
     description = "A (mainly) Chinese Unicode font";
+    homepage = "http://wenq.org";
+    license = stdenv.lib.licenses.gpl2; # with font embedding exceptions
+    maintainers = stdenv.lib.maintainers.pkmx;
+    platforms = stdenv.lib.platforms.all;
   };
 }
 
diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix
index 15544eff9220..61dfe2b17959 100644
--- a/pkgs/desktops/gnome-3/default.nix
+++ b/pkgs/desktops/gnome-3/default.nix
@@ -128,5 +128,6 @@ rec {
   gitg = callPackage ./misc/gitg { };
 
   libgit2-glib = callPackage ./misc/libgit2-glib { };
-
+  
+  gexiv2 = callPackage ./misc/gexiv2 { };
 }
diff --git a/pkgs/desktops/gnome-3/misc/gexiv2/default.nix b/pkgs/desktops/gnome-3/misc/gexiv2/default.nix
new file mode 100644
index 000000000000..86942c13f34f
--- /dev/null
+++ b/pkgs/desktops/gnome-3/misc/gexiv2/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, pkgconfig, exiv2, glib, libtool, m4 }:
+
+
+stdenv.mkDerivation rec {
+  name = "gexiv2-${version}";
+  version = "0.7.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gexiv2/0.7/${name}.tar.xz";
+    sha256 = "12pfc5a57dhlf0c3yg5x3jissxi7jy2b6ir6y99cn510801gwcdn";
+  };
+  
+  preConfigure = ''
+    patchShebangs .
+  '';
+  
+  buildInputs = [ pkgconfig glib libtool m4 ];
+  propagatedBuildInputs = [ exiv2 ];
+  
+  meta = with stdenv.lib; {
+    homepage = https://wiki.gnome.org/Projects/gexiv2;
+    description = "GObject wrapper around the Exiv2 photo metadata library";
+    platforms = platforms.linux;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/desktops/gnome-3/misc/goffice/default.nix b/pkgs/desktops/gnome-3/misc/goffice/default.nix
index 51d259314a7a..0390fc133687 100644
--- a/pkgs/desktops/gnome-3/misc/goffice/default.nix
+++ b/pkgs/desktops/gnome-3/misc/goffice/default.nix
@@ -1,19 +1,23 @@
-{ fetchurl, stdenv, pkgconfig, intltool, bzip2, glib, gdk_pixbuf, gtk3
-, libgsf, libxml2, cairo, pango, librsvg, libspectre }:
+{ fetchurl, stdenv, pkgconfig, intltool, glib, gtk3
+, libgsf, libxml2, libxslt, cairo, pango, librsvg, libspectre }:
 
 stdenv.mkDerivation rec {
-  name = "goffice-0.10.9";
+  name = "goffice-0.10.12";
 
   src = fetchurl {
     url = "mirror://gnome/sources/goffice/0.10/${name}.tar.xz";
-    sha256 = "0xc82hymhkdglnksd3r7405p39d5ym826rwaa7dfkps5crjwq8cg";
+    sha256 = "0vh0sdig5n8sxzh4xx82lm8y8d0jcdhc2ipb1kq02qs142zs74ff";
   };
 
+  nativeBuildInputs = [ pkgconfig intltool ];
+
   propagatedBuildInputs = [ # ToDo lasem library for MathML, opt. introspection?
-    pkgconfig intltool bzip2 glib gdk_pixbuf gtk3
-    libgsf libxml2 cairo pango librsvg libspectre
+    glib gtk3 libxml2 cairo pango libgsf
   ];
 
+  buildInputs = [ libxslt librsvg ];
+
+  enableParallelBuilding = true;
   doCheck = true;
 
   meta = {
diff --git a/pkgs/desktops/kde-4.10/kdeutils/kdf.nix b/pkgs/desktops/kde-4.10/kdeutils/kdf.nix
index 3f9da58d0a62..4b02c12d88ab 100644
--- a/pkgs/desktops/kde-4.10/kdeutils/kdf.nix
+++ b/pkgs/desktops/kde-4.10/kdeutils/kdf.nix
@@ -3,6 +3,8 @@
 kde {
   buildInputs = [ kdelibs ];
 
+  enableParallelBuilding = false;
+
   meta = {
     description = "KDE free disk space utility";
   };
diff --git a/pkgs/desktops/xfce/applications/gigolo.nix b/pkgs/desktops/xfce/applications/gigolo.nix
index b54ea8cc623f..9badeb5370e8 100644
--- a/pkgs/desktops/xfce/applications/gigolo.nix
+++ b/pkgs/desktops/xfce/applications/gigolo.nix
@@ -3,20 +3,16 @@
 stdenv.mkDerivation rec {
   p_name  = "gigolo";
   ver_maj = "0.4";
-  ver_min = "1";
+  ver_min = "2";
 
   src = fetchurl {
     url = "mirror://xfce/src/apps/${p_name}/${ver_maj}/${name}.tar.bz2";
-    sha256 = "1y8p9bbv1a4qgbxl4vn6zbag3gb7gl8qj75cmhgrrw9zrvqbbww2";
+    sha256 = "0r4ij0mlnp0bqq44pyrdcpz18r1zwsksw6w5yc0jzgg7wj7wfgsm";
   };
   name = "${p_name}-${ver_maj}.${ver_min}";
 
   buildInputs = [ python gettext intltool gtk pkgconfig gvfs];
 
-  preConfigure = ''
-    sed -i "waf" -e "1 s^.*/env[ ]*python^#!${python}/bin/python^";
-  '';
-
   meta = {
     homepage = "http://goodies.xfce.org/projects/applications/${p_name}";
     description = "A frontend to easily manage connections to remote filesystems";
diff --git a/pkgs/desktops/xfce/applications/xfce4-taskmanager.nix b/pkgs/desktops/xfce/applications/xfce4-taskmanager.nix
index baef68728487..df743e4cc9c8 100644
--- a/pkgs/desktops/xfce/applications/xfce4-taskmanager.nix
+++ b/pkgs/desktops/xfce/applications/xfce4-taskmanager.nix
@@ -3,11 +3,11 @@
 stdenv.mkDerivation rec {
   p_name  = "xfce4-taskmanager";
   ver_maj = "1.0";
-  ver_min = "0";
+  ver_min = "1";
 
   src = fetchurl {
     url = "mirror://xfce/src/apps/${p_name}/${ver_maj}/${name}.tar.bz2";
-    sha256 = "1vm9gw7j4ngjlpdhnwdf7ifx6xrrn21011almx2vwidhk2f9zvy0";
+    sha256 = "11pfiglfg3mzsmpiwva6l7dj44zsv76vyf0282pghwcrvnb2gapm";
   };
   name = "${p_name}-${ver_maj}.${ver_min}";
 
diff --git a/pkgs/desktops/xfce/core/tumbler.nix b/pkgs/desktops/xfce/core/tumbler.nix
index 06902792624e..8988d072e2c8 100644
--- a/pkgs/desktops/xfce/core/tumbler.nix
+++ b/pkgs/desktops/xfce/core/tumbler.nix
@@ -4,11 +4,11 @@ libgsf, poppler, bzip2 }:
 stdenv.mkDerivation rec {
   p_name  = "tumbler";
   ver_maj = "0.1";
-  ver_min = "29";
+  ver_min = "30";
 
   src = fetchurl {
     url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
-    sha256 = "14zw69x5979d19brjbyq81wvbikb13vgv901gxnbw8lyc3pc9fn3";
+    sha256 = "013kacqyy1vya7kp6jgc1almp3cbbvq96a3r7f5myiihr1whvhp7";
   };
   name = "${p_name}-${ver_maj}.${ver_min}";
 
diff --git a/pkgs/desktops/xfce/core/xfce4-power-manager-brightness.patch b/pkgs/desktops/xfce/core/xfce4-power-manager-brightness.patch
new file mode 100644
index 000000000000..6b6f14fdae78
--- /dev/null
+++ b/pkgs/desktops/xfce/core/xfce4-power-manager-brightness.patch
@@ -0,0 +1,307 @@
+From 05d12e12596512f7a31d3cdb4845a69dc2d4c611 Mon Sep 17 00:00:00 2001
+From: Martin Matuska <martin@matuska.org>
+Date: Tue, 23 Jul 2013 11:27:41 +0200
+Subject: Change brightness level from glong to gint32
+
+The "Backlight" RandR property is a 32-bit integer. This means that the int32 (gint32) type should be used to represent brightness levels. The attached patch does nothing else than changing the brightness level representation from glong to gint32. This fixes the screen auto-dimming issue and brightness panel plugin issue.
+
+diff --git a/common/xfpm-brightness.c b/common/xfpm-brightness.c
+index aa1ef33..f1524cb 100644
+--- a/common/xfpm-brightness.c
++++ b/common/xfpm-brightness.c
+@@ -92,11 +92,11 @@ out:
+ }
+ 
+ static gboolean
+-xfpm_brightness_xrandr_get_level (XfpmBrightness *brightness, RROutput output, long *current)
++xfpm_brightness_xrandr_get_level (XfpmBrightness *brightness, RROutput output, gint32 *current)
+ {
+     unsigned long nitems;
+     unsigned long bytes_after;
+-    long *prop;
++    gint32 *prop;
+     Atom actual_type;
+     int actual_format;
+     gboolean ret = FALSE;
+@@ -124,7 +124,7 @@ xfpm_brightness_xrandr_get_level (XfpmBrightness *brightness, RROutput output, l
+ }
+ 
+ static gboolean
+-xfpm_brightness_xrandr_set_level (XfpmBrightness *brightness, RROutput output, long level)
++xfpm_brightness_xrandr_set_level (XfpmBrightness *brightness, RROutput output, gint32 level)
+ {
+     gboolean ret = TRUE;
+ 
+@@ -137,7 +137,7 @@ xfpm_brightness_xrandr_set_level (XfpmBrightness *brightness, RROutput output, l
+     
+     if ( gdk_error_trap_pop () ) 
+     {
+-	    g_warning ("failed to XRRChangeOutputProperty for brightness %li", level);
++	    g_warning ("failed to XRRChangeOutputProperty for brightness %d", level);
+ 	    ret = FALSE;
+     }
+     
+@@ -225,11 +225,11 @@ xfpm_brightness_setup_xrandr (XfpmBrightness *brightness)
+ }
+ 
+ static gboolean
+-xfpm_brightness_xrand_up (XfpmBrightness *brightness, glong *new_level)
++xfpm_brightness_xrand_up (XfpmBrightness *brightness, gint32 *new_level)
+ {
+-    long hw_level;
++    gint32 hw_level;
+     gboolean ret = FALSE;
+-    long set_level;
++    gint32 set_level;
+     
+     ret = xfpm_brightness_xrandr_get_level (brightness, brightness->priv->output, &hw_level);
+     
+@@ -250,14 +250,14 @@ xfpm_brightness_xrand_up (XfpmBrightness *brightness, glong *new_level)
+     
+     if ( !ret )
+     {
+-	g_warning ("xfpm_brightness_xrand_up failed for %li", set_level);
++	g_warning ("xfpm_brightness_xrand_up failed for %d", set_level);
+ 	return FALSE;
+     }
+ 	
+     /* Nothing changed in the hardware*/
+     if ( *new_level == hw_level )
+     {
+-	g_warning ("xfpm_brightness_xrand_up did not change the hw level to %li", set_level);
++	g_warning ("xfpm_brightness_xrand_up did not change the hw level to %d", set_level);
+ 	return FALSE;
+     }
+     
+@@ -265,11 +265,11 @@ xfpm_brightness_xrand_up (XfpmBrightness *brightness, glong *new_level)
+ }
+ 
+ static gboolean
+-xfpm_brightness_xrand_down (XfpmBrightness *brightness, long *new_level)
++xfpm_brightness_xrand_down (XfpmBrightness *brightness, gint32 *new_level)
+ {
+-    long hw_level;
++    gint32 hw_level;
+     gboolean ret;
+-    long set_level;
++    gint32 set_level;
+     
+     ret = xfpm_brightness_xrandr_get_level (brightness, brightness->priv->output, &hw_level);
+     
+@@ -290,14 +290,14 @@ xfpm_brightness_xrand_down (XfpmBrightness *brightness, long *new_level)
+     
+     if ( !ret )
+     {
+-	g_warning ("xfpm_brightness_xrand_down failed for %li", set_level);
++	g_warning ("xfpm_brightness_xrand_down failed for %d", set_level);
+ 	return FALSE;
+     }
+     
+     /* Nothing changed in the hardware*/
+     if ( *new_level == hw_level )
+     {
+-	g_warning ("xfpm_brightness_xrand_down did not change the hw level to %li", set_level);
++	g_warning ("xfpm_brightness_xrand_down did not change the hw level to %d", set_level);
+ 	return FALSE;
+     }
+     
+@@ -361,7 +361,7 @@ xfpm_brightness_setup_helper (XfpmBrightness *brightness)
+ }
+ 
+ static gboolean
+-xfpm_brightness_helper_get_level (XfpmBrightness *brg, glong *level)
++xfpm_brightness_helper_get_level (XfpmBrightness *brg, gint32 *level)
+ {
+     int ret;
+ 
+@@ -406,11 +406,11 @@ out:
+ }
+ 
+ static gboolean
+-xfpm_brightness_helper_up (XfpmBrightness *brightness, glong *new_level)
++xfpm_brightness_helper_up (XfpmBrightness *brightness, gint32 *new_level)
+ {
+-    glong hw_level;
++    gint32 hw_level;
+     gboolean ret = FALSE;
+-    gint set_level;
++    gint32 set_level;
+     
+     ret = xfpm_brightness_helper_get_level (brightness, &hw_level);
+     
+@@ -446,11 +446,11 @@ xfpm_brightness_helper_up (XfpmBrightness *brightness, glong *new_level)
+ }
+ 
+ static gboolean
+-xfpm_brightness_helper_down (XfpmBrightness *brightness, glong *new_level)
++xfpm_brightness_helper_down (XfpmBrightness *brightness, gint32 *new_level)
+ {
+-    glong hw_level;
++    gint32 hw_level;
+     gboolean ret;
+-    gint set_level;
++    gint32 set_level;
+     
+     ret = xfpm_brightness_helper_get_level (brightness, &hw_level);
+     
+@@ -572,7 +572,7 @@ xfpm_brightness_setup (XfpmBrightness *brightness)
+     return FALSE;
+ }
+ 
+-gboolean xfpm_brightness_up (XfpmBrightness *brightness, glong *new_level)
++gboolean xfpm_brightness_up (XfpmBrightness *brightness, gint32 *new_level)
+ {
+     gboolean ret = FALSE;
+     
+@@ -589,7 +589,7 @@ gboolean xfpm_brightness_up (XfpmBrightness *brightness, glong *new_level)
+     return ret;
+ }
+ 
+-gboolean xfpm_brightness_down (XfpmBrightness *brightness, glong *new_level)
++gboolean xfpm_brightness_down (XfpmBrightness *brightness, gint32 *new_level)
+ {
+     gboolean ret = FALSE;
+     
+@@ -618,7 +618,7 @@ gint xfpm_brightness_get_max_level (XfpmBrightness *brightness)
+     return brightness->priv->max_level;
+ }
+ 
+-gboolean xfpm_brightness_get_level	(XfpmBrightness *brightness, glong *level)
++gboolean xfpm_brightness_get_level	(XfpmBrightness *brightness, gint32 *level)
+ {
+     gboolean ret = FALSE;
+     
+@@ -632,7 +632,7 @@ gboolean xfpm_brightness_get_level	(XfpmBrightness *brightness, glong *level)
+     return ret;
+ }
+ 
+-gboolean xfpm_brightness_set_level (XfpmBrightness *brightness, glong level)
++gboolean xfpm_brightness_set_level (XfpmBrightness *brightness, gint32 level)
+ {
+     gboolean ret = FALSE;
+     
+diff --git a/common/xfpm-brightness.h b/common/xfpm-brightness.h
+index 0c4e3ed..26b3dbe 100644
+--- a/common/xfpm-brightness.h
++++ b/common/xfpm-brightness.h
+@@ -51,20 +51,20 @@ XfpmBrightness       	       *xfpm_brightness_new             (void);
+ gboolean			xfpm_brightness_setup 		(XfpmBrightness *brightness);
+ 
+ gboolean			xfpm_brightness_up		(XfpmBrightness *brightness,
+-								 glong *new_level);
++								 gint32 *new_level);
+ 
+ gboolean			xfpm_brightness_down		(XfpmBrightness *brightness,
+-								 glong *new_level);
++								 gint32 *new_level);
+ 
+ gboolean			xfpm_brightness_has_hw 		(XfpmBrightness *brightness);
+ 
+ gint 				xfpm_brightness_get_max_level   (XfpmBrightness *brightness);
+ 
+ gboolean			xfpm_brightness_get_level	(XfpmBrightness *brightness,
+-								 glong *level);
++								 gint32 *level);
+ 
+ gboolean			xfpm_brightness_set_level	(XfpmBrightness *brightness,
+-								 glong level);
++								 gint32 level);
+ 
+ gboolean			xfpm_brightness_dim_down	(XfpmBrightness *brightness);
+ 
+diff --git a/panel-plugins/brightness/brightness-button.c b/panel-plugins/brightness/brightness-button.c
+index 6e60c29..bd466c9 100644
+--- a/panel-plugins/brightness/brightness-button.c
++++ b/panel-plugins/brightness/brightness-button.c
+@@ -186,7 +186,7 @@ static gboolean
+ brightness_button_popup_win (GtkWidget *widget, GdkEvent *ev, guint32 ev_time)
+ {
+     gint x, y;
+-    glong current_level = 0;
++    gint32 current_level = 0;
+     GdkDisplay *display;
+     GdkScreen *screen;
+     BrightnessButton *button;
+@@ -342,7 +342,7 @@ plus_clicked (GtkWidget *widget, BrightnessButton *button)
+ static void
+ range_value_changed (GtkWidget *widget, BrightnessButton *button)
+ {
+-    glong range_level, hw_level;
++    gint32 range_level, hw_level;
+     
+     range_level = (gint) gtk_range_get_value (GTK_RANGE (button->priv->range));
+     
+@@ -428,8 +428,8 @@ brightness_button_create_popup (BrightnessButton *button)
+ static void
+ brightness_button_up (BrightnessButton *button)
+ {
+-    glong level;
+-    glong max_level;
++    gint32 level;
++    gint32 max_level;
+     
+     xfpm_brightness_get_level (button->priv->brightness, &level);
+     max_level = xfpm_brightness_get_max_level (button->priv->brightness);
+@@ -443,7 +443,7 @@ brightness_button_up (BrightnessButton *button)
+ static void
+ brightness_button_down (BrightnessButton *button)
+ {
+-    glong level;
++    gint32 level;
+     xfpm_brightness_get_level (button->priv->brightness, &level);
+     
+     if ( level != 0 )
+diff --git a/src/xfpm-backlight.c b/src/xfpm-backlight.c
+index baeeb43..45c990f 100644
+--- a/src/xfpm-backlight.c
++++ b/src/xfpm-backlight.c
+@@ -63,8 +63,8 @@ struct XfpmBacklightPrivate
+     gboolean	    has_hw;
+     gboolean	    on_battery;
+     
+-    glong            last_level;
+-    glong 	    max_level;
++    gint32          last_level;
++    gint32 	    max_level;
+     
+     gboolean        dimmed;
+     gboolean	    block;
+@@ -79,7 +79,7 @@ xfpm_backlight_dim_brightness (XfpmBacklight *backlight)
+     
+     if (xfpm_power_get_mode (backlight->priv->power) == XFPM_POWER_MODE_NORMAL )
+     {
+-	glong dim_level;
++	gint32 dim_level;
+ 	
+ 	g_object_get (G_OBJECT (backlight->priv->conf),
+ 		      backlight->priv->on_battery ? BRIGHTNESS_LEVEL_ON_BATTERY : BRIGHTNESS_LEVEL_ON_AC, &dim_level,
+@@ -101,7 +101,7 @@ xfpm_backlight_dim_brightness (XfpmBacklight *backlight)
+ 	 **/
+ 	if (backlight->priv->last_level > dim_level)
+ 	{
+-	    XFPM_DEBUG ("Current brightness level before dimming : %li, new %li", backlight->priv->last_level, dim_level);
++	    XFPM_DEBUG ("Current brightness level before dimming : %d, new %d", backlight->priv->last_level, dim_level);
+ 	    backlight->priv->dimmed = xfpm_brightness_set_level (backlight->priv->brightness, dim_level);
+ 	}
+     }
+@@ -182,7 +182,7 @@ xfpm_backlight_reset_cb (EggIdletime *idle, XfpmBacklight *backlight)
+     {
+ 	if ( !backlight->priv->block)
+ 	{
+-	    XFPM_DEBUG ("Alarm reset, setting level to %li", backlight->priv->last_level);
++	    XFPM_DEBUG ("Alarm reset, setting level to %d", backlight->priv->last_level);
+ 	    xfpm_brightness_set_level (backlight->priv->brightness, backlight->priv->last_level);
+ 	}
+ 	backlight->priv->dimmed = FALSE;
+@@ -192,7 +192,7 @@ xfpm_backlight_reset_cb (EggIdletime *idle, XfpmBacklight *backlight)
+ static void
+ xfpm_backlight_button_pressed_cb (XfpmButton *button, XfpmButtonKey type, XfpmBacklight *backlight)
+ {
+-    glong level;
++    gint32 level;
+     gboolean ret = TRUE;
+     
+     gboolean enable_brightness, show_popup;
+-- 
+cgit v0.10.1
+
diff --git a/pkgs/desktops/xfce/core/xfce4-power-manager.nix b/pkgs/desktops/xfce/core/xfce4-power-manager.nix
index 91ec6b40e23e..7740af438d9c 100644
--- a/pkgs/desktops/xfce/core/xfce4-power-manager.nix
+++ b/pkgs/desktops/xfce/core/xfce4-power-manager.nix
@@ -11,11 +11,6 @@ stdenv.mkDerivation rec {
     sha256 = "1sc4f4wci5yl3l9lk7vcsbwj6hdjshbxw9qm43s64jr882jriyyp";
   };
 
-  brightness_patch = fetchurl {
-    url = "http://git.xfce.org/xfce/xfce4-power-manager/patch/?id=05d12e12596512f7a31d3cdb4845a69dc2d4c611";
-    sha256 = "1y8520s0s4d7x1abdwsm5qig4vgm3np7hhagfbdwd5ymiz5nn9mw";
-  };
-
   name = "${p_name}-${ver_maj}.${ver_min}";
 
   buildInputs =
@@ -24,7 +19,7 @@ stdenv.mkDerivation rec {
     ];
   preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
 
-  patches = [ brightness_patch ];
+  patches = ./xfce4-power-manager-brightness.patch;
 
   meta = {
     homepage = http://goodies.xfce.org/projects/applications/xfce4-power-manager;
diff --git a/pkgs/development/compilers/fsharp/default.nix b/pkgs/development/compilers/fsharp/default.nix
index bb9c6d75d446..8cc283bc3f14 100644
--- a/pkgs/development/compilers/fsharp/default.nix
+++ b/pkgs/development/compilers/fsharp/default.nix
@@ -1,18 +1,30 @@
-{ stdenv, fetchurl, mono, unzip, pkgconfig
- } :
+{ stdenv, fetchgit, mono, pkgconfig, autoconf, automake, which }:
+
 stdenv.mkDerivation rec {
-  pname = "fsharp";
-  date = "2011-08-10";
-  name = "${pname}-${date}";
+  name = "fsharp-${version}";
+  version = "3.1";
 
-  src = fetchurl {
-    url = "http://download.mono-project.com/sources/fsharp/fsharp-cc126f2.zip";
-    sha256 = "03j2ypnfddl2zpvg8ivhafjy8dlz49b38rdy89l8c3irxdsb7k6i";
+  src = fetchgit {
+    url = "https://github.com/fsharp/fsharp";
+    rev = "refs/heads/fsharp_31";
+    sha256 = "0d41ae31c57ec9ac8a4ea149b615ae085f3774b8877d8e53ddbf68856c32eda0";
   };
 
-  buildInputs = [mono unzip pkgconfig];
+  buildInputs = [ mono pkgconfig autoconf automake which ];
+  configurePhase = ''
+    substituteInPlace ./autogen.sh "/usr/bin/env sh" "/bin/sh"
+    ./autogen.sh --prefix $out
+  '';
 
-  sourceRoot = "fsharp";
+  # Make sure the executables use the right mono binary,
+  # and set up some symlinks for backwards compatibility.
+  postInstall = ''
+    substituteInPlace $out/bin/fsharpc --replace " mono " " ${mono}/bin/mono "
+    substituteInPlace $out/bin/fsharpi --replace " mono " " ${mono}/bin/mono "
+    substituteInPlace $out/bin/fsharpiAnyCpu --replace " mono " " ${mono}/bin/mono "
+    ln -s $out/bin/fsharpc $out/bin/fsc
+    ln -s $out/bin/fsharpi $out/bin/fsi
+  '';
 
   # To fix this error when running:
   # The file "/nix/store/path/whatever.exe" is an not a valid CIL image
@@ -20,9 +32,9 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A functional CLI language";
-    homepage = "http://tryfsharp.org/";
+    homepage = "http://fsharp.org/";
     license = stdenv.lib.licenses.asl20;
-    maintainers = [ stdenv.lib.maintainers.raskin ];
+    maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ];
     platforms = with stdenv.lib.platforms; linux;
   };
 }
diff --git a/pkgs/development/compilers/ghc/7.4.2.nix b/pkgs/development/compilers/ghc/7.4.2.nix
index d1acb3d09b9e..497a59e17fa5 100644
--- a/pkgs/development/compilers/ghc/7.4.2.nix
+++ b/pkgs/development/compilers/ghc/7.4.2.nix
@@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
   preConfigure = ''
     echo "${buildMK}" > mk/build.mk
     sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
     export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
   '';
 
diff --git a/pkgs/development/compilers/ghc/7.8.1.nix b/pkgs/development/compilers/ghc/7.8.1.nix
index c9ca6fd8719b..f58ca9cc1fc2 100644
--- a/pkgs/development/compilers/ghc/7.8.1.nix
+++ b/pkgs/development/compilers/ghc/7.8.1.nix
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
   preConfigure = ''
     echo "${buildMK}" > mk/build.mk
     sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
     export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
   '';
 
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index f4f8be273679..cc220eb7b1c2 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, happy, alex }:
 
 stdenv.mkDerivation rec {
-  version = "7.7.20131202";
+  version = "7.9.20140313";
   name = "ghc-${version}";
 
   src = fetchurl {
     url = "http://cryp.to/${name}.tar.xz";
-    sha256 = "1gnp5c3x7dbaz7s2yvkw2fmvqh5by2gpp0zlcyj8p2gv13gxi2cb";
+    sha256 = "03i9ajgzlp2y0qq7qnmyji6vdcgx2xnsyrc2zbqbziinf86igwhi";
   };
 
   buildInputs = [ ghc perl gmp ncurses happy alex ];
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
   preConfigure = ''
     echo "${buildMK}" > mk/build.mk
     sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
     export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
   '';
 
diff --git a/pkgs/development/compilers/jdk/jdk7-linux.nix b/pkgs/development/compilers/jdk/jdk7-linux.nix
index 6e1fec4d18ca..106b9fa02d79 100644
--- a/pkgs/development/compilers/jdk/jdk7-linux.nix
+++ b/pkgs/development/compilers/jdk/jdk7-linux.nix
@@ -6,6 +6,19 @@
 , installjdk ? true
 , pluginSupport ? true
 , installjce ? false
+, glib
+, libxml2
+, libav_0_8
+, ffmpeg_0_6
+, libxslt
+, mesa_noglu
+, freetype
+, fontconfig
+, gnome
+, cairo
+, alsaLib
+, atk
+, gdk_pixbuf
 }:
 
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
@@ -87,7 +100,7 @@ stdenv.mkDerivation rec {
     # construct the rpath
     rpath=
     for i in $libraries; do
-        rpath=$rpath''${rpath:+:}$i/lib
+        rpath=$rpath''${rpath:+:}$i/lib''${rpath:+:}$i/lib64
     done
 
     if test -z "$installjdk"; then
@@ -102,6 +115,8 @@ stdenv.mkDerivation rec {
     fi
 
     rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/jli
+    rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/server
+    rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/xawt
     rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}
 
     # set all the dynamic linkers
@@ -111,6 +126,12 @@ stdenv.mkDerivation rec {
 
     find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
 
+    # HACK: For some reason, appending atk to the global patchelf rpath paths causes:
+    #   java: relocation error: java: symbol , version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
+    # Because only libglass.so needs atk, we put it only in it's rpath.
+    # This seems to work fine.
+    patchelf --set-rpath "$rpath:${atk}/lib" $out/jre/lib/${architecture}/libglass.so
+
     if test -z "$pluginSupport"; then
       rm -f $out/bin/javaws
       if test -n "$installjdk"; then
@@ -128,8 +149,8 @@ stdenv.mkDerivation rec {
    * libXt is only needed on amd64
    */
   libraries =
-    [stdenv.gcc.libc] ++
-    (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt] else []);
+    [stdenv.gcc.libc glib libxml2 libav_0_8 ffmpeg_0_6 libxslt mesa_noglu xlibs.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf] ++
+    (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.gcc.gcc] else []);
 
   passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
 
diff --git a/pkgs/development/compilers/mono/build-fix-llvm.patch b/pkgs/development/compilers/mono/build-fix-llvm.patch
new file mode 100644
index 000000000000..526986ad12c7
--- /dev/null
+++ b/pkgs/development/compilers/mono/build-fix-llvm.patch
@@ -0,0 +1,12 @@
+diff --git a/lib/CodeGen/AsmPrinter/CMakeLists.txt.old b/lib/CodeGen/AsmPrinter/CMakeLists.txt
+index be484a6..c92ff46 100644
+--- a/lib/CodeGen/AsmPrinter/CMakeLists.txt.old
++++ b/lib/CodeGen/AsmPrinter/CMakeLists.txt
+@@ -10,6 +10,7 @@ add_llvm_library(LLVMAsmPrinter
+   DwarfCompileUnit.cpp
+   DwarfDebug.cpp
+   DwarfException.cpp
++  DwarfMonoException.cpp
+   ErlangGCPrinter.cpp
+   OcamlGCPrinter.cpp
+   Win64Exception.cpp
diff --git a/pkgs/development/compilers/mono/default.nix b/pkgs/development/compilers/mono/default.nix
index 88bef618f743..4ff2dacff188 100644
--- a/pkgs/development/compilers/mono/default.nix
+++ b/pkgs/development/compilers/mono/default.nix
@@ -1,13 +1,18 @@
-{stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11}:
+{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? true }:
 
+let
+  llvm     = callPackage ./llvm.nix { };
+  llvmOpts = stdenv.lib.optionalString withLLVM "--enable-llvm --enable-llvmloaded --with-llvm=${llvm}";
+in
 stdenv.mkDerivation rec {
-  name = "mono-2.11.4";
+  name = "mono-${version}";
+  version = "3.2.8";
   src = fetchurl {
     url = "http://download.mono-project.com/sources/mono/${name}.tar.bz2";
-    sha256 = "0wv8pnj02mq012sihx2scx0avyw51b5wb976wn7x86zda0vfcsnr";
+    sha256 = "0h0s42pmgrhwqaym0b1401h70dcpr179ngcsp7f8i4hl4snqrd7x";
   };
 
-  buildInputs = [bison pkgconfig glib gettext perl libgdiplus libX11];
+  buildInputs = [bison pkgconfig glib gettext perl libgdiplus libX11 ncurses zlib];
   propagatedBuildInputs = [glib];
 
   NIX_LDFLAGS = "-lgcc_s" ;
@@ -17,7 +22,7 @@ stdenv.mkDerivation rec {
 
   # In fact I think this line does not help at all to what I
   # wanted to achieve: have mono to find libgdiplus automatically
-  configureFlags = "--x-includes=${libX11}/include --x-libraries=${libX11}/lib --with-libgdiplus=${libgdiplus}/lib/libgdiplus.so";
+  configureFlags = "--x-includes=${libX11}/include --x-libraries=${libX11}/lib --with-libgdiplus=${libgdiplus}/lib/libgdiplus.so ${llvmOpts}";
 
   # Attempt to fix this error when running "mcs --version":
   # The file /nix/store/xxx-mono-2.4.2.1/lib/mscorlib.dll is an invalid CIL image
@@ -26,10 +31,14 @@ stdenv.mkDerivation rec {
   # Parallel building doesn't work, as shows http://hydra.nixos.org/build/2983601
   enableParallelBuilding = false;
 
-  preBuild = "
+  # Patch all the necessary scripts. Also, if we're using LLVM, we fix the default
+  # LLVM path to point into the Mono LLVM build, since it's private anyway.
+  preBuild = ''
     makeFlagsArray=(INSTALL=`type -tp install`)
     patchShebangs ./
-  ";
+  '' + stdenv.lib.optionalString withLLVM ''
+    substituteInPlace mono/mini/aot-compiler.c --replace "llvm_path = g_strdup (\"\")" "llvm_path = g_strdup (\"${llvm}/bin/\")"
+  '';
 
   #Fix mono DLLMap so it can find libX11 and gdiplus to run winforms apps
   #Other items in the DLLMap may need to be pointed to their store locations, I don't think this is exhaustive
@@ -46,7 +55,7 @@ stdenv.mkDerivation rec {
     homepage = http://mono-project.com/;
     description = "Cross platform, open source .NET development framework";
     platforms = with stdenv.lib.platforms; linux;
-    maintainers = with stdenv.lib.maintainers; [viric];
+    maintainers = with stdenv.lib.maintainers; [ viric thoughtpolice ];
     license = "free"; # Combination of LGPL/X11/GPL ?
   };
 }
diff --git a/pkgs/development/compilers/mono/llvm.nix b/pkgs/development/compilers/mono/llvm.nix
new file mode 100644
index 000000000000..74f85b1519c6
--- /dev/null
+++ b/pkgs/development/compilers/mono/llvm.nix
@@ -0,0 +1,59 @@
+{ stdenv
+, fetchurl
+, perl
+, groff
+, cmake
+, python
+, libffi
+, binutils
+, libxml2
+, valgrind
+, ncurses
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  name    = "llvm-${version}";
+  version = "3.4svn-mono-f9b1a74368";
+  src = fetchurl {
+    # from the HEAD of the 'mono3' branch
+    url = "https://github.com/mono/llvm/archive/f9b1a74368ec299fc04c4cfef4b5aa0992b7b806.tar.gz";
+    name = "${name}.tar.gz";
+    sha256 = "1bbkx4p5zdnk3nbdd5jxvbwqx8cdq8z1n1nhf639i98mggs0zhdg";
+  };
+
+  patches = [ ./build-fix-llvm.patch ];
+  unpackPhase = ''
+    unpackFile ${src}
+    mv llvm-* llvm
+    sourceRoot=$PWD/llvm
+  '';
+
+  buildInputs = [ perl groff cmake libxml2 python libffi ] ++ stdenv.lib.optional stdenv.isLinux valgrind;
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+  postBuild = "rm -fR $out";
+
+  cmakeFlags = with stdenv; [
+    "-DCMAKE_BUILD_TYPE=Release"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_BINUTILS_INCDIR=${binutils}/include"
+    "-DCMAKE_CXX_FLAGS=-std=c++11"
+  ] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Collection of modular and reusable compiler and toolchain technologies - Mono build";
+    homepage    = http://llvm.org/;
+    license     = stdenv.lib.licenses.bsd3;
+    maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/interpreters/clisp/2.44.1.nix b/pkgs/development/interpreters/clisp/2.44.1.nix
index 521933b0ed1f..7b811732a626 100644
--- a/pkgs/development/interpreters/clisp/2.44.1.nix
+++ b/pkgs/development/interpreters/clisp/2.44.1.nix
@@ -3,12 +3,12 @@
 , libffi, libffcall, coreutils }:
         
 stdenv.mkDerivation rec {
-  v = "2.44.1";
+  v = "2.49";
   name = "clisp-${v}";
   
   src = fetchurl {
     url = "mirror://gnu/clisp/release/${v}/${name}.tar.gz";
-    sha256 = "0rkp6j6rih4s5d9acifh7pi4b9xfgcspif512l269dqy9qgyy4j1";
+    sha256 = "0rp82nqp5362isl9i34rwgg04cidz7izljd9d85pqcw1qr964bxx";
   };
 
   buildInputs =
diff --git a/pkgs/development/interpreters/python/3.4/default.nix b/pkgs/development/interpreters/python/3.4/default.nix
index 8d7da9d91e64..3725586f3f4c 100644
--- a/pkgs/development/interpreters/python/3.4/default.nix
+++ b/pkgs/development/interpreters/python/3.4/default.nix
@@ -18,7 +18,7 @@ with stdenv.lib;
 let
   majorVersion = "3.4";
   version = "${majorVersion}.0";
-  fullVersion = "${version}rc2";
+  fullVersion = "${version}";
 
   buildInputs = filter (p: p != null) [
     zlib bzip2 gdbm sqlite db readline ncurses openssl tcl tk libX11 xproto
@@ -30,7 +30,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://www.python.org/ftp/python/${version}/Python-${fullVersion}.tar.xz";
-    sha256 = "0v37mlkwzbc8m54h3nb04x6xm2yx5fmd7flq2shn37ixf9d0ih6z";
+    sha256 = "1gjcn5c3zqg161vwzh43ciha15w0plf5v7cyfm372pnllb08cdpi";
   };
 
   NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
index c3b33dfaf620..6964d8ac8040 100644
--- a/pkgs/development/libraries/SDL2/default.nix
+++ b/pkgs/development/libraries/SDL2/default.nix
@@ -22,11 +22,11 @@ let
       '';
 in
 stdenv.mkDerivation rec {
-  name = "SDL2-2.0.1";
+  name = "SDL2-2.0.2";
 
   src = fetchurl {
     url = "http://www.libsdl.org/release/${name}.tar.gz";
-    sha256 = "1w1jcz7hilk4fl8wlhiwvd1licg8lwy0brqz05562xv7l81fkrqa";
+    sha256 = "0l78h3wlirnxxrdw3kkm9amhgjn6xrs9l5j871r552wabbw5f0ar";
   };
 
   # Since `libpulse*.la' contain `-lgdbm', PulseAudio must be propagated.
diff --git a/pkgs/development/libraries/SDL_ttf/default.nix b/pkgs/development/libraries/SDL_ttf/default.nix
index 591a4bfbd6dd..696b6bd0ac8f 100644
--- a/pkgs/development/libraries/SDL_ttf/default.nix
+++ b/pkgs/development/libraries/SDL_ttf/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, SDL, freetype }:
 
 stdenv.mkDerivation {
-  name = "SDL_ttf-2.0.9";
+  name = "SDL_ttf-2.0.11";
 
   src = fetchurl {
-    url = http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.9.tar.gz;
-    sha256 = "0ls6anmlmwrmy21p3y9nfyl6fkwz4jpgh74kw7xd0hwbg5v8h95l";
+    url = http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.tar.gz;
+    sha256 = "1dydxd4f5kb1288i5n5568kdk2q7f8mqjr7i7sd33nplxjaxhk3j";
   };
 
   buildInputs = [SDL freetype];
diff --git a/pkgs/development/libraries/audio/lilv/default.nix b/pkgs/development/libraries/audio/lilv/default.nix
index 9150df8da7d4..d1510e342380 100644
--- a/pkgs/development/libraries/audio/lilv/default.nix
+++ b/pkgs/development/libraries/audio/lilv/default.nix
@@ -22,6 +22,6 @@ stdenv.mkDerivation rec {
     description = "A C library to make the use of LV2 plugins";
     license = licenses.mit;
     maintainers = [ maintainers.goibhniu ];
-
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/audio/lv2/default.nix b/pkgs/development/libraries/audio/lv2/default.nix
index f5d48df03f84..25d19d089a57 100644
--- a/pkgs/development/libraries/audio/lv2/default.nix
+++ b/pkgs/development/libraries/audio/lv2/default.nix
@@ -22,6 +22,6 @@ stdenv.mkDerivation rec {
     description = "A plugin standard for audio systems";
     license = licenses.mit;
     maintainers = [ maintainers.goibhniu ];
-
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/audio/sratom/default.nix b/pkgs/development/libraries/audio/sratom/default.nix
index 5c78296af971..ac0b9d233fa8 100644
--- a/pkgs/development/libraries/audio/sratom/default.nix
+++ b/pkgs/development/libraries/audio/sratom/default.nix
@@ -22,6 +22,6 @@ stdenv.mkDerivation rec {
     description = "A library for serialising LV2 atoms to/from RDF";
     license = licenses.mit;
     maintainers = [ maintainers.goibhniu ];
-
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/audio/suil/default.nix b/pkgs/development/libraries/audio/suil/default.nix
index 8af725b6b80f..87e034726594 100644
--- a/pkgs/development/libraries/audio/suil/default.nix
+++ b/pkgs/development/libraries/audio/suil/default.nix
@@ -22,6 +22,6 @@ stdenv.mkDerivation rec {
     description = "A lightweight C library for loading and wrapping LV2 plugin UIs";
     license = licenses.mit;
     maintainers = [ maintainers.goibhniu ];
-
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/check/default.nix b/pkgs/development/libraries/check/default.nix
index a424041dbc23..a0e1bcfa6121 100644
--- a/pkgs/development/libraries/check/default.nix
+++ b/pkgs/development/libraries/check/default.nix
@@ -1,12 +1,12 @@
 { fetchurl, stdenv }:
 
-let version = "0.9.11"; in
+let version = "0.9.12"; in
 stdenv.mkDerivation {
   name = "check-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/check/${version}/check-${version}.tar.gz";
-    sha256 = "0dk9jx9hjjwsgly0iwvr5hhw870zlx21gwar7zxlzfq0zdzqqkpa";
+    sha256 = "18qybf3s25s1gydp2lwbc4icnmdc6f9sj21fllcwm81kw5apxm67";
   };
 
   # Test can randomly fail: http://hydra.nixos.org/build/7243912
diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix
index 2101f99bbb90..11ad2014663a 100644
--- a/pkgs/development/libraries/dbus/default.nix
+++ b/pkgs/development/libraries/dbus/default.nix
@@ -56,7 +56,7 @@ let
       "--localstatedir=/var"
       "--sysconfdir=/etc"
       "--with-session-socket-dir=/tmp"
-      "--with-systemdsystemunitdir=$(out)/lib/systemd"
+      "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
     ];
 
     enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/facile/default.nix b/pkgs/development/libraries/facile/default.nix
index edbe99cd8b07..5e3776afbc05 100644
--- a/pkgs/development/libraries/facile/default.nix
+++ b/pkgs/development/libraries/facile/default.nix
@@ -9,9 +9,11 @@ stdenv.mkDerivation rec {
   };
   
   dontAddPrefix = 1;
-        
-  patchPhase = "sed -e 's@mkdir@mkdir -p@' -i Makefile";
-  
+
+  patches = [ ./ocaml_4.xx.patch ];
+
+  postPatch = "sed -e 's@mkdir@mkdir -p@' -i Makefile";
+
   postConfigure = "make -C src .depend";
   
   makeFlags = "FACILEDIR=\${out}/lib/ocaml/facile";
diff --git a/pkgs/development/libraries/facile/ocaml_4.xx.patch b/pkgs/development/libraries/facile/ocaml_4.xx.patch
new file mode 100644
index 000000000000..429405fabdaa
--- /dev/null
+++ b/pkgs/development/libraries/facile/ocaml_4.xx.patch
@@ -0,0 +1,12 @@
+diff -rupN facile-1.1/src/fcl_data.ml facile-1.1-patched//src/fcl_data.ml
+--- facile-1.1/src/fcl_data.ml	2004-09-08 11:51:02.000000000 +0200
++++ facile-1.1-patched//src/fcl_data.ml	2012-12-16 13:49:36.286722670 +0100
+@@ -16,7 +16,7 @@ end
+ 
+ module Hashtbl = struct
+   type ('a, 'b) t = ('a, 'b) Hashtbl.t
+-  let create = Hashtbl.create
++  let create x = Hashtbl.create x
+   let get h = h
+ 
+   let add h k d =
diff --git a/pkgs/development/libraries/ffmpeg/0.10.nix b/pkgs/development/libraries/ffmpeg/0.10.nix
index f356bceaf401..99c823e7b297 100644
--- a/pkgs/development/libraries/ffmpeg/0.10.nix
+++ b/pkgs/development/libraries/ffmpeg/0.10.nix
@@ -21,11 +21,11 @@ assert vdpauSupport -> libvdpau != null;
 assert faacSupport -> faac != null;
 
 stdenv.mkDerivation rec {
-  name = "ffmpeg-0.10.11";
+  name = "ffmpeg-0.10.12";
 
   src = fetchurl {
     url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
-    sha256 = "1l1nyvsfafl9w0falv1hcm65r2rlxyb59har0rkrrpi56fj1ma4r";
+    sha256 = "00nvm3iysn8zincpvv1abqrxqj1ky0322dh2j9csjw983358538i";
   };
 
   # `--enable-gpl' (as well as the `postproc' and `swscale') mean that
diff --git a/pkgs/development/libraries/geoip/default.nix b/pkgs/development/libraries/geoip/default.nix
index 94c0505bc6fa..1abcb7c6943d 100644
--- a/pkgs/development/libraries/geoip/default.nix
+++ b/pkgs/development/libraries/geoip/default.nix
@@ -1,24 +1,19 @@
-a :
-let
-  s = import ./src-for-default.nix;
-  buildInputs = with a; [
-    zlib
-  ];
-in
-rec {
-  src = a.fetchUrlFromSrcInfo s;
+{ stdenv, fetchurl }:
 
-  inherit (s) name;
-  inherit buildInputs;
-  configureFlags = [];
+let version = "1.6.0"; in
 
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doConfigure" "doMakeInstall"];
+stdenv.mkDerivation {
+  name = "geoip-${version}";
+
+  src = fetchurl {
+    url = "http://geolite.maxmind.com/download/geoip/api/c/GeoIP-${version}.tar.gz";
+    sha256 = "0dd6si4cvip73kxdn43apg6yygvaf7dnk5awqfg9w2fd2ll0qnh7";
+  };
 
   meta = {
     description = "Geolocation API";
-    maintainers = [
-      a.lib.maintainers.raskin
-    ];
+    maintainers = [ stdenv.lib.maintainers.raskin ];
+    license = stdenv.lib.licenses.lgpl21;
+    platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/geoip/src-for-default.nix b/pkgs/development/libraries/geoip/src-for-default.nix
deleted file mode 100644
index 1fc4b9b8755a..000000000000
--- a/pkgs/development/libraries/geoip/src-for-default.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-rec {
-  advertisedUrl="http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.6.tar.gz";
-  version = "1.4.6";
-  url="http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.6.0.tar.gz";
-  hash = "0dd6si4cvip73kxdn43apg6yygvaf7dnk5awqfg9w2fd2ll0qnh7";
-  name = "geoip-1.6.0";
-  
-}
diff --git a/pkgs/development/libraries/geoip/src-info-for-default.nix b/pkgs/development/libraries/geoip/src-info-for-default.nix
deleted file mode 100644
index 99c79227c630..000000000000
--- a/pkgs/development/libraries/geoip/src-info-for-default.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-  downloadPage = "http://geolite.maxmind.com/download/geoip/api/c/";
-  sourceRegexp = "GeoIP-[0-9.]+[.]tar[.]gz";
-  choiceCommand = "tail -1";
-  baseName = "geoip";
-}
diff --git a/pkgs/development/libraries/gnutls/3.2.nix b/pkgs/development/libraries/gnutls/3.2.nix
index fff05ed87271..45d0270de5a8 100644
--- a/pkgs/development/libraries/gnutls/3.2.nix
+++ b/pkgs/development/libraries/gnutls/3.2.nix
@@ -4,11 +4,11 @@
 assert guileBindings -> guile != null;
 
 stdenv.mkDerivation rec {
-  name = "gnutls-3.2.12";
+  name = "gnutls-3.2.12.1";
 
   src = fetchurl {
     url = "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/${name}.tar.lz";
-    sha256 = "1zwk9qkxn3190nssyamd7jsb3ag6mnnln3jwbgmjs1w306dzwafi";
+    sha256 = "1787n4iard3ad0p44xbl4aj3r3f5ir3sz0b2s27qpaaia2w4774g";
   };
 
   patches =
diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix
index a9137ad46a77..7647c0f64dba 100644
--- a/pkgs/development/libraries/gstreamer/bad/default.nix
+++ b/pkgs/development/libraries/gstreamer/bad/default.nix
@@ -9,11 +9,18 @@
 stdenv.mkDerivation rec {
   name = "gst-plugins-bad-1.2.3";
 
-  meta = {
-    homepage = "http://gstreamer.freedesktop.org";
-    license = stdenv.lib.licenses.gpl2Plus;
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [ iyzsong ];
+  meta = with stdenv.lib; {
+    description = "Gstreamer Bad Plugins";
+    homepage    = "http://gstreamer.freedesktop.org";
+    longDescription = ''
+      a set of plug-ins that aren't up to par compared to the
+      rest.  They might be close to being good quality, but they're missing
+      something - be it a good code review, some documentation, a set of tests,
+      a real live maintainer, or some actual wide use.
+    '';
+    license     = licenses.lgpl2Plus;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ iyzsong ];
   };
 
   src = fetchurl {
diff --git a/pkgs/development/libraries/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/default.nix
index b68de91c240f..4796ce078dfb 100644
--- a/pkgs/development/libraries/gstreamer/default.nix
+++ b/pkgs/development/libraries/gstreamer/default.nix
@@ -14,4 +14,8 @@ rec {
   gst-libav = callPackage ./libav { inherit gst-plugins-base; };
 
   gst-python = callPackage ./python { inherit gst-plugins-base gstreamer; };
+
+  gnonlin = callPackage ./gnonlin { inherit gst-plugins-base; };
+
+  gst-editing-services = callPackage ./ges { inherit gnonlin; };
 }
diff --git a/pkgs/development/libraries/gstreamer/ges/default.nix b/pkgs/development/libraries/gstreamer/ges/default.nix
new file mode 100644
index 000000000000..94d3688eb1ce
--- /dev/null
+++ b/pkgs/development/libraries/gstreamer/ges/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, pkgconfig, python
+, gnonlin, libxml2
+}:
+
+stdenv.mkDerivation rec {
+  name = "gstreamer-editing-services-1.2.0";
+
+  meta = with stdenv.lib; {
+    description = "Library for creation of audio/video non-linear editors";
+    homepage    = "http://gstreamer.freedesktop.org";
+    license     = licenses.lgpl2Plus;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ iyzsong ];
+  };
+
+  src = fetchurl {
+    url = "${meta.homepage}/src/gstreamer-editing-services/${name}.tar.xz";
+    sha256 = "1n7nw8rqvwna9af55lggah44gdvfgld1igvgaya8glc37wpq89b0";
+  };
+
+  nativeBuildInputs = [ pkgconfig python ];
+
+  propagatedBuildInputs = [ gnonlin libxml2 ];
+}
diff --git a/pkgs/development/libraries/gstreamer/gnonlin/default.nix b/pkgs/development/libraries/gstreamer/gnonlin/default.nix
new file mode 100644
index 000000000000..c45c1469cb36
--- /dev/null
+++ b/pkgs/development/libraries/gstreamer/gnonlin/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, pkgconfig
+, gst-plugins-base
+}:
+
+stdenv.mkDerivation rec {
+  name = "gnonlin-1.2.0";
+
+  meta = with stdenv.lib; {
+    description = "Gstreamer Non-Linear Multimedia Editing Plugins";
+    homepage    = "http://gstreamer.freedesktop.org";
+    longDescription = ''
+      Gnonlin is a library built on top of GStreamer which provides 
+      support for writing non-linear audio and video editing
+      applications. It introduces the concept of a timeline.
+    '';
+    license     = licenses.lgpl2Plus; 
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ iyzsong ];
+  };
+
+  src = fetchurl {
+    url = "${meta.homepage}/src/gnonlin/${name}.tar.xz";
+    sha256 = "15hyb0kg8sm92kj37cir4l3sa21b8zy4la1ccfhb358b4mf24vl7";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  propagatedBuildInputs = [ gst-plugins-base ];
+}
diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix
index 71151c4e559c..090c84600ab7 100644
--- a/pkgs/development/libraries/gstreamer/good/default.nix
+++ b/pkgs/development/libraries/gstreamer/good/default.nix
@@ -9,11 +9,17 @@
 stdenv.mkDerivation rec {
   name = "gst-plugins-good-1.2.3";
 
-  meta = {
-    homepage = "http://gstreamer.freedesktop.org";
-    license = stdenv.lib.licenses.gpl2Plus;
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [ iyzsong ];
+  meta = with stdenv.lib; {
+    description = "Gstreamer Good Plugins";
+    homepage    = "http://gstreamer.freedesktop.org";
+    longDescription = ''
+      a set of plug-ins that we consider to have good quality code,
+      correct functionality, our preferred license (LGPL for the plug-in
+      code, LGPL or LGPL-compatible for the supporting library).
+    '';
+    license     = licenses.lgpl2Plus;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ iyzsong ];
   };
 
   src = fetchurl {
diff --git a/pkgs/development/libraries/gstreamer/legacy/qt-gstreamer/default.nix b/pkgs/development/libraries/gstreamer/legacy/qt-gstreamer/default.nix
index c3510a69a123..c0cab607062d 100644
--- a/pkgs/development/libraries/gstreamer/legacy/qt-gstreamer/default.nix
+++ b/pkgs/development/libraries/gstreamer/legacy/qt-gstreamer/default.nix
@@ -2,12 +2,12 @@
 , automoc4, flex, bison, pkgconfig }:
 
 stdenv.mkDerivation rec {
-  name = "${pname}-0.10.2";
+  name = "${pname}-0.10.3";
   pname = "qt-gstreamer";
 
   src = fetchurl {
     url = "http://gstreamer.freedesktop.org/src/${pname}/${name}.tar.bz2";
-    sha256 = "1laryg5vgc3prdi7dmpfwa71nsrc3ngv27sgax44c4qfrgpsgwbf";
+    sha256 = "1pqg9sxzk8sdrf7pazb5v21hasqai9i4l203gbdqz29w2ll1ybsl";
   };
 
   buildInputs = [ gstreamer gst_plugins_base glib qt4 ];
diff --git a/pkgs/development/libraries/gstreamer/python/default.nix b/pkgs/development/libraries/gstreamer/python/default.nix
index eaf284e950d4..843822b0748d 100644
--- a/pkgs/development/libraries/gstreamer/python/default.nix
+++ b/pkgs/development/libraries/gstreamer/python/default.nix
@@ -3,14 +3,14 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "gst-python-1.1.90";
+  name = "gst-python-1.2.0";
 
   src = fetchurl {
     urls = [
       "${meta.homepage}/src/gst-python/${name}.tar.bz2"
       "mirror://gentoo/distfiles/${name}.tar.bz2"
       ];
-    sha256 = "1vsykx2l5360y19c0rxspa9nf1ilml2c1ybsv8cw8p696scryb2l";
+    sha256 = "09c6yls8ipbmwimdjr7xi3hvf2xa1xn1pv07855r7wfyzas1xbl1";
   };
 
   buildInputs =
diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix
index 50005004135a..4f16fa4259c8 100644
--- a/pkgs/development/libraries/gstreamer/ugly/default.nix
+++ b/pkgs/development/libraries/gstreamer/ugly/default.nix
@@ -7,11 +7,18 @@
 stdenv.mkDerivation rec {
   name = "gst-plugins-ugly-1.2.3";
 
-  meta = {
-    homepage = "http://gstreamer.freedesktop.org";
-    license = stdenv.lib.licenses.lgpl2Plus;
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [ iyzsong ];
+  meta = with stdenv.lib; {
+    description = "Gstreamer Ugly Plugins";
+    homepage    = "http://gstreamer.freedesktop.org";
+    longDescription = ''
+      a set of plug-ins that have good quality and correct functionality,
+      but distributing them might pose problems.  The license on either
+      the plug-ins or the supporting libraries might not be how we'd
+      like. The code might be widely known to present patent problems.
+    '';
+    license     = licenses.lgpl2Plus;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ iyzsong ];
   };
 
   src = fetchurl {
diff --git a/pkgs/development/libraries/haskell/Glob/default.nix b/pkgs/development/libraries/haskell/Glob/default.nix
index 80c0eaa44ab9..d6f07e9168dc 100644
--- a/pkgs/development/libraries/haskell/Glob/default.nix
+++ b/pkgs/development/libraries/haskell/Glob/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "Glob";
-  version = "0.7.3";
-  sha256 = "0yl0wxbd03dv0hfr2aqwm9f3xnhjkdicymqv3nmhjjslqq3a59zd";
+  version = "0.7.4";
+  sha256 = "00f6xznqh27vbr8rggsrdphqsq1cvv931pa06b1grs7w01dcmw8s";
   buildDepends = [ dlist filepath transformers ];
   meta = {
     homepage = "http://iki.fi/matti.niemenmaa/glob/";
diff --git a/pkgs/development/libraries/haskell/HDBC/HDBC.nix b/pkgs/development/libraries/haskell/HDBC/HDBC.nix
index a8275c31b858..08134abf8438 100644
--- a/pkgs/development/libraries/haskell/HDBC/HDBC.nix
+++ b/pkgs/development/libraries/haskell/HDBC/HDBC.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "HDBC";
-  version = "2.3.1.2";
-  sha256 = "1rjamh8xscb9jhxgxcrs2qnvs2ipv9dqgnn0bpv5vwclmzmn5j87";
+  version = "2.4.0.0";
+  sha256 = "1zwkrr0pbgxi2y75n2sjr3xs8xa3pxbmnqg3phqkjqcz3j4gcq6y";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ convertible mtl text time utf8String ];
diff --git a/pkgs/development/libraries/haskell/HaXml/default.nix b/pkgs/development/libraries/haskell/HaXml/default.nix
index b490cf75d96c..996437cbeac2 100644
--- a/pkgs/development/libraries/haskell/HaXml/default.nix
+++ b/pkgs/development/libraries/haskell/HaXml/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "HaXml";
-  version = "1.24";
-  sha256 = "18kvavqa84k2121ppxngn39fjz4w63chngb3255w1fhdz13v3ydn";
+  version = "1.24.1";
+  sha256 = "1pvqgczksxasayvdb6d4g7ya7g7w1v9hsa35kaxm9bcic9y8q9az";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ filepath polyparse random ];
diff --git a/pkgs/development/libraries/haskell/QuickCheck/2.7.1.nix b/pkgs/development/libraries/haskell/QuickCheck/2.7.1.nix
new file mode 100644
index 000000000000..85829093c34f
--- /dev/null
+++ b/pkgs/development/libraries/haskell/QuickCheck/2.7.1.nix
@@ -0,0 +1,19 @@
+{ cabal, random, testFramework, tfRandom }:
+
+cabal.mkDerivation (self: {
+  pname = "QuickCheck";
+  version = "2.7.1";
+  sha256 = "1hk19q7lfvja7g626hbbq0xs30zsgjpqfalgmdr24fy8sgdchm21";
+  buildDepends = [ random tfRandom ];
+  testDepends = [ testFramework ];
+  patchPhase = ''
+    sed -i -e 's|QuickCheck == .*,|QuickCheck,|' QuickCheck.cabal
+  '';
+  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/aes/default.nix b/pkgs/development/libraries/haskell/aes/default.nix
new file mode 100644
index 000000000000..6b239bd4e776
--- /dev/null
+++ b/pkgs/development/libraries/haskell/aes/default.nix
@@ -0,0 +1,13 @@
+{ cabal, cereal, monadsTf, random, transformers }:
+
+cabal.mkDerivation (self: {
+  pname = "AES";
+  version = "0.2.8";
+  sha256 = "1yf0mhmj294gf1b1m11gixa1xxlbvv0yl60b59fnv5lf0s170jn3";
+  buildDepends = [ cereal monadsTf random transformers ];
+  meta = {
+    description = "Fast AES encryption/decryption for bytestrings";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/alsa-pcm/default.nix b/pkgs/development/libraries/haskell/alsa-pcm/default.nix
index 39123a176dc7..c4f39cdd7eeb 100644
--- a/pkgs/development/libraries/haskell/alsa-pcm/default.nix
+++ b/pkgs/development/libraries/haskell/alsa-pcm/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "alsa-pcm";
-  version = "0.6";
-  sha256 = "10cmlf1s9y65cs81wn7xwgcd4218n3h3p34avibv3fa7n3q9b4x1";
+  version = "0.6.0.1";
+  sha256 = "0gnq4p172sqmlks6aykzr5l2qx2shrs2fypcvs4g56c9zpk3c3ax";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/arithmoi/default.nix b/pkgs/development/libraries/haskell/arithmoi/default.nix
index 181937fdd807..082745fadf07 100644
--- a/pkgs/development/libraries/haskell/arithmoi/default.nix
+++ b/pkgs/development/libraries/haskell/arithmoi/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "arithmoi";
-  version = "0.4.0.3";
-  sha256 = "0idn312xzly636h13zmm7cw7ki64bpnniqc97nshqzgp8if5ycrc";
+  version = "0.4.0.4";
+  sha256 = "1v8qn0gjvlds6ljm9sfzzi5w3gsf7x63z0r7hcs1rvn0n3acwz6y";
   buildDepends = [ mtl random ];
   meta = {
     homepage = "https://bitbucket.org/dafis/arithmoi";
diff --git a/pkgs/development/libraries/haskell/base64-conduit/default.nix b/pkgs/development/libraries/haskell/base64-conduit/default.nix
index 3a2d044de64d..0fa5a02d5a5c 100644
--- a/pkgs/development/libraries/haskell/base64-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/base64-conduit/default.nix
@@ -3,15 +3,15 @@
 
 cabal.mkDerivation (self: {
   pname = "base64-conduit";
-  version = "1.0.0";
-  sha256 = "10wjgdixk5da48jpm2i91vy3ckdqpbpgba6hzn7ak6d3qac22m9q";
+  version = "1.0.0.1";
+  sha256 = "07zhvn3fy60q04a5g5mzhkl17rap9jlh00vb4f6565bjha2k16g9";
   buildDepends = [ base64Bytestring conduit ];
   testDepends = [
     base64Bytestring conduit hspec QuickCheck transformers
   ];
   meta = {
     homepage = "http://github.com/snoyberg/conduit";
-    description = "Base64-encode and decode streams of bytes";
+    description = "Base64-encode and decode streams of bytes. (deprecated)";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
   };
diff --git a/pkgs/development/libraries/haskell/chell-quickcheck/default.nix b/pkgs/development/libraries/haskell/chell-quickcheck/default.nix
new file mode 100644
index 000000000000..835747ee8813
--- /dev/null
+++ b/pkgs/development/libraries/haskell/chell-quickcheck/default.nix
@@ -0,0 +1,14 @@
+{ cabal, chell, QuickCheck, random }:
+
+cabal.mkDerivation (self: {
+  pname = "chell-quickcheck";
+  version = "0.2.2";
+  sha256 = "05qshv9vcl05khxsxyks2z7dqd8dqafjsg3awkkdhviviv5p2fp8";
+  buildDepends = [ chell QuickCheck random ];
+  meta = {
+    homepage = "https://john-millikin.com/software/chell/";
+    description = "QuickCheck support for the Chell testing library";
+    license = self.stdenv.lib.licenses.mit;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/chell/default.nix b/pkgs/development/libraries/haskell/chell/default.nix
new file mode 100644
index 000000000000..c69994e6868b
--- /dev/null
+++ b/pkgs/development/libraries/haskell/chell/default.nix
@@ -0,0 +1,18 @@
+{ cabal, ansiTerminal, options, patience, random, text
+, transformers
+}:
+
+cabal.mkDerivation (self: {
+  pname = "chell";
+  version = "0.3.3";
+  sha256 = "1k5vxipf47753d41dgr1gr4zy7y72gz2x8lcn0fgfmxi2v810nsm";
+  buildDepends = [
+    ansiTerminal options patience random text transformers
+  ];
+  meta = {
+    homepage = "https://john-millikin.com/software/chell/";
+    description = "A simple and intuitive library for automated testing";
+    license = self.stdenv.lib.licenses.mit;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/chunked-data/default.nix b/pkgs/development/libraries/haskell/chunked-data/default.nix
index 95b52d50b4d8..2705aee7aabd 100644
--- a/pkgs/development/libraries/haskell/chunked-data/default.nix
+++ b/pkgs/development/libraries/haskell/chunked-data/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "chunked-data";
-  version = "0.1.0.0";
-  sha256 = "1wdgvhf170rv557dwsiqy6nhys965xhs6w24ays273fv8hn3yk9l";
+  version = "0.1.0.1";
+  sha256 = "0kdq79mxi9nhy3dqw283f5ffx4rxwfrdq9cfw46ql5wmqrg2qw7r";
   buildDepends = [
     blazeBuilder monoTraversable semigroups systemFilepath text
     transformers vector
diff --git a/pkgs/development/libraries/haskell/cipher-aes/default.nix b/pkgs/development/libraries/haskell/cipher-aes/default.nix
index d68d2389e0e7..52ec2fab7114 100644
--- a/pkgs/development/libraries/haskell/cipher-aes/default.nix
+++ b/pkgs/development/libraries/haskell/cipher-aes/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "cipher-aes";
-  version = "0.2.6";
-  sha256 = "0ys5a1w5pwwr74k9wzcsh1flb2jdcvnp1zz7sjs14jpxclpd8x3i";
+  version = "0.2.7";
+  sha256 = "1a5viy2frkdqhzzlipd2ik89a04gv95v4b98lgpsas2958r9c9yp";
   buildDepends = [ byteable cryptoCipherTypes securemem ];
   testDepends = [
     byteable cryptoCipherTests cryptoCipherTypes QuickCheck
diff --git a/pkgs/development/libraries/haskell/classy-prelude/default.nix b/pkgs/development/libraries/haskell/classy-prelude/default.nix
index abc0841c58e2..99fa5a138b8a 100644
--- a/pkgs/development/libraries/haskell/classy-prelude/default.nix
+++ b/pkgs/development/libraries/haskell/classy-prelude/default.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self: {
   pname = "classy-prelude";
-  version = "0.8.0.1";
-  sha256 = "0mj6zz53w6irs16w1pk65imhvnhp1rq3vq8s1n1xkf9gr13v3y9r";
+  version = "0.8.1.1";
+  sha256 = "14iq0zdmw4f2i3c282hs89c4a763wcm7vn5n0f6kcvcpjgjyahgi";
   buildDepends = [
     basicPrelude chunkedData enclosedExceptions hashable liftedBase
     monoTraversable semigroups systemFilepath text time transformers
diff --git a/pkgs/development/libraries/haskell/conduit-combinators/default.nix b/pkgs/development/libraries/haskell/conduit-combinators/default.nix
index 5d1fa791c694..4799a0f63f5c 100644
--- a/pkgs/development/libraries/haskell/conduit-combinators/default.nix
+++ b/pkgs/development/libraries/haskell/conduit-combinators/default.nix
@@ -1,19 +1,21 @@
-{ cabal, basicPrelude, chunkedData, conduit, hspec, monoTraversable
+{ cabal, base16Bytestring, base64Bytestring, basicPrelude
+, chunkedData, conduit, hspec, monoTraversable, mwcRandom
 , primitive, silently, systemFileio, systemFilepath, text
-, transformers, transformersBase, vector
+, transformers, transformersBase, unixCompat, vector, void
 }:
 
 cabal.mkDerivation (self: {
   pname = "conduit-combinators";
-  version = "0.2.0.1";
-  sha256 = "0hmy398kk37n5l4pacb2a0z9h9f1kl6vva9gsph1kiqnnz7sbr4r";
+  version = "0.2.3";
+  sha256 = "05sb1v6rciaj7cj6lxv6pf9ai0k3q6cvvflcb4a7q6ql9xr3j7pr";
   buildDepends = [
-    chunkedData conduit monoTraversable primitive systemFileio
-    systemFilepath text transformers transformersBase vector
+    base16Bytestring base64Bytestring chunkedData conduit
+    monoTraversable mwcRandom primitive systemFileio systemFilepath
+    text transformers transformersBase unixCompat vector void
   ];
   testDepends = [
-    basicPrelude chunkedData hspec monoTraversable silently text
-    transformers vector
+    base16Bytestring base64Bytestring basicPrelude chunkedData hspec
+    monoTraversable mwcRandom silently text transformers vector
   ];
   meta = {
     homepage = "https://github.com/fpco/conduit-combinators";
diff --git a/pkgs/development/libraries/haskell/conduit/default.nix b/pkgs/development/libraries/haskell/conduit/default.nix
index c5fe6d9d379d..b2a3ec9804bf 100644
--- a/pkgs/development/libraries/haskell/conduit/default.nix
+++ b/pkgs/development/libraries/haskell/conduit/default.nix
@@ -5,8 +5,8 @@
 
 cabal.mkDerivation (self: {
   pname = "conduit";
-  version = "1.0.15.1";
-  sha256 = "0pbrsa00x8qr856532iinw9lyliwh7gwzyd1pshdmj3gkbqpf2bv";
+  version = "1.0.17";
+  sha256 = "0skshic2glx0sfy75skj8b4iip62zha51pgnnx5hsswhx8j2whcw";
   buildDepends = [
     liftedBase mmorph monadControl mtl resourcet text textStreamDecode
     transformers transformersBase void
@@ -14,6 +14,7 @@ cabal.mkDerivation (self: {
   testDepends = [
     hspec mtl QuickCheck resourcet text transformers void
   ];
+  doCheck = false;
   meta = {
     homepage = "http://github.com/snoyberg/conduit";
     description = "Streaming data processing library";
diff --git a/pkgs/development/libraries/haskell/constraints/default.nix b/pkgs/development/libraries/haskell/constraints/default.nix
index 1e0dc901aaf5..333d8e6601d2 100644
--- a/pkgs/development/libraries/haskell/constraints/default.nix
+++ b/pkgs/development/libraries/haskell/constraints/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "constraints";
-  version = "0.3.4.2";
-  sha256 = "14bfar4d44yl9zxgqxj4p67ag2ndprm602l4pinfjk0ywbh63fwq";
+  version = "0.3.5";
+  sha256 = "01xrk0xqkfwzzr5jwkadkyjgrdcpslwiqfqdb7mci688xp2isi3i";
   buildDepends = [ newtype ];
   meta = {
     homepage = "http://github.com/ekmett/constraints/";
diff --git a/pkgs/development/libraries/haskell/convertible/default.nix b/pkgs/development/libraries/haskell/convertible/default.nix
index 8a79e50527d8..78be057c2011 100644
--- a/pkgs/development/libraries/haskell/convertible/default.nix
+++ b/pkgs/development/libraries/haskell/convertible/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "convertible";
-  version = "1.0.11.1";
-  sha256 = "1r50a2rpfsx0s7dv8ww5xck33b1mhy73gfilffrbqd4hxjgnxlj6";
+  version = "1.1.0.0";
+  sha256 = "0pc3z4jfjna1rz5wlfimw9fyhpasmdnwvava883s401760y99i0k";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ mtl text time ];
diff --git a/pkgs/development/libraries/haskell/cryptohash-conduit/default.nix b/pkgs/development/libraries/haskell/cryptohash-conduit/default.nix
new file mode 100644
index 000000000000..501edf03ae09
--- /dev/null
+++ b/pkgs/development/libraries/haskell/cryptohash-conduit/default.nix
@@ -0,0 +1,14 @@
+{ cabal, conduit, cryptohash, transformers }:
+
+cabal.mkDerivation (self: {
+  pname = "cryptohash-conduit";
+  version = "0.1.0";
+  sha256 = "08x45dy5crxc63gd4psryrzprz7lc5hbzjl23q56c3iqbvrx2r7w";
+  buildDepends = [ conduit cryptohash transformers ];
+  meta = {
+    homepage = "http://github.com/vincenthz/hs-cryptohash-conduit";
+    description = "cryptohash conduit";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/css-text/default.nix b/pkgs/development/libraries/haskell/css-text/default.nix
index 2cb78af7ba9c..9ab9b9f5d2da 100644
--- a/pkgs/development/libraries/haskell/css-text/default.nix
+++ b/pkgs/development/libraries/haskell/css-text/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "css-text";
-  version = "0.1.2.0.1";
-  sha256 = "0j8d9kfs9j01gqlapaahyziphkx0f55g9bbz2wwix1si7954xxhp";
+  version = "0.1.2.1";
+  sha256 = "1xi1n2f0g8y43p95lynhcg50wxbq7hqfzbfzm7fy8mn7gvd920nw";
   buildDepends = [ attoparsec text ];
   testDepends = [ attoparsec hspec QuickCheck text ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/data-accessor/data-accessor-template.nix b/pkgs/development/libraries/haskell/data-accessor/data-accessor-template.nix
index 41bd23470124..89658ead4d58 100644
--- a/pkgs/development/libraries/haskell/data-accessor/data-accessor-template.nix
+++ b/pkgs/development/libraries/haskell/data-accessor/data-accessor-template.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "data-accessor-template";
-  version = "0.2.1.10";
-  sha256 = "11a4c0g74ppl7nls0dhx6xs47dfcq1wp7bd8qgdba6hhn645afzy";
+  version = "0.2.1.11";
+  sha256 = "1n2slv287zp6pabqb7xbfi296dbikw5a4ivqmnas0c4nxikqkayx";
   buildDepends = [ dataAccessor utilityHt ];
   meta = {
     homepage = "http://www.haskell.org/haskellwiki/Record_access";
diff --git a/pkgs/development/libraries/haskell/data-accessor/data-accessor.nix b/pkgs/development/libraries/haskell/data-accessor/data-accessor.nix
index 7c1de10b20b0..8fdde66f5fd6 100644
--- a/pkgs/development/libraries/haskell/data-accessor/data-accessor.nix
+++ b/pkgs/development/libraries/haskell/data-accessor/data-accessor.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "data-accessor";
-  version = "0.2.2.3";
-  sha256 = "1fa1rbbs3m05y61w42vj4vqlcpqmz60v8mv3r0h6lx669k6ka5gj";
+  version = "0.2.2.5";
+  sha256 = "0z63fv41cnpk3h404gprk2f5jl7rrpyv97xmsgac9zgdm5zkkhm6";
   buildDepends = [ transformers ];
   meta = {
     homepage = "http://www.haskell.org/haskellwiki/Record_access";
diff --git a/pkgs/development/libraries/haskell/dbmigrations/default.nix b/pkgs/development/libraries/haskell/dbmigrations/default.nix
index 10b3737d88a2..008cb04f2fa3 100644
--- a/pkgs/development/libraries/haskell/dbmigrations/default.nix
+++ b/pkgs/development/libraries/haskell/dbmigrations/default.nix
@@ -12,6 +12,7 @@ cabal.mkDerivation (self: {
     configurator fgl filepath HDBC HDBCPostgresql HDBCSqlite3 HUnit mtl
     random text time yamlLight
   ];
+  jailbreak = true;
   meta = {
     description = "An implementation of relational database \"migrations\"";
     license = self.stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/haskell/dbus/default.nix b/pkgs/development/libraries/haskell/dbus/default.nix
index 304b9e84942e..7f0285dfc7aa 100644
--- a/pkgs/development/libraries/haskell/dbus/default.nix
+++ b/pkgs/development/libraries/haskell/dbus/default.nix
@@ -1,16 +1,22 @@
-{ cabal, cereal, libxmlSax, network, parsec, random, text
-, transformers, vector, xmlTypes
+{ cabal, cereal, chell, chellQuickcheck, filepath, libxmlSax
+, network, parsec, QuickCheck, random, text, transformers, vector
+, xmlTypes
 }:
 
 cabal.mkDerivation (self: {
   pname = "dbus";
-  version = "0.10.6";
-  sha256 = "0jbysa7czhp7yl3fb6sxiqppg8yb3cdk4v8hcs4y8yzwjj0lm7mf";
+  version = "0.10.7";
+  sha256 = "0xszynw6p07r7z9nlq8alx5lxfjm57gljya835ccj63hqhkr5yxh";
   buildDepends = [
     cereal libxmlSax network parsec random text transformers vector
     xmlTypes
   ];
+  testDepends = [
+    cereal chell chellQuickcheck filepath libxmlSax network parsec
+    QuickCheck random text transformers vector xmlTypes
+  ];
   jailbreak = true;
+  doCheck = false;
   meta = {
     homepage = "https://john-millikin.com/software/haskell-dbus/";
     description = "A client library for the D-Bus IPC system";
diff --git a/pkgs/development/libraries/haskell/derive/default.nix b/pkgs/development/libraries/haskell/derive/default.nix
index 0873e65d9daa..42ca82f4ac19 100644
--- a/pkgs/development/libraries/haskell/derive/default.nix
+++ b/pkgs/development/libraries/haskell/derive/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "derive";
-  version = "2.5.13";
-  sha256 = "0lmwj66s4krh29qqmkyc3cn3j4b4mhyqvlngvmy1xaigmgib5aci";
+  version = "2.5.14";
+  sha256 = "1fihcd8l4z8d6rad8h39pg5gdb75h895c2xld9574fwp3bm0zl0c";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/diagrams/cairo.nix b/pkgs/development/libraries/haskell/diagrams/cairo.nix
index c38346d189bc..bd09b67196b6 100644
--- a/pkgs/development/libraries/haskell/diagrams/cairo.nix
+++ b/pkgs/development/libraries/haskell/diagrams/cairo.nix
@@ -5,8 +5,8 @@
 
 cabal.mkDerivation (self: {
   pname = "diagrams-cairo";
-  version = "1.1";
-  sha256 = "0x66qdwni3pwc2lrqy5jnyz7nqbfpr1086g1ndy6cxx8hp632zaf";
+  version = "1.1.0.2";
+  sha256 = "0y36cx89rlbmj470a6g11wlzkwzznjkjmkcpm7dzbxvfxw4pp70z";
   buildDepends = [
     cairo colour dataDefaultClass diagramsCore diagramsLib filepath
     hashable JuicyPixels lens mtl optparseApplicative split statestack
diff --git a/pkgs/development/libraries/haskell/diagrams/contrib.nix b/pkgs/development/libraries/haskell/diagrams/contrib.nix
index 34dcb3745e35..f2a654302b62 100644
--- a/pkgs/development/libraries/haskell/diagrams/contrib.nix
+++ b/pkgs/development/libraries/haskell/diagrams/contrib.nix
@@ -7,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "diagrams-contrib";
-  version = "1.1.1.1";
-  sha256 = "1b91scy96zf2njikfyr2ir2ckiib4dlvjazrlbri6f5ds40gnhna";
+  version = "1.1.1.2";
+  sha256 = "09dfnvriih4lkici34bj9nvww245hzl95crldblwyjwi2c8qcy69";
   buildDepends = [
     arithmoi circlePacking colour dataDefault dataDefaultClass
     diagramsCore diagramsLib forceLayout lens MonadRandom mtl parsec
diff --git a/pkgs/development/libraries/haskell/diagrams/core.nix b/pkgs/development/libraries/haskell/diagrams/core.nix
index 3a3f74d4c272..3529faaf6afe 100644
--- a/pkgs/development/libraries/haskell/diagrams/core.nix
+++ b/pkgs/development/libraries/haskell/diagrams/core.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "diagrams-core";
-  version = "1.1";
-  sha256 = "0prklz6s5zcainpkawibdg3bidmvsd2xsc1xxrmfp7lscmim736v";
+  version = "1.1.0.1";
+  sha256 = "1jr827cd3qa631glwc9h247w0wnrx84gj2iwxj18b4y78d0ajz69";
   buildDepends = [
     dualTree lens MemoTrie monoidExtras newtype semigroups vectorSpace
     vectorSpacePoints
diff --git a/pkgs/development/libraries/haskell/diagrams/diagrams.nix b/pkgs/development/libraries/haskell/diagrams/diagrams.nix
index cddc5dbadcf9..6159270379e2 100644
--- a/pkgs/development/libraries/haskell/diagrams/diagrams.nix
+++ b/pkgs/development/libraries/haskell/diagrams/diagrams.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "diagrams";
-  version = "1.1";
-  sha256 = "1fdacsa57w64hkcsrriwdgdxddd7gps97fyaz2rl8wfxcl96vclr";
+  version = "1.1.0.1";
+  sha256 = "0cxmrikcxgnrki9z8i33z7fbjpkx0vw849zj1cbq1zh8ry8xhhvg";
   buildDepends = [
     diagramsContrib diagramsCore diagramsLib diagramsSvg
   ];
diff --git a/pkgs/development/libraries/haskell/diagrams/lib.nix b/pkgs/development/libraries/haskell/diagrams/lib.nix
index 323856554268..c8c8bf5434da 100644
--- a/pkgs/development/libraries/haskell/diagrams/lib.nix
+++ b/pkgs/development/libraries/haskell/diagrams/lib.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self: {
   pname = "diagrams-lib";
-  version = "1.1.0.1";
-  sha256 = "0zkxkncz8ayvahr57fgq44vgir3yghxs2y1rrp138951fcy2g3a7";
+  version = "1.1.0.3";
+  sha256 = "1g4kcmpqsnb25yqvd6yv026znp7s5jhnqg1nvfxcaq0zz84w9ckh";
   buildDepends = [
     active colour dataDefaultClass diagramsCore filepath fingertree
     hashable intervals lens MemoTrie monoidExtras optparseApplicative
diff --git a/pkgs/development/libraries/haskell/diagrams/postscript.nix b/pkgs/development/libraries/haskell/diagrams/postscript.nix
index a7f85f98b093..9716177ede5c 100644
--- a/pkgs/development/libraries/haskell/diagrams/postscript.nix
+++ b/pkgs/development/libraries/haskell/diagrams/postscript.nix
@@ -5,8 +5,8 @@
 
 cabal.mkDerivation (self: {
   pname = "diagrams-postscript";
-  version = "1.0.2";
-  sha256 = "14y8wivgxs3qvybzqk1bfqsrs5457qd5br7nk1924si5gpsgp1xx";
+  version = "1.0.2.2";
+  sha256 = "00xzzx6dvraa8gbk3agqvrmxjnpvq4hik7kahidw4k37hxyyvwm3";
   buildDepends = [
     dataDefaultClass diagramsCore diagramsLib dlist filepath hashable
     lens monoidExtras mtl semigroups split vectorSpace
diff --git a/pkgs/development/libraries/haskell/diagrams/svg.nix b/pkgs/development/libraries/haskell/diagrams/svg.nix
index cc5795c80a18..663a6287c623 100644
--- a/pkgs/development/libraries/haskell/diagrams/svg.nix
+++ b/pkgs/development/libraries/haskell/diagrams/svg.nix
@@ -5,8 +5,8 @@
 
 cabal.mkDerivation (self: {
   pname = "diagrams-svg";
-  version = "1.0.2";
-  sha256 = "1pbkr5qg3cjk2c23aas5y9f0bk5nsding4r4c4fdkxj49ipi4ys1";
+  version = "1.0.2.1";
+  sha256 = "1qm4vk67knl4bpp84kwm95blshf7slarpl620m8irslsq3yag507";
   buildDepends = [
     blazeMarkup blazeSvg colour diagramsCore diagramsLib filepath
     hashable lens monoidExtras mtl split time vectorSpace
diff --git a/pkgs/development/libraries/haskell/dlist-instances/default.nix b/pkgs/development/libraries/haskell/dlist-instances/default.nix
new file mode 100644
index 000000000000..d168c4b35831
--- /dev/null
+++ b/pkgs/development/libraries/haskell/dlist-instances/default.nix
@@ -0,0 +1,14 @@
+{ cabal, dlist, semigroups }:
+
+cabal.mkDerivation (self: {
+  pname = "dlist-instances";
+  version = "0.1";
+  sha256 = "0r1j7djywqd7c224wc9ixkplj3m2mbf9k3ra7n92ja2kfpksm615";
+  buildDepends = [ dlist semigroups ];
+  meta = {
+    homepage = "https://github.com/gregwebs/dlist-instances";
+    description = "Difference lists instances";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/dlist/default.nix b/pkgs/development/libraries/haskell/dlist/default.nix
index 547ea9f8a478..f87e7e2d7589 100644
--- a/pkgs/development/libraries/haskell/dlist/default.nix
+++ b/pkgs/development/libraries/haskell/dlist/default.nix
@@ -1,9 +1,10 @@
-{ cabal, Cabal, QuickCheck }:
+{ cabal, Cabal, deepseq, QuickCheck }:
 
 cabal.mkDerivation (self: {
   pname = "dlist";
-  version = "0.6.0.1";
-  sha256 = "08q8dsczh59a0ii3nqk6yqz70msd0pndjjcg9dzq8iyknbbqbi45";
+  version = "0.7";
+  sha256 = "1abbym3afm77xkgcrv3d9nl4wn69m7m3gxahdcvkg1ir1sm2pkyi";
+  buildDepends = [ deepseq ];
   testDepends = [ Cabal QuickCheck ];
   meta = {
     homepage = "https://github.com/spl/dlist";
diff --git a/pkgs/development/libraries/haskell/doctest/default.nix b/pkgs/development/libraries/haskell/doctest/default.nix
index 843fd6239dcf..8ed11decf059 100644
--- a/pkgs/development/libraries/haskell/doctest/default.nix
+++ b/pkgs/development/libraries/haskell/doctest/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "doctest";
-  version = "0.9.10.1";
-  sha256 = "1kl6bihhyj08ifij7ddpy6067s1lv2lnnp4an9wany3fzwlifbyi";
+  version = "0.9.10.2";
+  sha256 = "1vrhfbw59vfypylkr2ica2wx1vm62r40s4165syy76r8cyy0i554";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ deepseq filepath ghcPaths syb transformers ];
diff --git a/pkgs/development/libraries/haskell/dsp/default.nix b/pkgs/development/libraries/haskell/dsp/default.nix
new file mode 100644
index 000000000000..c16a6888b6b7
--- /dev/null
+++ b/pkgs/development/libraries/haskell/dsp/default.nix
@@ -0,0 +1,16 @@
+{ cabal, random }:
+
+cabal.mkDerivation (self: {
+  pname = "dsp";
+  version = "0.2.3";
+  sha256 = "1h7y3b2gwbkq97lv6f9a4zssyqs422g5zj2bi9mq1a5fzy5i4v4v";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [ random ];
+  meta = {
+    homepage = "http://www.haskell.org/haskellwiki/DSP";
+    description = "Haskell Digital Signal Processing";
+    license = "GPL";
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/errors/default.nix b/pkgs/development/libraries/haskell/errors/default.nix
index 5e55f3a6d59c..7207bfbb1858 100644
--- a/pkgs/development/libraries/haskell/errors/default.nix
+++ b/pkgs/development/libraries/haskell/errors/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "errors";
-  version = "1.4.5";
-  sha256 = "16m4psk1150319bd2hrswpp2h90l1hhh7w13arfhy4ylh8vscm4q";
+  version = "1.4.6";
+  sha256 = "1h8va76rhvs76ljdccxbmb659qk1slzkal118m85bw6lpy5wv6fi";
   buildDepends = [ either safe transformers ];
   jailbreak = true;
   meta = {
diff --git a/pkgs/development/libraries/haskell/exceptions/default.nix b/pkgs/development/libraries/haskell/exceptions/default.nix
index 0665694212b6..a206b7c186ec 100644
--- a/pkgs/development/libraries/haskell/exceptions/default.nix
+++ b/pkgs/development/libraries/haskell/exceptions/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "exceptions";
-  version = "0.3.3";
-  sha256 = "1gng8zvsljm6xrb5gy501f1dl47z171wkic8bsivhn4rgp9lby9l";
+  version = "0.3.3.1";
+  sha256 = "091frx3hmx7lq10z7f8q98pz0sa1lj23i7z4z98gh1980r525fah";
   buildDepends = [ mtl transformers ];
   testDepends = [
     mtl QuickCheck testFramework testFrameworkQuickcheck2 transformers
@@ -13,7 +13,7 @@ cabal.mkDerivation (self: {
   meta = {
     homepage = "http://github.com/ekmett/exceptions/";
     description = "Extensible optionally-pure exceptions";
-    license = "unknown";
+    license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
     maintainers = [ self.stdenv.lib.maintainers.ocharles ];
   };
diff --git a/pkgs/development/libraries/haskell/fay-base/default.nix b/pkgs/development/libraries/haskell/fay-base/default.nix
index 53f6fdce41cb..6e9ed4868847 100644
--- a/pkgs/development/libraries/haskell/fay-base/default.nix
+++ b/pkgs/development/libraries/haskell/fay-base/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "fay-base";
-  version = "0.19";
-  sha256 = "03jf1ig3s2dcdd26j3d3iwm9hbiq5f5q5hyg22jdvl7lmvigw36j";
+  version = "0.19.1";
+  sha256 = "1b4v8l3adhcpply9yqk1pc1cgsvqlamvk60rvcb89kw5clrbvr4r";
   buildDepends = [ fay ];
   meta = {
     homepage = "https://github.com/faylang/fay-base";
diff --git a/pkgs/development/libraries/haskell/fay/default.nix b/pkgs/development/libraries/haskell/fay/default.nix
index fdce9907056c..ec5f0a48b871 100644
--- a/pkgs/development/libraries/haskell/fay/default.nix
+++ b/pkgs/development/libraries/haskell/fay/default.nix
@@ -8,8 +8,8 @@
 
 cabal.mkDerivation (self: {
   pname = "fay";
-  version = "0.19.0.2";
-  sha256 = "025yhl32xr5fcsxval5rcj8jrgd6qnjq9bqbhbsr5ni8dz3ks5r3";
+  version = "0.19.1.1";
+  sha256 = "1jjv7l4x1bxr4whhcn4vh4b3ac4wfnb6l322jmdj60nh9sj8dzpf";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/filepath/default.nix b/pkgs/development/libraries/haskell/filepath/default.nix
index 0cd65bb1905e..7a2b9e75e7f9 100644
--- a/pkgs/development/libraries/haskell/filepath/default.nix
+++ b/pkgs/development/libraries/haskell/filepath/default.nix
@@ -1,9 +1,10 @@
-{ cabal }:
+{ cabal, QuickCheck, random }:
 
 cabal.mkDerivation (self: {
   pname = "filepath";
-  version = "1.3.0.1";
-  sha256 = "1ny8dz8rv883vg6hkzg3zank771cr2z9sfhii7aw4rfb71k29g5p";
+  version = "1.3.0.2";
+  sha256 = "0wvvz6cs5fh4f04a87b9s7xrnzypmnzzkn149p6xk8xi7gcvcpy2";
+  testDepends = [ QuickCheck random ];
   meta = {
     homepage = "http://www-users.cs.york.ac.uk/~ndm/filepath/";
     description = "Library for manipulating FilePaths in a cross platform way";
diff --git a/pkgs/development/libraries/haskell/filesystem-conduit/default.nix b/pkgs/development/libraries/haskell/filesystem-conduit/default.nix
index f1a0554e380c..3d7a1300b58a 100644
--- a/pkgs/development/libraries/haskell/filesystem-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/filesystem-conduit/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "filesystem-conduit";
-  version = "1.0.0.1";
-  sha256 = "04l8i97mr0jzkc7vc77j885n45qd2qyn5kmzxyckp3za96sjsqqw";
+  version = "1.0.0.2";
+  sha256 = "05dsl3bgyjciq6sgmba0hki7imilrjq3ddp9ip5gxl9884j1f4a1";
   buildDepends = [
     conduit systemFileio systemFilepath text transformers
   ];
@@ -14,7 +14,7 @@ cabal.mkDerivation (self: {
   ];
   meta = {
     homepage = "http://github.com/snoyberg/conduit";
-    description = "Use system-filepath data types with conduits";
+    description = "Use system-filepath data types with conduits. (deprecated)";
     license = self.stdenv.lib.licenses.mit;
     platforms = self.ghc.meta.platforms;
   };
diff --git a/pkgs/development/libraries/haskell/foldl/default.nix b/pkgs/development/libraries/haskell/foldl/default.nix
index 3b1c61574f0e..926c2a812a0b 100644
--- a/pkgs/development/libraries/haskell/foldl/default.nix
+++ b/pkgs/development/libraries/haskell/foldl/default.nix
@@ -1,10 +1,10 @@
-{ cabal, primitive, text, vector }:
+{ cabal, primitive, text, transformers, vector }:
 
 cabal.mkDerivation (self: {
   pname = "foldl";
-  version = "1.0.2";
-  sha256 = "11cqmw102m2bskaknl8qr7hwyn94hfv2ind5fgvjw4hwgllr8v84";
-  buildDepends = [ primitive text vector ];
+  version = "1.0.3";
+  sha256 = "0jl50bh7k8wp0nz0s0sb2zwh92yrgsm2l6szib41g7zq34mwamn9";
+  buildDepends = [ primitive text transformers vector ];
   meta = {
     description = "Composable, streaming, and efficient left folds";
     license = self.stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/haskell/force-layout/default.nix b/pkgs/development/libraries/haskell/force-layout/default.nix
index b57abc40e200..a336c2a7e2bb 100644
--- a/pkgs/development/libraries/haskell/force-layout/default.nix
+++ b/pkgs/development/libraries/haskell/force-layout/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "force-layout";
-  version = "0.3.0.2";
-  sha256 = "0zrvsrqwl0wjv38l6zl1pa09572njdbcfbvimhpp930629zk4yb7";
+  version = "0.3.0.3";
+  sha256 = "0xix9syfiya5wx0iwzs7sp3ksqyp15vjlpir71x8md8v0hkrnh5a";
   buildDepends = [
     dataDefaultClass lens vectorSpace vectorSpacePoints
   ];
diff --git a/pkgs/development/libraries/haskell/ghc-mod/default.nix b/pkgs/development/libraries/haskell/ghc-mod/default.nix
index 02c459c8e5c5..260fff8ae827 100644
--- a/pkgs/development/libraries/haskell/ghc-mod/default.nix
+++ b/pkgs/development/libraries/haskell/ghc-mod/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "ghc-mod";
-  version = "3.1.6";
-  sha256 = "1z8fzh08f38cxplf14sflpgrazlwzz6q73lvxm37xyp7gww2prhi";
+  version = "3.1.7";
+  sha256 = "1mv6m1fcqkm4i27jw1aniwfq2dhpn4m7kicyq4l70zmkfr7y7c5s";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/ghcjs-dom/default.nix b/pkgs/development/libraries/haskell/ghcjs-dom/default.nix
index 58ad2765f6b0..d42c4c84bf1d 100644
--- a/pkgs/development/libraries/haskell/ghcjs-dom/default.nix
+++ b/pkgs/development/libraries/haskell/ghcjs-dom/default.nix
@@ -1,10 +1,10 @@
-{ cabal, glib, gtk3, mtl, transformers, webkitgtk3 }:
+{ cabal, ghcjsBase, mtl }:
 
 cabal.mkDerivation (self: {
   pname = "ghcjs-dom";
-  version = "0.0.4";
-  sha256 = "1a3dv2l3s3aifcpivmnv308k2a1kb7r4x0z9gi83wc4xr9a8f08w";
-  buildDepends = [ glib gtk3 mtl transformers webkitgtk3 ];
+  version = "0.0.6";
+  sha256 = "0c27mf5cjvw5q4lwbmi245q4y09b61y5s6hxsfzgdn4lhfbvdma6";
+  buildDepends = [ ghcjsBase mtl ];
   meta = {
     description = "DOM library that supports both GHCJS and WebKitGTK";
     license = self.stdenv.lib.licenses.mit;
diff --git a/pkgs/development/libraries/haskell/gnuplot/default.nix b/pkgs/development/libraries/haskell/gnuplot/default.nix
index 8390ef2520aa..f835410dbbd9 100644
--- a/pkgs/development/libraries/haskell/gnuplot/default.nix
+++ b/pkgs/development/libraries/haskell/gnuplot/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "gnuplot";
-  version = "0.5.2";
-  sha256 = "11gma33bikx97jra04vgnhikylw9wm1l37hdrsknl7mgk2qbrs74";
+  version = "0.5.2.2";
+  sha256 = "0l5hi346bhs9w11i3z6yy4mcr3k50xcp3j31g6wza9grxlfqc5av";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/happstack/happstack-fastcgi.nix b/pkgs/development/libraries/haskell/happstack/happstack-fastcgi.nix
new file mode 100644
index 000000000000..858512e9add1
--- /dev/null
+++ b/pkgs/development/libraries/haskell/happstack/happstack-fastcgi.nix
@@ -0,0 +1,14 @@
+{ cabal, cgi, fastcgi, happstackServer, mtl, utf8String }:
+
+cabal.mkDerivation (self: {
+  pname = "happstack-fastcgi";
+  version = "0.1.5";
+  sha256 = "0rvb041nx2f8azvfy1yysisjqrmsfbxnccn992v5q7zhlglcvj8h";
+  buildDepends = [ cgi fastcgi happstackServer mtl utf8String ];
+  meta = {
+    description = "Happstack extension for use with FastCGI";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+    maintainers = [ self.stdenv.lib.maintainers.tomberek ];
+  };
+})
diff --git a/pkgs/development/libraries/haskell/haskell-names/default.nix b/pkgs/development/libraries/haskell/haskell-names/default.nix
index 519b24668ae1..74cfc4530997 100644
--- a/pkgs/development/libraries/haskell/haskell-names/default.nix
+++ b/pkgs/development/libraries/haskell/haskell-names/default.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self: {
   pname = "haskell-names";
-  version = "0.3.2.8";
-  sha256 = "043anrsilhd6mgc7c5qb6b7rkdf60xfgzzjn38zk6v0f41lvff99";
+  version = "0.3.3";
+  sha256 = "1f40dyrdb9c5iysmclql75l86zg3iisnyyiq5fkgixdafzsq31ir";
   buildDepends = [
     aeson Cabal dataLens dataLensTemplate filepath haskellPackages
     haskellSrcExts hseCpp mtl tagged transformers traverseWithClass
diff --git a/pkgs/development/libraries/haskell/heist/default.nix b/pkgs/development/libraries/haskell/heist/default.nix
index 718f2088ff2c..77ebf3fd9af1 100644
--- a/pkgs/development/libraries/haskell/heist/default.nix
+++ b/pkgs/development/libraries/haskell/heist/default.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self: {
   pname = "heist";
-  version = "0.13.0.6";
-  sha256 = "1h34bmcb9bqkagcx3iqnp4l8z8qhngf00mki4hpk905znja6hib9";
+  version = "0.13.1";
+  sha256 = "0v9c5hhybn617nmjswqkjrf7bjb5073achfi05ivw1gblbvsj0ir";
   buildDepends = [
     aeson attoparsec blazeBuilder blazeHtml directoryTree dlist errors
     filepath hashable MonadCatchIOTransformers mtl random text time
diff --git a/pkgs/development/libraries/haskell/hjsmin/default.nix b/pkgs/development/libraries/haskell/hjsmin/default.nix
index b060d3c6efe4..563372fa451b 100644
--- a/pkgs/development/libraries/haskell/hjsmin/default.nix
+++ b/pkgs/development/libraries/haskell/hjsmin/default.nix
@@ -5,8 +5,8 @@
 
 cabal.mkDerivation (self: {
   pname = "hjsmin";
-  version = "0.1.4.5";
-  sha256 = "0lzqs20kyngbjc7wqq347b1caj0hbf29dvdpxghfpjbrgyvyqh74";
+  version = "0.1.4.6";
+  sha256 = "0z0wzgwm66ckq9h756s7srfyiv2jia9779yi86cn1zgzr8dwspvr";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
@@ -16,6 +16,7 @@ cabal.mkDerivation (self: {
     blazeBuilder Cabal HUnit languageJavascript QuickCheck
     testFramework testFrameworkHunit text
   ];
+  jailbreak = true;
   meta = {
     homepage = "http://github.com/alanz/hjsmin";
     description = "Haskell implementation of a javascript minifier";
diff --git a/pkgs/development/libraries/haskell/hspec-meta/default.nix b/pkgs/development/libraries/haskell/hspec-meta/default.nix
index 1b9cbd089781..28edba11cac2 100644
--- a/pkgs/development/libraries/haskell/hspec-meta/default.nix
+++ b/pkgs/development/libraries/haskell/hspec-meta/default.nix
@@ -1,16 +1,17 @@
 { cabal, ansiTerminal, deepseq, filepath, hspecExpectations, HUnit
-, QuickCheck, quickcheckIo, random, setenv, time, transformers
+, QuickCheck, quickcheckIo, random, setenv, tfRandom, time
+, transformers
 }:
 
 cabal.mkDerivation (self: {
   pname = "hspec-meta";
-  version = "1.8.3";
-  sha256 = "12d254snnv8i1qqybsp6yzbqdxjf1wx8d29ja3lazb3kx12qwawd";
+  version = "1.9.0";
+  sha256 = "1jvx748aay8ln23p382y03gk6hc19f3z62za4326i0d3cyapfqdv";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
     ansiTerminal deepseq filepath hspecExpectations HUnit QuickCheck
-    quickcheckIo random setenv time transformers
+    quickcheckIo random setenv tfRandom time transformers
   ];
   doCheck = false;
   meta = {
diff --git a/pkgs/development/libraries/haskell/hspec/default.nix b/pkgs/development/libraries/haskell/hspec/default.nix
index 984a046f5017..0c41ab471f8d 100644
--- a/pkgs/development/libraries/haskell/hspec/default.nix
+++ b/pkgs/development/libraries/haskell/hspec/default.nix
@@ -1,22 +1,22 @@
 { cabal, ansiTerminal, deepseq, doctest, filepath, ghcPaths
 , hspecExpectations, hspecMeta, HUnit, QuickCheck, quickcheckIo
-, random, setenv, silently, time, transformers
+, random, setenv, silently, tfRandom, time, transformers
 }:
 
 cabal.mkDerivation (self: {
   pname = "hspec";
-  version = "1.8.3";
-  sha256 = "0k5l8r54nc0q5x3czdfxkwa606qnli3a6qm2xd3r5yl5bnz6hzh8";
+  version = "1.9.0";
+  sha256 = "01nwxx63l9cl1smld7pwm59k6shs865iiy1jqwi97lkhzhy9cvhl";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
     ansiTerminal deepseq filepath hspecExpectations HUnit QuickCheck
-    quickcheckIo random setenv time transformers
+    quickcheckIo random setenv tfRandom time transformers
   ];
   testDepends = [
     ansiTerminal deepseq doctest filepath ghcPaths hspecExpectations
-    hspecMeta HUnit QuickCheck quickcheckIo random setenv silently time
-    transformers
+    hspecMeta HUnit QuickCheck quickcheckIo random setenv silently
+    tfRandom time transformers
   ];
   doCheck = false;
   meta = {
diff --git a/pkgs/development/libraries/haskell/html-conduit/default.nix b/pkgs/development/libraries/haskell/html-conduit/default.nix
index 3f7b2ad507ac..bff7c352175d 100644
--- a/pkgs/development/libraries/haskell/html-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/html-conduit/default.nix
@@ -1,15 +1,14 @@
-{ cabal, conduit, filesystemConduit, hspec, HUnit, resourcet
-, systemFilepath, tagstreamConduit, text, transformers, xmlConduit
-, xmlTypes
+{ cabal, conduit, hspec, HUnit, resourcet, systemFilepath
+, tagstreamConduit, text, transformers, xmlConduit, xmlTypes
 }:
 
 cabal.mkDerivation (self: {
   pname = "html-conduit";
-  version = "1.1.0.1";
-  sha256 = "0v3zlassakc34i7kzajx63s1rxn516xv7lrib0a4kn4cdlqn7kxs";
+  version = "1.1.0.2";
+  sha256 = "12a5hb9sf4sd11sjhwwp84k8whkxs7hqfyni2hi247fii2ldkfax";
   buildDepends = [
-    conduit filesystemConduit resourcet systemFilepath tagstreamConduit
-    text transformers xmlConduit xmlTypes
+    conduit resourcet systemFilepath tagstreamConduit text transformers
+    xmlConduit xmlTypes
   ];
   testDepends = [ hspec HUnit xmlConduit ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/http-client/default.nix b/pkgs/development/libraries/haskell/http-client/default.nix
index ff21e12bb432..87a48bbdd398 100644
--- a/pkgs/development/libraries/haskell/http-client/default.nix
+++ b/pkgs/development/libraries/haskell/http-client/default.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self: {
   pname = "http-client";
-  version = "0.2.2.2";
-  sha256 = "1pn38vqbb8ff3gmwkzb8a2fika2rdymnlglpi3q7yn0jsvxl5xli";
+  version = "0.2.2.3";
+  sha256 = "0li4mfw5lm0y0m3l3r7cbmhbch7ap9n2067jqw1l0qjm8s74nqkh";
   buildDepends = [
     base64Bytestring blazeBuilder caseInsensitive cookie
     dataDefaultClass deepseq failure httpTypes network publicsuffixlist
diff --git a/pkgs/development/libraries/haskell/http-reverse-proxy/default.nix b/pkgs/development/libraries/haskell/http-reverse-proxy/default.nix
index 3605425436e4..1e1b0117a2f9 100644
--- a/pkgs/development/libraries/haskell/http-reverse-proxy/default.nix
+++ b/pkgs/development/libraries/haskell/http-reverse-proxy/default.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self: {
   pname = "http-reverse-proxy";
-  version = "0.3.1";
-  sha256 = "1xayhjrs6nm7gm5xc6z6vhzi9iq5czdvpywamkncivjsxjlc50b8";
+  version = "0.3.1.1";
+  sha256 = "02aksdkwhdxzc4kk7j3npbiqpm9px3yva0375mk1b1f2g552g5jj";
   buildDepends = [
     async basicPrelude blazeBuilder caseInsensitive conduit
     dataDefaultClass httpClient httpTypes liftedBase monadControl
diff --git a/pkgs/development/libraries/haskell/language-ecmascript/default.nix b/pkgs/development/libraries/haskell/language-ecmascript/default.nix
index 77165ef104d1..79404ffbcf0a 100644
--- a/pkgs/development/libraries/haskell/language-ecmascript/default.nix
+++ b/pkgs/development/libraries/haskell/language-ecmascript/default.nix
@@ -1,14 +1,15 @@
 { cabal, dataDefaultClass, Diff, filepath, HUnit, mtl, parsec
 , QuickCheck, testFramework, testFrameworkHunit
-, testFrameworkQuickcheck2, uniplate, wlPprint
+, testFrameworkQuickcheck2, testingFeat, uniplate, wlPprint
 }:
 
 cabal.mkDerivation (self: {
   pname = "language-ecmascript";
-  version = "0.15.4";
-  sha256 = "1drivy75lvrwjx7irdbnnqp7y6mbzbm2pbxy7zzc1nfln6g3k9x7";
+  version = "0.16";
+  sha256 = "1gz0089llxfmq9v2j5hp85h7w2vw50sgbl6dcd7i0s8m5zd3dmqg";
   buildDepends = [
-    dataDefaultClass Diff mtl parsec QuickCheck uniplate wlPprint
+    dataDefaultClass Diff mtl parsec QuickCheck testingFeat uniplate
+    wlPprint
   ];
   testDepends = [
     dataDefaultClass Diff filepath HUnit mtl parsec QuickCheck
diff --git a/pkgs/development/libraries/haskell/lens/default.nix b/pkgs/development/libraries/haskell/lens/default.nix
index 7c347f69ce4c..427cf681d2e9 100644
--- a/pkgs/development/libraries/haskell/lens/default.nix
+++ b/pkgs/development/libraries/haskell/lens/default.nix
@@ -1,5 +1,5 @@
-{ cabal, aeson, bifunctors, comonad, constraints, contravariant
-, deepseq, distributive, doctest, exceptions, filepath
+{ cabal, aeson, bifunctors, comonad, contravariant, deepseq
+, distributive, doctest, exceptions, filepath, free
 , genericDeriving, hashable, hlint, HUnit, mtl, nats, parallel
 , primitive, profunctors, QuickCheck, reflection, scientific
 , semigroupoids, semigroups, simpleReflect, split, tagged
@@ -10,11 +10,11 @@
 
 cabal.mkDerivation (self: {
   pname = "lens";
-  version = "4.0.5";
-  sha256 = "1kjmi76zpkhkwn514inhpfhfh3pg5na1f2zw1faqnk3bylpp9h6g";
+  version = "4.1";
+  sha256 = "0fsl2cydmkj2k49z3cgv6hfgrlkmx7zsy0ikp4k5jn2kp3hs77dw";
   buildDepends = [
-    aeson bifunctors comonad constraints contravariant distributive
-    exceptions filepath hashable mtl parallel primitive profunctors
+    aeson bifunctors comonad contravariant distributive exceptions
+    filepath free hashable mtl parallel primitive profunctors
     reflection scientific semigroupoids semigroups split tagged text
     transformers transformersCompat unorderedContainers utf8String
     vector void zlib
diff --git a/pkgs/development/libraries/haskell/leveldb-haskell/default.nix b/pkgs/development/libraries/haskell/leveldb-haskell/default.nix
new file mode 100644
index 000000000000..becd68ba9157
--- /dev/null
+++ b/pkgs/development/libraries/haskell/leveldb-haskell/default.nix
@@ -0,0 +1,21 @@
+{ cabal, async, dataDefault, filepath, leveldb, resourcet
+, transformers
+}:
+
+cabal.mkDerivation (self: {
+  pname = "leveldb-haskell";
+  version = "0.3.0";
+  sha256 = "0hdxn6v7fzc0wlpkymlci60m2584h6fn78bxdnv2q18ra03r3ygs";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [
+    async dataDefault filepath resourcet transformers
+  ];
+  extraLibraries = [ leveldb ];
+  meta = {
+    homepage = "http://github.com/kim/leveldb-haskell";
+    description = "Haskell bindings to LevelDB";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/libsystemd-journal/default.nix b/pkgs/development/libraries/haskell/libsystemd-journal/default.nix
new file mode 100644
index 000000000000..b30b0714d1fd
--- /dev/null
+++ b/pkgs/development/libraries/haskell/libsystemd-journal/default.nix
@@ -0,0 +1,21 @@
+{ cabal, hashable, hsyslog, pipes, pipesSafe, systemd-journal, text
+, transformers, uniplate, unixBytestring, unorderedContainers, uuid
+, vector
+}:
+
+cabal.mkDerivation (self: {
+  pname = "libsystemd-journal";
+  version = "1.1.0";
+  sha256 = "0zdql5y40d0d044mwbsr3xxmfzgnnp02a36wbbslxmrm5c3w1qi2";
+  buildDepends = [
+    hashable hsyslog pipes pipesSafe text transformers uniplate
+    unixBytestring unorderedContainers uuid vector
+  ];
+  extraLibraries = [ systemd-journal ];
+  meta = {
+    homepage = "http://github.com/ocharles/libsystemd-journal";
+    description = "Haskell bindings to libsystemd-journal";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/linear/default.nix b/pkgs/development/libraries/haskell/linear/default.nix
index b57879085bfa..f0dac623a987 100644
--- a/pkgs/development/libraries/haskell/linear/default.nix
+++ b/pkgs/development/libraries/haskell/linear/default.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self: {
   pname = "linear";
-  version = "1.9.0.1";
-  sha256 = "1ibdv1915rqz6dp8qg1nipnwwk345n4c5n51i8nn1h7p7jp53hhs";
+  version = "1.9.1";
+  sha256 = "17jvqy2nbcra36fzkwbjkfwg6mjw804zd1i50mhbqwg9j7z4s5sb";
   buildDepends = [
     adjunctions binary distributive hashable lens reflection
     semigroupoids semigroups tagged transformers unorderedContainers
diff --git a/pkgs/development/libraries/haskell/list-tries/default.nix b/pkgs/development/libraries/haskell/list-tries/default.nix
index 4eb91c67a476..a7d2a963e0de 100644
--- a/pkgs/development/libraries/haskell/list-tries/default.nix
+++ b/pkgs/development/libraries/haskell/list-tries/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "list-tries";
-  version = "0.5.1";
-  sha256 = "15lbq41rikj5vm9gfgjxz98pamnib4dcs48fr2vm9r3s3fikd2kz";
+  version = "0.5.2";
+  sha256 = "0lfl35i1k3nnv8q6bhwq4sr197fylin2hmxa4b96kfcc22xfzwy6";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ binary dlist ];
diff --git a/pkgs/development/libraries/haskell/llvm-general-pure/3.4.1.0.nix b/pkgs/development/libraries/haskell/llvm-general-pure/3.4.2.2.nix
index 200d8d00b446..bfa0ed43d0e2 100644
--- a/pkgs/development/libraries/haskell/llvm-general-pure/3.4.1.0.nix
+++ b/pkgs/development/libraries/haskell/llvm-general-pure/3.4.2.2.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "llvm-general-pure";
-  version = "3.4.1.0";
-  sha256 = "0cjzqw9k6x8akbgx4rdigvhjhfv9zlq40p789invdc514qmxhr6q";
+  version = "3.4.2.2";
+  sha256 = "0grbw0lamp0w4jzxg97jccl3jqdgqfgldpb4llvhr1l70591b0s8";
   buildDepends = [ mtl parsec setenv transformers ];
   testDepends = [
     HUnit mtl QuickCheck testFramework testFrameworkHunit
diff --git a/pkgs/development/libraries/haskell/llvm-general/3.4.1.0.nix b/pkgs/development/libraries/haskell/llvm-general/3.4.2.2.nix
index b86a65618cd2..43a346ebf191 100644
--- a/pkgs/development/libraries/haskell/llvm-general/3.4.1.0.nix
+++ b/pkgs/development/libraries/haskell/llvm-general/3.4.2.2.nix
@@ -5,8 +5,8 @@
 
 cabal.mkDerivation (self: {
   pname = "llvm-general";
-  version = "3.4.1.0";
-  sha256 = "0vh0bqkkahafhiv1sqvrncxswvz4rvb2zfwf33936fnnh5vn8vyp";
+  version = "3.4.2.2";
+  sha256 = "1dqdvv8pslblavyi14xy0bgrr1ca8d1jqp60x16zgbzkk3f2jx6a";
   buildDepends = [
     llvmGeneralPure mtl parsec setenv transformers utf8String
   ];
diff --git a/pkgs/development/libraries/haskell/ltk/default.nix b/pkgs/development/libraries/haskell/ltk/default.nix
index 7960395eb098..df1e4be218f0 100644
--- a/pkgs/development/libraries/haskell/ltk/default.nix
+++ b/pkgs/development/libraries/haskell/ltk/default.nix
@@ -1,10 +1,12 @@
-{ cabal, Cabal, filepath, glib, gtk, mtl, parsec, transformers }:
+{ cabal, Cabal, filepath, glib, gtk3, mtl, parsec, transformers }:
 
 cabal.mkDerivation (self: {
   pname = "ltk";
-  version = "0.12.1.0";
-  sha256 = "12x6nba5bll8fgzpxii1cf87j27jk4mn5gf1bx4ahd9v30h1a0h6";
-  buildDepends = [ Cabal filepath glib gtk mtl parsec transformers ];
+  version = "0.13.1.0";
+  sha256 = "09ryyzjd3iazwiw714hsny2b9f4b1cfhyzc11k5xzin5kh5d804a";
+  buildDepends = [
+    Cabal filepath glib gtk3 mtl parsec transformers
+  ];
   meta = {
     homepage = "http://www.leksah.org";
     description = "Leksah tool kit";
diff --git a/pkgs/development/libraries/haskell/lzma-enumerator/default.nix b/pkgs/development/libraries/haskell/lzma-enumerator/default.nix
new file mode 100644
index 000000000000..f931262a91e3
--- /dev/null
+++ b/pkgs/development/libraries/haskell/lzma-enumerator/default.nix
@@ -0,0 +1,22 @@
+{ cabal, bindingsDSL, enumerator, HUnit, lzma, mtl, QuickCheck
+, testFramework, testFrameworkHunit, testFrameworkQuickcheck2
+}:
+
+cabal.mkDerivation (self: {
+  pname = "lzma-enumerator";
+  version = "0.1.3";
+  sha256 = "0pzz8bf6310p23pmsa013i8vib0xsfvlkj7zp0w9xs2xsi4j7jk1";
+  buildDepends = [ bindingsDSL enumerator mtl ];
+  testDepends = [
+    enumerator HUnit QuickCheck testFramework testFrameworkHunit
+    testFrameworkQuickcheck2
+  ];
+  extraLibraries = [ lzma ];
+  jailbreak = true;
+  meta = {
+    homepage = "http://github.com/alphaHeavy/lzma-enumerator";
+    description = "Enumerator interface for lzma/xz compression";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/midi/default.nix b/pkgs/development/libraries/haskell/midi/default.nix
index e50843c6ff23..9467b567f829 100644
--- a/pkgs/development/libraries/haskell/midi/default.nix
+++ b/pkgs/development/libraries/haskell/midi/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "midi";
-  version = "0.2.1";
-  sha256 = "0i767y0835979s9i3wm8qwzh2awhhmfvhc5zvq2lkn8xlsp3wa6y";
+  version = "0.2.1.1";
+  sha256 = "11h4kr9a1jia1ghcyzgavcznw4771l00z736iibjpagw0b8fpip5";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/mono-traversable/default.nix b/pkgs/development/libraries/haskell/mono-traversable/default.nix
index 5119863500dd..a1de3e9ad16b 100644
--- a/pkgs/development/libraries/haskell/mono-traversable/default.nix
+++ b/pkgs/development/libraries/haskell/mono-traversable/default.nix
@@ -1,15 +1,16 @@
-{ cabal, comonad, foldl, hashable, hspec, QuickCheck, semigroupoids
-, semigroups, text, transformers, unorderedContainers, vector
-, vectorAlgorithms, vectorInstances
+{ cabal, comonad, dlist, dlistInstances, foldl, hashable, hspec
+, QuickCheck, semigroupoids, semigroups, text, transformers
+, unorderedContainers, vector, vectorAlgorithms, vectorInstances
 }:
 
 cabal.mkDerivation (self: {
   pname = "mono-traversable";
-  version = "0.4.0.1";
-  sha256 = "049skbjwz49c9qz2nys2hn6pc4gqn1a91b5kl9z6hjs9fnaic6ng";
+  version = "0.4.0.3";
+  sha256 = "04g2ihk4n71zrz09si2k8j46y53i5vllps9xizgs0bmikmrgh29f";
   buildDepends = [
-    comonad hashable semigroupoids semigroups text transformers
-    unorderedContainers vector vectorAlgorithms vectorInstances
+    comonad dlist dlistInstances hashable semigroupoids semigroups text
+    transformers unorderedContainers vector vectorAlgorithms
+    vectorInstances
   ];
   testDepends = [
     foldl hspec QuickCheck semigroups text transformers
diff --git a/pkgs/development/libraries/haskell/numeric-prelude/default.nix b/pkgs/development/libraries/haskell/numeric-prelude/default.nix
index 9fb5d334a4d5..4fac81b01f93 100644
--- a/pkgs/development/libraries/haskell/numeric-prelude/default.nix
+++ b/pkgs/development/libraries/haskell/numeric-prelude/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "numeric-prelude";
-  version = "0.4.0.3";
-  sha256 = "0lgjnkvbz14cqsm5fjafl8g5mkclcdvpwa3kpz9radmg2x09rsnl";
+  version = "0.4.1";
+  sha256 = "1y1dg4bk811xmz3p23g8kjl6vxns3gs8qj671971c06nccfl1h5r";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/options/default.nix b/pkgs/development/libraries/haskell/options/default.nix
new file mode 100644
index 000000000000..3772a142a58d
--- /dev/null
+++ b/pkgs/development/libraries/haskell/options/default.nix
@@ -0,0 +1,16 @@
+{ cabal, chell, chellQuickcheck, monadsTf, transformers }:
+
+cabal.mkDerivation (self: {
+  pname = "options";
+  version = "1.0";
+  sha256 = "0d40d6k1c8v2b0bgchgl54sk9wx28kysp8bjws8bwjcmmd57775f";
+  buildDepends = [ monadsTf transformers ];
+  testDepends = [ chell chellQuickcheck monadsTf transformers ];
+  doCheck = false;
+  meta = {
+    homepage = "https://john-millikin.com/software/haskell-options/";
+    description = "A powerful and easy-to-use command-line option parser";
+    license = self.stdenv.lib.licenses.mit;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/optparse-applicative/default.nix b/pkgs/development/libraries/haskell/optparse-applicative/default.nix
index 6f7ef601d61a..da681b324a71 100644
--- a/pkgs/development/libraries/haskell/optparse-applicative/default.nix
+++ b/pkgs/development/libraries/haskell/optparse-applicative/default.nix
@@ -1,14 +1,16 @@
-{ cabal, HUnit, testFramework, testFrameworkHunit
+{ cabal, ansiWlPprint, HUnit, QuickCheck, testFramework
+, testFrameworkHunit, testFrameworkQuickcheck2
 , testFrameworkThPrime, transformers
 }:
 
 cabal.mkDerivation (self: {
   pname = "optparse-applicative";
-  version = "0.7.0.2";
-  sha256 = "1pq620236x8fch9nkq4g4vganbzksnwj8z1bb80c2mwvf6sbg5ci";
-  buildDepends = [ transformers ];
+  version = "0.8.0.1";
+  sha256 = "19k7jw9hrns5i8dr67jxadaqnj0cmn991hl00fwymg4awv34p1w3";
+  buildDepends = [ ansiWlPprint transformers ];
   testDepends = [
-    HUnit testFramework testFrameworkHunit testFrameworkThPrime
+    HUnit QuickCheck testFramework testFrameworkHunit
+    testFrameworkQuickcheck2 testFrameworkThPrime
   ];
   jailbreak = true;
   meta = {
diff --git a/pkgs/development/libraries/haskell/pbkdf/default.nix b/pkgs/development/libraries/haskell/pbkdf/default.nix
new file mode 100644
index 000000000000..29ccc2b63dac
--- /dev/null
+++ b/pkgs/development/libraries/haskell/pbkdf/default.nix
@@ -0,0 +1,15 @@
+{ cabal, binary, byteable, bytedump, cryptohash, utf8String }:
+
+cabal.mkDerivation (self: {
+  pname = "pbkdf";
+  version = "1.1.1.1";
+  sha256 = "1nbn8kan43i00g23g8aljxjpaxm9q1qhzxxdgks0mc4mr1f7bifx";
+  buildDepends = [ binary byteable bytedump cryptohash utf8String ];
+  testDepends = [ binary byteable bytedump cryptohash utf8String ];
+  meta = {
+    homepage = "https://github.com/cdornan/pbkdf";
+    description = "Haskell implementation of the PBKDF functions from RFC-2898";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/persistent/default.nix b/pkgs/development/libraries/haskell/persistent/default.nix
index 1a61e5f76a0a..a3faace8d490 100644
--- a/pkgs/development/libraries/haskell/persistent/default.nix
+++ b/pkgs/development/libraries/haskell/persistent/default.nix
@@ -1,17 +1,17 @@
 { cabal, aeson, attoparsec, base64Bytestring, blazeHtml
 , blazeMarkup, conduit, hspec, liftedBase, monadControl
-, monadLogger, pathPieces, poolConduit, resourcet, scientific
+, monadLogger, pathPieces, resourcePool, resourcet, scientific
 , silently, sqlite, text, time, transformers, transformersBase
 , unorderedContainers, vector
 }:
 
 cabal.mkDerivation (self: {
   pname = "persistent";
-  version = "1.3.0.3";
-  sha256 = "0p9h43wvm1l9va6s6p71y6r5ifgvbqz8ypc86pmzbphq6712jnsl";
+  version = "1.3.0.4";
+  sha256 = "09p7nf6dnjz83qp7invkmzcr55zglm0y54p8pb1y6acjpnw3glkl";
   buildDepends = [
     aeson attoparsec base64Bytestring blazeHtml blazeMarkup conduit
-    liftedBase monadControl monadLogger pathPieces poolConduit
+    liftedBase monadControl monadLogger pathPieces resourcePool
     resourcet scientific silently text time transformers
     transformersBase unorderedContainers vector
   ];
diff --git a/pkgs/development/libraries/haskell/pipes-attoparsec/default.nix b/pkgs/development/libraries/haskell/pipes-attoparsec/default.nix
index 7204286671e1..d886d17478ba 100644
--- a/pkgs/development/libraries/haskell/pipes-attoparsec/default.nix
+++ b/pkgs/development/libraries/haskell/pipes-attoparsec/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "pipes-attoparsec";
-  version = "0.4.0.1";
-  sha256 = "0f536x0l135b5pd14l6lri7kinwh2m4p7qw054lacw362y7004zf";
+  version = "0.5.0";
+  sha256 = "1xpqna850lxawx0m84lzaxwrwfw4vccr7jjf199ir7bmwwhqlr5h";
   buildDepends = [ attoparsec pipes pipesParse text transformers ];
   testDepends = [
     attoparsec HUnit mmorph pipes pipesParse tasty tastyHunit text
diff --git a/pkgs/development/libraries/haskell/recaptcha/default.nix b/pkgs/development/libraries/haskell/recaptcha/default.nix
index 37fb26208f48..0d7b9d709c6c 100644
--- a/pkgs/development/libraries/haskell/recaptcha/default.nix
+++ b/pkgs/development/libraries/haskell/recaptcha/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "recaptcha";
-  version = "0.1";
-  sha256 = "de00e6e3aadd99a1cd036ce4b413ebe02d59c1b9cfd3032f122735cca1f25144";
+  version = "0.1.0.1";
+  sha256 = "0mk2vdvm5jz8jh8xc4alsly8c9msfis0drbgg89rck1y387z2njz";
   buildDepends = [ HTTP network xhtml ];
   meta = {
     homepage = "http://github.com/jgm/recaptcha/tree/master";
diff --git a/pkgs/development/libraries/haskell/resourcet/default.nix b/pkgs/development/libraries/haskell/resourcet/default.nix
index 913e77483e44..cb5543147524 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.10";
-  sha256 = "0mgwcgacf4ilyh54s862p8jqv1f42dkp287sdkpswyai1pxlvipz";
+  version = "0.4.10.1";
+  sha256 = "05skxqxhbmsyjn72w1c9n924d865wxadfsxlavk0nmbd7ygmnazb";
   buildDepends = [
     liftedBase mmorph monadControl mtl transformers transformersBase
   ];
diff --git a/pkgs/development/libraries/haskell/sample-frame/default.nix b/pkgs/development/libraries/haskell/sample-frame/default.nix
index f8acbf1fda83..8e9478ed5e2a 100644
--- a/pkgs/development/libraries/haskell/sample-frame/default.nix
+++ b/pkgs/development/libraries/haskell/sample-frame/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "sample-frame";
-  version = "0.0.2";
-  sha256 = "1k1fyslgw5vvn9a38mhp7c9j1xxf75ys010rcn2vr3pm6aj868sx";
+  version = "0.0.3";
+  sha256 = "0ivj0bcnqqc805np62bdpvh8v4ykmw86ph5rp7k54bbv9wd31bsv";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [ QuickCheck storableRecord ];
diff --git a/pkgs/development/libraries/haskell/scotty/default.nix b/pkgs/development/libraries/haskell/scotty/default.nix
index e51c2a7a64c0..278a26d1536e 100644
--- a/pkgs/development/libraries/haskell/scotty/default.nix
+++ b/pkgs/development/libraries/haskell/scotty/default.nix
@@ -5,8 +5,8 @@
 
 cabal.mkDerivation (self: {
   pname = "scotty";
-  version = "0.6.2";
-  sha256 = "0szki6wcmhj20kxhmgidgf930xwhiq03qrk8m0x8aklcjzkhvy69";
+  version = "0.7.1";
+  sha256 = "07aj74jq0hh86ik4x5p5q65b47q44rrnd6mkp039wj9l6dmyrv3c";
   buildDepends = [
     aeson blazeBuilder caseInsensitive conduit dataDefault httpTypes
     mtl regexCompat text transformers wai waiExtra warp
diff --git a/pkgs/development/libraries/haskell/scrypt/default.nix b/pkgs/development/libraries/haskell/scrypt/default.nix
new file mode 100644
index 000000000000..6caf51edc1ed
--- /dev/null
+++ b/pkgs/development/libraries/haskell/scrypt/default.nix
@@ -0,0 +1,20 @@
+{ cabal, base64Bytestring, entropy, HUnit, QuickCheck
+, testFramework, testFrameworkHunit, testFrameworkQuickcheck2
+}:
+
+cabal.mkDerivation (self: {
+  pname = "scrypt";
+  version = "0.5.0";
+  sha256 = "1cnrjdq1ncv224dlk236a7w29na8r019d2acrsxlsaiy74iadh1y";
+  buildDepends = [ base64Bytestring entropy ];
+  testDepends = [
+    HUnit QuickCheck testFramework testFrameworkHunit
+    testFrameworkQuickcheck2
+  ];
+  meta = {
+    homepage = "http://github.com/informatikr/scrypt";
+    description = "Stronger password hashing via sequential memory-hard functions";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/shake/default.nix b/pkgs/development/libraries/haskell/shake/default.nix
index f7505c62fc19..3e769f5e6015 100644
--- a/pkgs/development/libraries/haskell/shake/default.nix
+++ b/pkgs/development/libraries/haskell/shake/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "shake";
-  version = "0.11.3";
-  sha256 = "0j4b9fd60kvkayf5zgr8d8w0i4k8ly2v0vnfg80k0lkwpka7nwzl";
+  version = "0.11.4";
+  sha256 = "0gkj7zdy500zf58yscr5fq1ghj0kb3hywcv97r1xmi6ydccgf4ni";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/singletons/default.nix b/pkgs/development/libraries/haskell/singletons/default.nix
index 48f12cd88258..e233dc60cc0e 100644
--- a/pkgs/development/libraries/haskell/singletons/default.nix
+++ b/pkgs/development/libraries/haskell/singletons/default.nix
@@ -1,10 +1,13 @@
-{ cabal, mtl, syb, thDesugar }:
+{ cabal, Cabal, constraints, filepath, mtl, tasty, tastyGolden
+, thDesugar
+}:
 
 cabal.mkDerivation (self: {
   pname = "singletons";
-  version = "0.9.3";
-  sha256 = "0m90k3ygm04c0gjfiaw5rmajyn2yz0ldcqm2xmm39d10270skpb4";
-  buildDepends = [ mtl syb thDesugar ];
+  version = "0.10.0";
+  sha256 = "14vnkw9ihrs3xg3lhb3wkyfz59lsaz4c3iqh3hqy7x9gmifgggwr";
+  buildDepends = [ mtl thDesugar ];
+  testDepends = [ Cabal constraints filepath tasty tastyGolden ];
   noHaddock = true;
   meta = {
     homepage = "http://www.cis.upenn.edu/~eir/packages/singletons";
diff --git a/pkgs/development/libraries/haskell/snap/core.nix b/pkgs/development/libraries/haskell/snap/core.nix
index 7bc8d6e4b573..351e8d943235 100644
--- a/pkgs/development/libraries/haskell/snap/core.nix
+++ b/pkgs/development/libraries/haskell/snap/core.nix
@@ -7,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "snap-core";
-  version = "0.9.6.0";
-  sha256 = "0v5bp8dw867gq92p3qw3h2yv6bhr2b7gy72rs26m9crk2dsfx9pa";
+  version = "0.9.6.1";
+  sha256 = "1wfjkbck2dc4a1nxz62yprf68g66m9vhvxihn9c5xypxjpgj2r9k";
   buildDepends = [
     attoparsec attoparsecEnumerator blazeBuilder blazeBuilderEnumerator
     bytestringMmap caseInsensitive deepseq enumerator filepath hashable
diff --git a/pkgs/development/libraries/haskell/snap/snap.nix b/pkgs/development/libraries/haskell/snap/snap.nix
index 3a656d65b33a..3d361a69b874 100644
--- a/pkgs/development/libraries/haskell/snap/snap.nix
+++ b/pkgs/development/libraries/haskell/snap/snap.nix
@@ -8,8 +8,8 @@
 
 cabal.mkDerivation (self: {
   pname = "snap";
-  version = "0.13.2.2";
-  sha256 = "097bv45646g5qanc5ik0lpfm8g7zd1f5ymlxkilgcnvc72wiwkjm";
+  version = "0.13.2.4";
+  sha256 = "1806nd6gzih66c9gg2iz3dxr4qcd4jkgamz8pv9x3zkk7n5jqga0";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/snowball/default.nix b/pkgs/development/libraries/haskell/snowball/default.nix
new file mode 100644
index 000000000000..36a4231109df
--- /dev/null
+++ b/pkgs/development/libraries/haskell/snowball/default.nix
@@ -0,0 +1,21 @@
+{ cabal, HUnit, QuickCheck, quickcheckInstances, testFrameworkHunit
+, testFrameworkQuickcheck2, testFrameworkTh, text, textIcu
+}:
+
+cabal.mkDerivation (self: {
+  pname = "snowball";
+  version = "1.0.0.1";
+  sha256 = "0fvxzm14ffjqq6n51bi5cmq5yrlggpkbb9rbbw522l6cjgv0apbx";
+  buildDepends = [ text textIcu ];
+  testDepends = [
+    HUnit QuickCheck quickcheckInstances testFrameworkHunit
+    testFrameworkQuickcheck2 testFrameworkTh text
+  ];
+  doCheck = false;
+  meta = {
+    homepage = "http://hub.darcs.net/dag/snowball";
+    description = "Bindings to the Snowball library";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/tagged/default.nix b/pkgs/development/libraries/haskell/tagged/default.nix
index ee808800c55f..d62033e8d16a 100644
--- a/pkgs/development/libraries/haskell/tagged/default.nix
+++ b/pkgs/development/libraries/haskell/tagged/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "tagged";
-  version = "0.7";
-  sha256 = "1g78hl6sib1mhg016gy3fqw78x72jsgqizsgim8a1pysjzq0y6zm";
+  version = "0.7.1";
+  sha256 = "036k5k44971fq6zdxc36kkic9ma93mcas7zk48i32s60iznnfc6v";
   meta = {
     homepage = "http://github.com/ekmett/tagged";
     description = "Haskell 98 phantom types to avoid unsafely passing dummy arguments";
diff --git a/pkgs/development/libraries/haskell/tagshare/default.nix b/pkgs/development/libraries/haskell/tagshare/default.nix
new file mode 100644
index 000000000000..be56d518121b
--- /dev/null
+++ b/pkgs/development/libraries/haskell/tagshare/default.nix
@@ -0,0 +1,13 @@
+{ cabal, mtl }:
+
+cabal.mkDerivation (self: {
+  pname = "tagshare";
+  version = "0.0";
+  sha256 = "1q3chp1rmwmxa8rxv7548wsvbqbng6grrnv1587p08385sp4ncfj";
+  buildDepends = [ mtl ];
+  meta = {
+    description = "TagShare - explicit sharing with tags";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/tasty-quickcheck/default.nix b/pkgs/development/libraries/haskell/tasty-quickcheck/default.nix
index 86ee3437cbb2..ee8483595092 100644
--- a/pkgs/development/libraries/haskell/tasty-quickcheck/default.nix
+++ b/pkgs/development/libraries/haskell/tasty-quickcheck/default.nix
@@ -1,10 +1,10 @@
-{ cabal, QuickCheck, random, tagged, tasty }:
+{ cabal, QuickCheck, tagged, tasty }:
 
 cabal.mkDerivation (self: {
   pname = "tasty-quickcheck";
-  version = "0.8";
-  sha256 = "10d7chqrlp1fjphnkiykxd22g4mfp69kmihd705sxb0y0mrdfh8x";
-  buildDepends = [ QuickCheck random tagged tasty ];
+  version = "0.8.0.3";
+  sha256 = "0dng415dsdg86rliwmz5hpn2111cn0x494c0vmdmzv5qgvx5naf6";
+  buildDepends = [ QuickCheck tagged tasty ];
   meta = {
     description = "QuickCheck support for the Tasty test framework";
     license = self.stdenv.lib.licenses.mit;
diff --git a/pkgs/development/libraries/haskell/tasty/default.nix b/pkgs/development/libraries/haskell/tasty/default.nix
index 6fcdf9a4cb3c..706053a3e031 100644
--- a/pkgs/development/libraries/haskell/tasty/default.nix
+++ b/pkgs/development/libraries/haskell/tasty/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "tasty";
-  version = "0.8";
-  sha256 = "12r8ml45r1dq3vmjkibxkla5rmmyrm11js26kmkha110ji8hnflg";
+  version = "0.8.0.2";
+  sha256 = "0xn0qc1d7bq8s7988x58snq5ipvmi7g87rg89r1l21yxl6a85zw5";
   buildDepends = [
     ansiTerminal async deepseq mtl optparseApplicative regexTdfa stm
     tagged unboundedDelays
diff --git a/pkgs/development/libraries/haskell/terminal-size/default.nix b/pkgs/development/libraries/haskell/terminal-size/default.nix
new file mode 100644
index 000000000000..d33bc7d43173
--- /dev/null
+++ b/pkgs/development/libraries/haskell/terminal-size/default.nix
@@ -0,0 +1,12 @@
+{ cabal }:
+
+cabal.mkDerivation (self: {
+  pname = "terminal-size";
+  version = "0.2.1.0";
+  sha256 = "0d41af1is3vdb1kgd8dk82fags86bgs67vkbzpdhjdwa3aimsxgn";
+  meta = {
+    description = "Get terminal window height and width";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/testing-feat/default.nix b/pkgs/development/libraries/haskell/testing-feat/default.nix
new file mode 100644
index 000000000000..5e6a8177d1a1
--- /dev/null
+++ b/pkgs/development/libraries/haskell/testing-feat/default.nix
@@ -0,0 +1,13 @@
+{ cabal, mtl, QuickCheck, tagshare }:
+
+cabal.mkDerivation (self: {
+  pname = "testing-feat";
+  version = "0.4.0.1";
+  sha256 = "1fqp5k8kwnn7qqggyy5scsxmkvd1pibc5sfs7v1myrp0azkc25cp";
+  buildDepends = [ mtl QuickCheck tagshare ];
+  meta = {
+    description = "Functional Enumeration of Algebraic Types";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/tf-random/default.nix b/pkgs/development/libraries/haskell/tf-random/default.nix
new file mode 100644
index 000000000000..3ff0b2d9b844
--- /dev/null
+++ b/pkgs/development/libraries/haskell/tf-random/default.nix
@@ -0,0 +1,13 @@
+{ cabal, primitive, random, time }:
+
+cabal.mkDerivation (self: {
+  pname = "tf-random";
+  version = "0.4";
+  sha256 = "0yi7699zswpsn9a39ccqkyd0117sppjnqggclnhs1wm7ql1glc27";
+  buildDepends = [ primitive random time ];
+  meta = {
+    description = "High-quality splittable pseudorandom number generator";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/th-desugar/default.nix b/pkgs/development/libraries/haskell/th-desugar/default.nix
index f3aa1628aae7..42ff1d78198a 100644
--- a/pkgs/development/libraries/haskell/th-desugar/default.nix
+++ b/pkgs/development/libraries/haskell/th-desugar/default.nix
@@ -1,10 +1,11 @@
-{ cabal, mtl, syb }:
+{ cabal, hspec, HUnit, mtl, syb }:
 
 cabal.mkDerivation (self: {
   pname = "th-desugar";
-  version = "1.2.1";
-  sha256 = "12a8m1vzfbn728psaiqxwngmksrbybci3g7a47z04rjbsjf3cy4v";
+  version = "1.3.0";
+  sha256 = "1wfypk1hcxr2918qp63df5xlx00rqwnaa59mivnlqs558g4kjx6j";
   buildDepends = [ mtl syb ];
+  testDepends = [ hspec HUnit mtl syb ];
   meta = {
     homepage = "http://www.cis.upenn.edu/~eir/packages/th-desugar";
     description = "Functions to desugar Template Haskell";
diff --git a/pkgs/development/libraries/haskell/timezone-olson/default.nix b/pkgs/development/libraries/haskell/timezone-olson/default.nix
index 4cce59f61658..6a0e81383f74 100644
--- a/pkgs/development/libraries/haskell/timezone-olson/default.nix
+++ b/pkgs/development/libraries/haskell/timezone-olson/default.nix
@@ -2,8 +2,8 @@
 
 cabal.mkDerivation (self: {
   pname = "timezone-olson";
-  version = "0.1.3";
-  sha256 = "02x3wq03h2zjhxrcv6vnq9hrzggdvpnj7zj8rcrq4scf67q6h8gc";
+  version = "0.1.4";
+  sha256 = "1l5j6gqi9vlx7sifn7vv3by4z9ha3h6klfds4ywqv3dv0gh5725k";
   buildDepends = [ binary extensibleExceptions time timezoneSeries ];
   meta = {
     homepage = "http://projects.haskell.org/time-ng/";
diff --git a/pkgs/development/libraries/haskell/tls/1.2.2.nix b/pkgs/development/libraries/haskell/tls/1.2.3.nix
index 638299d4a426..5906413796db 100644
--- a/pkgs/development/libraries/haskell/tls/1.2.2.nix
+++ b/pkgs/development/libraries/haskell/tls/1.2.3.nix
@@ -1,5 +1,5 @@
-{ cabal, asn1Encoding, asn1Types, cereal, cipherAes, cipherRc4
-, cprngAes, cryptohash, cryptoNumbers, cryptoPubkey
+{ cabal, asn1Encoding, asn1Types, byteable, cereal, cipherAes
+, cipherRc4, cprngAes, cryptohash, cryptoNumbers, cryptoPubkey
 , cryptoPubkeyTypes, cryptoRandom, dataDefaultClass, mtl, network
 , QuickCheck, testFramework, testFrameworkQuickcheck2, time, x509
 , x509Store, x509Validation
@@ -7,12 +7,13 @@
 
 cabal.mkDerivation (self: {
   pname = "tls";
-  version = "1.2.2";
-  sha256 = "156l859mfpdax5rg1frwa5ms5bzggaja0mi795hh8i5c3ah7hfcp";
+  version = "1.2.3";
+  sha256 = "0vv81z5m223b90zzfp5dk376fh8yngyd8h9anrxjrqb4f3bycaxg";
   buildDepends = [
-    asn1Encoding asn1Types cereal cipherAes cipherRc4 cryptohash
-    cryptoNumbers cryptoPubkey cryptoPubkeyTypes cryptoRandom
-    dataDefaultClass mtl network x509 x509Store x509Validation
+    asn1Encoding asn1Types byteable cereal cipherAes cipherRc4
+    cryptohash cryptoNumbers cryptoPubkey cryptoPubkeyTypes
+    cryptoRandom dataDefaultClass mtl network x509 x509Store
+    x509Validation
   ];
   testDepends = [
     cereal cprngAes cryptoPubkey cryptoRandom dataDefaultClass mtl
diff --git a/pkgs/development/libraries/haskell/unix-process-conduit/default.nix b/pkgs/development/libraries/haskell/unix-process-conduit/default.nix
index a52f9fe04fb6..73343bf307bc 100644
--- a/pkgs/development/libraries/haskell/unix-process-conduit/default.nix
+++ b/pkgs/development/libraries/haskell/unix-process-conduit/default.nix
@@ -2,13 +2,13 @@
 
 cabal.mkDerivation (self: {
   pname = "unix-process-conduit";
-  version = "0.2.2.2";
-  sha256 = "0an4lwwkzr902r0rxa35i9kdm5cpgdfmg5m06zsxzbck3mry7871";
+  version = "0.2.2.3";
+  sha256 = "0ldgjwdvshggygxn9fpnxvb01dba0q0bn9f7iiw5xgqhli46nvcy";
   buildDepends = [ conduit filepath stm time transformers ];
   testDepends = [ conduit hspec transformers ];
   meta = {
     homepage = "https://github.com/snoyberg/conduit";
-    description = "Run processes on Unix systems, with a conduit interface";
+    description = "Run processes on Unix systems, with a conduit interface (deprecated)";
     license = self.stdenv.lib.licenses.mit;
     platforms = self.ghc.meta.platforms;
   };
diff --git a/pkgs/development/libraries/haskell/unix-time/default.nix b/pkgs/development/libraries/haskell/unix-time/default.nix
index 0ca4ea5f5c24..e329c1ef4067 100644
--- a/pkgs/development/libraries/haskell/unix-time/default.nix
+++ b/pkgs/development/libraries/haskell/unix-time/default.nix
@@ -5,6 +5,7 @@ cabal.mkDerivation (self: {
   version = "0.2.2";
   sha256 = "0xnl12mscc5nwjl9s2lx4xr8q8agzcpxh3bmxxidfjrg19drfwrm";
   testDepends = [ doctest hspec QuickCheck time ];
+  configureFlags = self.stdenv.lib.optionalString self.enableSharedLibraries "--ghc-option=-fPIC";
   meta = {
     description = "Unix time parser/formatter and utilities";
     license = self.stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/haskell/vty/default.nix b/pkgs/development/libraries/haskell/vty/default.nix
index 3bcadc78a978..8a8ed40adb44 100644
--- a/pkgs/development/libraries/haskell/vty/default.nix
+++ b/pkgs/development/libraries/haskell/vty/default.nix
@@ -4,8 +4,8 @@
 
 cabal.mkDerivation (self: {
   pname = "vty";
-  version = "4.7.3";
-  sha256 = "0x059mzw6v2xf92fdhy0ilyqbics2as6dqrdr6njpp0m6qykkybb";
+  version = "4.7.5";
+  sha256 = "0ahd5qjszfw1xbl5jxhzfw31mny8hp8clw9qciv15xn442prvvpr";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/wai-app-static/default.nix b/pkgs/development/libraries/haskell/wai-app-static/default.nix
index 412fd3f16e6c..fec4d410c22e 100644
--- a/pkgs/development/libraries/haskell/wai-app-static/default.nix
+++ b/pkgs/development/libraries/haskell/wai-app-static/default.nix
@@ -1,19 +1,22 @@
 { cabal, base64Bytestring, blazeBuilder, blazeHtml, blazeMarkup
-, cereal, cryptoApi, cryptoConduit, cryptohashCryptoapi, fileEmbed
+, byteable, cmdargs, cryptohash, cryptohashConduit, fileEmbed
 , filepath, hspec, httpDate, httpTypes, mimeTypes, network
 , systemFileio, systemFilepath, text, time, transformers
-, unixCompat, unorderedContainers, wai, waiTest, zlib
+, unixCompat, unorderedContainers, wai, waiExtra, waiTest, warp
+, zlib
 }:
 
 cabal.mkDerivation (self: {
   pname = "wai-app-static";
-  version = "2.0.0.3";
-  sha256 = "0anbmp6wjk1qba1skr08fkm5y9lm58kfghzcgzgx8hrid7w85fb7";
+  version = "2.0.0.5";
+  sha256 = "0f18wwk0xrzbn9d6krjdcm71cyxl1pzzi5xqwzzc9xnq595m75wa";
+  isLibrary = true;
+  isExecutable = true;
   buildDepends = [
-    base64Bytestring blazeBuilder blazeHtml blazeMarkup cereal
-    cryptoApi cryptoConduit cryptohashCryptoapi fileEmbed filepath
-    httpDate httpTypes mimeTypes systemFileio systemFilepath text time
-    transformers unixCompat unorderedContainers wai zlib
+    base64Bytestring blazeBuilder blazeHtml blazeMarkup byteable
+    cmdargs cryptohash cryptohashConduit fileEmbed filepath httpDate
+    httpTypes mimeTypes systemFileio systemFilepath text time
+    transformers unixCompat unorderedContainers wai waiExtra warp zlib
   ];
   testDepends = [
     hspec httpDate httpTypes mimeTypes network text time transformers
diff --git a/pkgs/development/libraries/haskell/wai-extra/default.nix b/pkgs/development/libraries/haskell/wai-extra/default.nix
index 50e4d983d755..df13922601c2 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 = "2.1.0";
-  sha256 = "14aj1c6i58jyg79y516sa2l39y4i7az3l5lp6fkxkgqgzl5dxs6c";
+  version = "2.1.1";
+  sha256 = "1bsc9sjmp9hspdif4f81iqjkcaflv6b7rd42g62qj790a4b70igf";
   buildDepends = [
     ansiTerminal base64Bytestring blazeBuilder blazeBuilderConduit
     caseInsensitive conduit dataDefault fastLogger httpTypes liftedBase
diff --git a/pkgs/development/libraries/haskell/wai-middleware-static/default.nix b/pkgs/development/libraries/haskell/wai-middleware-static/default.nix
index 31ec8c410a93..005305d77092 100644
--- a/pkgs/development/libraries/haskell/wai-middleware-static/default.nix
+++ b/pkgs/development/libraries/haskell/wai-middleware-static/default.nix
@@ -2,14 +2,14 @@
 
 cabal.mkDerivation (self: {
   pname = "wai-middleware-static";
-  version = "0.4.0.2";
-  sha256 = "0nw54h8baphjdwsd118g9j5w4g2mnb2hrny0n4ih4jlqlcqam3lf";
+  version = "0.4.0.3";
+  sha256 = "0nvzdj04g10bcay6x4y5l7gxx38gs3ns0izair8n1j1awrp8px07";
   buildDepends = [ filepath httpTypes mtl text wai ];
+  jailbreak = true;
   meta = {
     homepage = "https://github.com/scotty-web/scotty";
     description = "WAI middleware that intercepts requests to static files";
     license = self.stdenv.lib.licenses.bsd3;
     platforms = self.ghc.meta.platforms;
   };
-  jailbreak = true;
 })
diff --git a/pkgs/development/libraries/haskell/wai-test/default.nix b/pkgs/development/libraries/haskell/wai-test/default.nix
index 1d7b184d6dfd..5e3a666726a8 100644
--- a/pkgs/development/libraries/haskell/wai-test/default.nix
+++ b/pkgs/development/libraries/haskell/wai-test/default.nix
@@ -1,15 +1,15 @@
 { cabal, blazeBuilder, blazeBuilderConduit, caseInsensitive
-, conduit, cookie, hspec, httpTypes, HUnit, network, text
+, conduit, cookie, deepseq, hspec, httpTypes, network, text
 , transformers, wai
 }:
 
 cabal.mkDerivation (self: {
   pname = "wai-test";
-  version = "2.0.0.2";
-  sha256 = "0085whb8jav2zasmgi8z62anm6i509lc2w0988vqlcrds7rrknc8";
+  version = "2.0.1";
+  sha256 = "0c803l3cz5bjf60l97sy1isxhnmbpzr5x39yhnck28r0vykycnrj";
   buildDepends = [
     blazeBuilder blazeBuilderConduit caseInsensitive conduit cookie
-    httpTypes HUnit network text transformers wai
+    deepseq httpTypes network text transformers wai
   ];
   testDepends = [ hspec wai ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/wai-websockets/default.nix b/pkgs/development/libraries/haskell/wai-websockets/default.nix
new file mode 100644
index 000000000000..4b4038fd4111
--- /dev/null
+++ b/pkgs/development/libraries/haskell/wai-websockets/default.nix
@@ -0,0 +1,22 @@
+{ cabal, blazeBuilder, caseInsensitive, conduit, fileEmbed
+, httpTypes, ioStreams, network, text, transformers, wai
+, waiAppStatic, warp, websockets
+}:
+
+cabal.mkDerivation (self: {
+  pname = "wai-websockets";
+  version = "2.1.0";
+  sha256 = "094imqhkn4ghifgp2qhs4hnby3zzdd84fhmyvvy7igcpz1rmll7a";
+  isLibrary = true;
+  isExecutable = true;
+  buildDepends = [
+    blazeBuilder caseInsensitive conduit fileEmbed httpTypes ioStreams
+    network text transformers wai waiAppStatic warp websockets
+  ];
+  meta = {
+    homepage = "http://github.com/yesodweb/wai";
+    description = "Provide a bridge betweeen WAI and the websockets package";
+    license = self.stdenv.lib.licenses.mit;
+    platforms = self.ghc.meta.platforms;
+  };
+})
diff --git a/pkgs/development/libraries/haskell/warp/default.nix b/pkgs/development/libraries/haskell/warp/default.nix
index 7ebc7af36270..d08f8d6e5450 100644
--- a/pkgs/development/libraries/haskell/warp/default.nix
+++ b/pkgs/development/libraries/haskell/warp/default.nix
@@ -6,8 +6,8 @@
 
 cabal.mkDerivation (self: {
   pname = "warp";
-  version = "2.1.1";
-  sha256 = "1nldm0pq1q5m91mhss4h23dxdqwqmvfdmcpq5grc1rqjb88mgm25";
+  version = "2.1.2";
+  sha256 = "15630g8qzshn2620qsdki1nwr4bkapqz0k2bls0yxyblvw0fn9cf";
   buildDepends = [
     blazeBuilder blazeBuilderConduit caseInsensitive conduit hashable
     httpDate httpTypes liftedBase network networkConduit simpleSendfile
diff --git a/pkgs/development/libraries/haskell/wxHaskell/fix-bogus-pointer-assignment.patch b/pkgs/development/libraries/haskell/wxHaskell/fix-bogus-pointer-assignment.patch
deleted file mode 100644
index 38551d24d43f..000000000000
--- a/pkgs/development/libraries/haskell/wxHaskell/fix-bogus-pointer-assignment.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -ubr wxc-0.90.0.4-orig/src/cpp/eljpen.cpp wxc-0.90.0.4/src/cpp/eljpen.cpp
---- wxc-0.90.0.4-orig/src/cpp/eljpen.cpp	2012-07-03 12:12:17.000000000 +0200
-+++ wxc-0.90.0.4/src/cpp/eljpen.cpp	2013-01-07 12:09:50.296417007 +0100
-@@ -156,7 +156,7 @@
- EWXWEXPORT(void,wxPen_GetStipple)(void* self,wxBitmap* _ref)

- {

- #if defined(__WXGTK__)

--    *_ref = NULL;

-+    _ref = NULL;

- #else

-     *_ref = *(((wxPen*)self)->GetStipple());

- #endif

-Only in wxc-0.90.0.4/src/cpp: eljpen.cpp.orig
diff --git a/pkgs/development/libraries/haskell/wxHaskell/wx.nix b/pkgs/development/libraries/haskell/wxHaskell/wx.nix
index dc030f68059a..90bfdc5ca0a3 100644
--- a/pkgs/development/libraries/haskell/wxHaskell/wx.nix
+++ b/pkgs/development/libraries/haskell/wxHaskell/wx.nix
@@ -2,9 +2,10 @@
 
 cabal.mkDerivation (self: {
   pname = "wx";
-  version = "0.90.0.1";
-  sha256 = "116vlpssjcyzil99xmz3azc2vl97iban3gdpxd593q5gi24l838m";
+  version = "0.90.1.0";
+  sha256 = "1669mrd73c3v7c4yc0zgyqsnfgzb7561v1wd168y06d0db1nlkn9";
   buildDepends = [ stm wxcore ];
+  preConfigure = "find . -type f -exec touch {} +";
   meta = {
     homepage = "http://haskell.org/haskellwiki/WxHaskell";
     description = "wxHaskell";
diff --git a/pkgs/development/libraries/haskell/wxHaskell/wxc.nix b/pkgs/development/libraries/haskell/wxHaskell/wxc.nix
index d95b07121af1..7a9f05c6b624 100644
--- a/pkgs/development/libraries/haskell/wxHaskell/wxc.nix
+++ b/pkgs/development/libraries/haskell/wxHaskell/wxc.nix
@@ -2,15 +2,12 @@
 
 cabal.mkDerivation (self: {
   pname = "wxc";
-  version = "0.90.0.4";
-  sha256 = "1bh20i1rb8ng0ni1v98nm8qv5wni19dvxwf5i3ijxhrxqdq4i7p6";
+  version = "0.90.1.0";
+  sha256 = "1j318pxn6wqjwhz5rinb8az1bkhasgm9rhb3l36dlbzwcc4p0a2a";
   buildDepends = [ wxdirect ];
   extraLibraries = [ libX11 mesa wxGTK ];
-  postInstall = ''
-    cp -v dist/build/libwxc.so.${self.version} $out/lib/libwxc.so
-  '';
-  patches = [ ./fix-bogus-pointer-assignment.patch ];
   noHaddock = true;
+  preConfigure = "find . -type f -exec touch {} +";
   meta = {
     homepage = "http://haskell.org/haskellwiki/WxHaskell";
     description = "wxHaskell C++ wrapper";
diff --git a/pkgs/development/libraries/haskell/wxHaskell/wxcore.nix b/pkgs/development/libraries/haskell/wxHaskell/wxcore.nix
index 5dde5e8fc3f6..3ee5d9e2cdb7 100644
--- a/pkgs/development/libraries/haskell/wxHaskell/wxcore.nix
+++ b/pkgs/development/libraries/haskell/wxHaskell/wxcore.nix
@@ -4,13 +4,11 @@
 
 cabal.mkDerivation (self: {
   pname = "wxcore";
-  version = "0.90.0.3";
-  sha256 = "0d79hr6cz9zj3w57h6630nfnsmfq1w73gz04jjmlhwh8ih557imw";
+  version = "0.90.1.0";
+  sha256 = "0pyh5xc8f3rlyn66dawlijwym8nwac12qwh96hfkna0pbqg0995c";
   buildDepends = [ filepath parsec stm time wxc wxdirect ];
   extraLibraries = [ libX11 mesa wxGTK ];
-  patchPhase = ''
-    sed -i -e 's|containers >=.*|containers|' wxcore.cabal
-  '';
+  preConfigure = "find . -type f -exec touch {} +";
   meta = {
     homepage = "http://haskell.org/haskellwiki/WxHaskell";
     description = "wxHaskell core";
diff --git a/pkgs/development/libraries/haskell/wxHaskell/wxdirect.nix b/pkgs/development/libraries/haskell/wxHaskell/wxdirect.nix
index 08512c206255..0f379401b35e 100644
--- a/pkgs/development/libraries/haskell/wxHaskell/wxdirect.nix
+++ b/pkgs/development/libraries/haskell/wxHaskell/wxdirect.nix
@@ -1,15 +1,13 @@
-{ cabal, parsec, strict, time }:
+{ cabal, filepath, parsec, strict, time }:
 
 cabal.mkDerivation (self: {
   pname = "wxdirect";
-  version = "0.90.0.1";
-  sha256 = "04jslgxw601g6wh8f2wrdnipzh6x0487kfxb89fkgfgjhxrkfyr3";
+  version = "0.90.1.0";
+  sha256 = "06r8z4css7md35rcbi805407dcabcrb1knif9f7445aphwzgadr0";
   isLibrary = true;
   isExecutable = true;
-  buildDepends = [ parsec strict time ];
-  patchPhase = ''
-    sed -i -e 's|containers >=.*|containers|' wxdirect.cabal
-  '';
+  buildDepends = [ filepath parsec strict time ];
+  preConfigure = "find . -type f -exec touch {} +";
   meta = {
     homepage = "http://haskell.org/haskellwiki/WxHaskell";
     description = "helper tool for building wxHaskell";
diff --git a/pkgs/development/libraries/haskell/yaml/default.nix b/pkgs/development/libraries/haskell/yaml/default.nix
index 35106292f85e..e9a9c075c328 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.7.2";
-  sha256 = "00dmmws0gmp9fb2ha6z055ix7jlsiry24bwhkl226b680gi9a84d";
+  version = "0.8.8";
+  sha256 = "0fv56x40ici6hx2dfy85fg7zy213mn82h84czhj4xbvjszg8wycw";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/libraries/haskell/yesod-bin/default.nix b/pkgs/development/libraries/haskell/yesod-bin/default.nix
index 50071e8cffe3..e939b1e4ee72 100644
--- a/pkgs/development/libraries/haskell/yesod-bin/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-bin/default.nix
@@ -1,26 +1,26 @@
 { cabal, attoparsec, base64Bytestring, blazeBuilder, Cabal, conduit
-, dataDefaultClass, fileEmbed, filepath, filesystemConduit
-, fsnotify, ghcPaths, httpConduit, httpReverseProxy, httpTypes
-, liftedBase, network, networkConduit, optparseApplicative, parsec
-, projectTemplate, resourcet, shakespeare, shakespeareCss
-, shakespeareJs, shakespeareText, split, systemFileio
-, systemFilepath, tar, text, time, transformers, unixCompat
-, unorderedContainers, wai, warp, yaml, zlib
+, dataDefaultClass, fileEmbed, filepath, fsnotify, ghcPaths
+, httpConduit, httpReverseProxy, httpTypes, liftedBase, network
+, networkConduit, optparseApplicative, parsec, projectTemplate
+, resourcet, shakespeare, shakespeareCss, shakespeareJs
+, shakespeareText, split, systemFileio, systemFilepath, tar, text
+, time, transformers, unixCompat, unorderedContainers, wai, warp
+, yaml, zlib
 }:
 
 cabal.mkDerivation (self: {
   pname = "yesod-bin";
-  version = "1.2.7.1";
-  sha256 = "1lbnn7lzgpw0xsbnlax41q5hqb1bv9irmncgjvv18y8mpf5zcncs";
+  version = "1.2.7.3";
+  sha256 = "05kbfnkigk4p1vjw0h1pkp7jfczjq99vgrsaz45faajadnhffnpz";
   isLibrary = false;
   isExecutable = true;
   buildDepends = [
     attoparsec base64Bytestring blazeBuilder Cabal conduit
-    dataDefaultClass fileEmbed filepath filesystemConduit fsnotify
-    ghcPaths httpConduit httpReverseProxy httpTypes liftedBase network
-    networkConduit optparseApplicative parsec projectTemplate resourcet
-    shakespeare shakespeareCss shakespeareJs shakespeareText split
-    systemFileio systemFilepath tar text time transformers unixCompat
+    dataDefaultClass fileEmbed filepath fsnotify ghcPaths httpConduit
+    httpReverseProxy httpTypes liftedBase network networkConduit
+    optparseApplicative parsec projectTemplate resourcet shakespeare
+    shakespeareCss shakespeareJs shakespeareText split systemFileio
+    systemFilepath tar text time transformers unixCompat
     unorderedContainers wai warp yaml zlib
   ];
   meta = {
diff --git a/pkgs/development/libraries/haskell/yesod-core/default.nix b/pkgs/development/libraries/haskell/yesod-core/default.nix
index bd1116267fa1..2c3d378257f5 100644
--- a/pkgs/development/libraries/haskell/yesod-core/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-core/default.nix
@@ -10,8 +10,8 @@
 
 cabal.mkDerivation (self: {
   pname = "yesod-core";
-  version = "1.2.7";
-  sha256 = "1gkpx0d7hyvn45254aj40iy4k0bf3kkrvmxnw3q1mvqc3k1kdxqn";
+  version = "1.2.9";
+  sha256 = "0qd9x2pca2nx7yqz9whlvb0rjgf1zf9vw19j6z0p149yddgrrcyq";
   buildDepends = [
     aeson attoparsecConduit blazeBuilder blazeHtml blazeMarkup
     caseInsensitive cereal clientsession conduit cookie dataDefault
diff --git a/pkgs/development/libraries/haskell/yesod-form/default.nix b/pkgs/development/libraries/haskell/yesod-form/default.nix
index a42e0a50bc40..2f58cbb64087 100644
--- a/pkgs/development/libraries/haskell/yesod-form/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-form/default.nix
@@ -1,15 +1,15 @@
 { cabal, aeson, attoparsec, blazeBuilder, blazeHtml, blazeMarkup
-, cryptoApi, dataDefault, emailValidate, hamlet, hspec, network
+, byteable, dataDefault, emailValidate, hamlet, hspec, network
 , persistent, resourcet, shakespeareCss, shakespeareJs, text, time
 , transformers, wai, xssSanitize, yesodCore, yesodPersistent
 }:
 
 cabal.mkDerivation (self: {
   pname = "yesod-form";
-  version = "1.3.7";
-  sha256 = "01fv3c5db702nm9dk5ynvn5mf9vc4a1rkjn31zlw260jlgqy4vsn";
+  version = "1.3.8";
+  sha256 = "0cdpdgclhasdmynp9fhf9yhl33nwh71bmg344x51xkp5347w614b";
   buildDepends = [
-    aeson attoparsec blazeBuilder blazeHtml blazeMarkup cryptoApi
+    aeson attoparsec blazeBuilder blazeHtml blazeMarkup byteable
     dataDefault emailValidate hamlet network persistent resourcet
     shakespeareCss shakespeareJs text time transformers wai xssSanitize
     yesodCore yesodPersistent
diff --git a/pkgs/development/libraries/haskell/yesod-persistent/default.nix b/pkgs/development/libraries/haskell/yesod-persistent/default.nix
index 42b55bcee6a6..a96db23f9527 100644
--- a/pkgs/development/libraries/haskell/yesod-persistent/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-persistent/default.nix
@@ -1,15 +1,15 @@
-{ cabal, blazeBuilder, conduit, hspec, liftedBase, persistent
-, persistentSqlite, persistentTemplate, poolConduit, resourcet
-, text, transformers, waiTest, yesodCore
+{ cabal, blazeBuilder, conduit, hspec, persistent, persistentSqlite
+, persistentTemplate, resourcePool, resourcet, text, transformers
+, waiTest, yesodCore
 }:
 
 cabal.mkDerivation (self: {
   pname = "yesod-persistent";
-  version = "1.2.2.1";
-  sha256 = "0vihd94yh4xipvz193p2fd1sqlbwdj0619l21gpdy307sng50kjn";
+  version = "1.2.2.2";
+  sha256 = "112wr85k8a7ah1m5s8b9h1dm3hbglckdhngp12d67rccrr4mmgjq";
   buildDepends = [
-    blazeBuilder conduit liftedBase persistent persistentTemplate
-    poolConduit resourcet transformers yesodCore
+    blazeBuilder conduit persistent persistentTemplate resourcePool
+    resourcet transformers yesodCore
   ];
   testDepends = [
     blazeBuilder conduit hspec persistent persistentSqlite text waiTest
diff --git a/pkgs/development/libraries/haskell/yesod-static/default.nix b/pkgs/development/libraries/haskell/yesod-static/default.nix
index 757367b73935..7059e178bb61 100644
--- a/pkgs/development/libraries/haskell/yesod-static/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-static/default.nix
@@ -1,5 +1,5 @@
-{ cabal, base64Bytestring, cereal, conduit, cryptoConduit
-, cryptohashCryptoapi, dataDefault, fileEmbed, filepath, hjsmin
+{ cabal, base64Bytestring, byteable, conduit, cryptohash
+, cryptohashConduit, dataDefault, fileEmbed, filepath, hjsmin
 , hspec, httpTypes, HUnit, mimeTypes, processConduit, resourcet
 , shakespeareCss, systemFileio, systemFilepath, text, transformers
 , unixCompat, unorderedContainers, wai, waiAppStatic, waiTest
@@ -8,17 +8,17 @@
 
 cabal.mkDerivation (self: {
   pname = "yesod-static";
-  version = "1.2.2.1";
-  sha256 = "1dsr3gv6hf42islw2018y4yajvkd9j627fkdlz45309cyjns55jg";
+  version = "1.2.2.2";
+  sha256 = "156qqd2v3z7wv75jsfscs9cvbg1cl1riqcrhycrqcmapjprr2r12";
   buildDepends = [
-    base64Bytestring cereal conduit cryptoConduit cryptohashCryptoapi
+    base64Bytestring byteable conduit cryptohash cryptohashConduit
     dataDefault fileEmbed filepath hjsmin httpTypes mimeTypes
     processConduit resourcet shakespeareCss systemFileio systemFilepath
     text transformers unixCompat unorderedContainers wai waiAppStatic
     yesodCore
   ];
   testDepends = [
-    base64Bytestring cereal conduit cryptoConduit cryptohashCryptoapi
+    base64Bytestring byteable conduit cryptohash cryptohashConduit
     dataDefault fileEmbed filepath hjsmin hspec httpTypes HUnit
     mimeTypes processConduit resourcet shakespeareCss systemFileio
     systemFilepath text transformers unixCompat unorderedContainers wai
diff --git a/pkgs/development/libraries/haskell/yesod-test/default.nix b/pkgs/development/libraries/haskell/yesod-test/default.nix
index c4ad5b29acdc..38a319a87456 100644
--- a/pkgs/development/libraries/haskell/yesod-test/default.nix
+++ b/pkgs/development/libraries/haskell/yesod-test/default.nix
@@ -1,19 +1,18 @@
 { cabal, attoparsec, blazeBuilder, blazeHtml, blazeMarkup
 , caseInsensitive, cookie, hspec, htmlConduit, httpTypes, HUnit
-, monadControl, network, persistent, poolConduit, text, time
-, transformers, wai, waiTest, xmlConduit, xmlTypes, yesodCore
-, yesodForm
+, monadControl, network, persistent, text, time, transformers, wai
+, waiTest, xmlConduit, xmlTypes, yesodCore, yesodForm
 }:
 
 cabal.mkDerivation (self: {
   pname = "yesod-test";
-  version = "1.2.1";
-  sha256 = "1f92q9wjj6npxfsjibw0qlg6pai721mwkjcadh121bwgrancflyr";
+  version = "1.2.1.1";
+  sha256 = "0rbavw67cfqyav6xakacag0sd0gixbz3sls06px6q6pnpzk9q9d4";
   buildDepends = [
     attoparsec blazeBuilder blazeHtml blazeMarkup caseInsensitive
     cookie hspec htmlConduit httpTypes HUnit monadControl network
-    persistent poolConduit text time transformers wai waiTest
-    xmlConduit xmlTypes yesodCore
+    persistent text time transformers wai waiTest xmlConduit xmlTypes
+    yesodCore
   ];
   testDepends = [
     hspec htmlConduit HUnit text xmlConduit yesodCore yesodForm
diff --git a/pkgs/development/libraries/itk/default.nix b/pkgs/development/libraries/itk/default.nix
index bfe10490fc7f..29e15e08f696 100644
--- a/pkgs/development/libraries/itk/default.nix
+++ b/pkgs/development/libraries/itk/default.nix
@@ -8,7 +8,12 @@ stdenv.mkDerivation rec {
     sha256 = "05z49sw612cbyiaghcsda0xylrkf06jh81ql79si5632w1hpgbd9";
   };
 
-  cmakeFlags = [ "-DBUILD_TESTING=OFF" "-DBUILD_EXAMPLES=OFF" ];
+  cmakeFlags = [
+    "-DBUILD_TESTING=OFF"
+    "-DBUILD_EXAMPLES=OFF"
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DCMAKE_CXX_FLAGS=-fPIC"
+  ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/libraries/kdevplatform/default.nix b/pkgs/development/libraries/kdevplatform/default.nix
index 2ff2fac296d8..6f874450fc58 100644
--- a/pkgs/development/libraries/kdevplatform/default.nix
+++ b/pkgs/development/libraries/kdevplatform/default.nix
@@ -1,16 +1,16 @@
 { stdenv, fetchurl, cmake, kdelibs, subversion, qt4, automoc4, perl, phonon,
-  gettext, pkgconfig, apr, aprutil, boost, qjson }:
+  gettext, pkgconfig, apr, aprutil, boost, qjson, grantlee }:
 
 stdenv.mkDerivation rec {
-  name = "kdevplatform-1.3.1";
+  name = "kdevplatform-1.6.0";
 
   src = fetchurl {
-    url = "mirror://kde/stable/kdevelop/4.3.1/src/${name}.tar.bz2";
-    sha256 = "1fiqwabw5ilhw1jwvvr743dym12y3kxrs3zlqahz57yncdsglcl6";
+    url = "mirror://kde/stable/kdevelop/4.6.0/src/${name}.tar.xz";
+    sha256 = "cdf7c88ca8860258f46e41d2107c826a307212fd041345bee54fbd70c9794f80";
   };
 
   propagatedBuildInputs = [ kdelibs qt4 phonon ];
-  buildInputs = [ apr aprutil subversion boost qjson ];
+  buildInputs = [ apr aprutil subversion boost qjson grantlee ];
 
   nativeBuildInputs = [ cmake automoc4 gettext pkgconfig ];
 
diff --git a/pkgs/development/libraries/keybinder/default.nix b/pkgs/development/libraries/keybinder/default.nix
index 20e2cd2218ff..0cc875e2656f 100644
--- a/pkgs/development/libraries/keybinder/default.nix
+++ b/pkgs/development/libraries/keybinder/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, gnome_common
-, gtk_doc, gtk2, python, pygtk, pygobject, lua
+{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, gnome3, pygobject3, pygtk
+, gtk_doc, gtk2, python, pygobject, lua, libX11, libXext, libXrender, gobjectIntrospection
 }:
 
 stdenv.mkDerivation rec {
@@ -13,8 +13,8 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    autoconf automake libtool pkgconfig gnome_common gtk_doc gtk2
-    python pygtk pygobject lua
+    autoconf automake libtool pkgconfig gnome3.gnome_common gtk_doc gnome3.gtk3
+    python pygobject3 pygtk lua libX11 libXext libXrender gobjectIntrospection gtk2
   ];
 
   preConfigure = ''
diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix
index c99059bf034f..04d51edf5310 100644
--- a/pkgs/development/libraries/libav/default.nix
+++ b/pkgs/development/libraries/libav/default.nix
@@ -26,8 +26,8 @@ with { inherit (stdenv.lib) optional optionals; };
 
 let
   result = {
-    libav_9   = libavFun  "9.11"  "1ad7vyxp0w8dw6ngc16fz0ngsjlgk6h8bpphghqia5sqkbl10ca3";
-    libav_0_8 = libavFun "0.8.10" "0sxmj4qsd3ljygvdjz7ly46nf7sqmaqka4hx65b1jdji12al1djc";
+    libav_9   = libavFun  "9.12"  "1wm0nf12c1p138y54jh71mvbpikrpk43zc9m2qhpjm9pgnagizk0";
+    libav_0_8 = libavFun "0.8.11" "0nhm0mzz2aj78sgmw9xf20a1mlgig78cv1nyhx4zrq7nvgqf8d2r";
   };
 
   libavFun = version : sha256 : stdenv.mkDerivation rec {
diff --git a/pkgs/development/libraries/libconfig/default.nix b/pkgs/development/libraries/libconfig/default.nix
index 70a882ff15c1..d6c238ff1793 100644
--- a/pkgs/development/libraries/libconfig/default.nix
+++ b/pkgs/development/libraries/libconfig/default.nix
@@ -14,5 +14,6 @@ stdenv.mkDerivation rec {
     description = "a simple library for processing structured configuration files";
     license = licenses.lgpl3;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/libgig/default.nix b/pkgs/development/libraries/libgig/default.nix
index 6129ef42f3dc..8975c4fa0743 100644
--- a/pkgs/development/libraries/libgig/default.nix
+++ b/pkgs/development/libraries/libgig/default.nix
@@ -19,5 +19,6 @@ stdenv.mkDerivation rec {
     description = "Gigasampler file access library";
     license = licenses.gpl2;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/libktorrent/default.nix b/pkgs/development/libraries/libktorrent/default.nix
index a452cb7609e1..db07775d45ed 100644
--- a/pkgs/development/libraries/libktorrent/default.nix
+++ b/pkgs/development/libraries/libktorrent/default.nix
@@ -2,8 +2,8 @@
 , phonon, libgcrypt }:
 
 let
-  mp_ = "2.1";
-  version = "1.${mp_}-2";
+  mp_ = "3.1";
+  version = "1.${mp_}";
   version4 = "4.${mp_}";
 in
 stdenv.mkDerivation rec {
@@ -11,8 +11,8 @@ stdenv.mkDerivation rec {
   pname = "libktorrent";
 
   src = fetchurl {
-    url = "http://ktorrent.org/downloads/${version4}/${name}.tar.bz2";
-    sha256 = "1b4ibkba27ivvjsh5s93xwlcgzvvwsgl6mcd8g96d1al05n2ccw9";
+    url = "${meta.homepage}/downloads/${version4}/${name}.tar.bz2";
+    sha256 = "2fe11ccb4bf2028c3da11e52cde890f1b3a90560e548eac89a4f8e1558b09725";
   };
 
   nativeBuildInputs = [ cmake automoc4 gettext ];
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A BiTtorrent library used by KTorrent";
-    homepage = http://ktorrent.org;
+    homepage = http://ktorrent.pwsp.net;
     inherit (kdelibs.meta) platforms;
   };
 }
diff --git a/pkgs/development/libraries/liblscp/default.nix b/pkgs/development/libraries/liblscp/default.nix
index 33731e5d7557..a1cbf9250c49 100644
--- a/pkgs/development/libraries/liblscp/default.nix
+++ b/pkgs/development/libraries/liblscp/default.nix
@@ -19,5 +19,6 @@ stdenv.mkDerivation rec {
     description = "LinuxSampler Control Protocol (LSCP) wrapper library";
     license = licenses.gpl2;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/libpng/12.nix b/pkgs/development/libraries/libpng/12.nix
index 031e2aa1a914..094483da660a 100644
--- a/pkgs/development/libraries/libpng/12.nix
+++ b/pkgs/development/libraries/libpng/12.nix
@@ -3,11 +3,11 @@
 assert zlib != null;
 
 stdenv.mkDerivation rec {
-  name = "libpng-1.2.50";
+  name = "libpng-1.2.51";
 
   src = fetchurl {
     url = "mirror://sourceforge/libpng/${name}.tar.xz";
-    sha256 = "1rz8v3cvy1zzpagxn91lj8swb9vf75rz3yyi18v7zb4jihgzh927";
+    sha256 = "0jkdlmnvn72jwm94dp98pznm9fy7alvcr2zpfh2dgbr2n09vimy7";
   };
 
   propagatedBuildInputs = [ zlib ];
diff --git a/pkgs/development/libraries/libpng/15.nix b/pkgs/development/libraries/libpng/15.nix
index 8f62ef1e8dc9..153517986334 100644
--- a/pkgs/development/libraries/libpng/15.nix
+++ b/pkgs/development/libraries/libpng/15.nix
@@ -3,11 +3,11 @@
 assert zlib != null;
 
 stdenv.mkDerivation rec {
-  name = "libpng-1.5.15";
+  name = "libpng-1.5.18";
 
   src = fetchurl {
     url = "mirror://sourceforge/libpng/${name}.tar.xz";
-    sha256 = "1iaplghmv5qhd4dgwfymhp42sh27vz6s2107jk698xm57z2v9hwm";
+    sha256 = "119m71p60iq3yn2n8ckl4j4cxvbpddj6sgdpa6g05jzyg7vw54y0";
   };
 
   propagatedBuildInputs = [ zlib ];
diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix
index c1655bf7f2bd..52aaeaf93a46 100644
--- a/pkgs/development/libraries/libpng/default.nix
+++ b/pkgs/development/libraries/libpng/default.nix
@@ -3,11 +3,11 @@
 assert zlib != null;
 
 let
-  version = "1.6.9";
-  sha256 = "0ji7488fp08b3xa6605zzghzpxawkhhg6jbqzrdw2y38zrvadqzx";
+  version = "1.6.10";
+  sha256 = "0mjsfxc18478y1jxrs3snmx7mvckmghvki9gfhmhl49n1vyz00s0";
   patch_src = fetchurl {
     url = "mirror://sourceforge/libpng-apng/libpng-${version}-apng.patch.gz";
-    sha256 = "0l61y6b03avyxrx8c72x8m73j3b8mj0wx80wdl6w82wgnr2fw4x1";
+    sha256 = "0512q27c26ajzqm2qzmmc7q1frj7cjylls2hxy3y3wg2r6ryizw8";
   };
   whenPatched = stdenv.lib.optionalString apngSupport;
 
diff --git a/pkgs/development/libraries/readline/readline6.3.nix b/pkgs/development/libraries/readline/readline6.3.nix
new file mode 100644
index 000000000000..2f99b9d72183
--- /dev/null
+++ b/pkgs/development/libraries/readline/readline6.3.nix
@@ -0,0 +1,49 @@
+{ fetchurl, stdenv, ncurses }:
+
+stdenv.mkDerivation (rec {
+  name = "readline-6.3";
+
+  src = fetchurl {
+    url = "mirror://gnu/readline/${name}.tar.gz";
+    sha256 = "0hzxr9jxqqx5sxsv9vmlxdnvlr9vi4ih1avjb869hbs6p5qn1fjn";
+  };
+
+  propagatedBuildInputs = [ncurses];
+
+  patchFlags = "-p0";
+
+  patches =
+    [ ./link-against-ncurses.patch ];
+
+  meta = {
+    description = "GNU Readline, a library for interactive line editing";
+
+    longDescription = ''
+      The GNU Readline library provides a set of functions for use by
+      applications that allow users to edit command lines as they are
+      typed in.  Both Emacs and vi editing modes are available.  The
+      Readline library includes additional functions to maintain a
+      list of previously-entered command lines, to recall and perhaps
+      reedit those lines, and perform csh-like history expansion on
+      previous commands.
+
+      The history facilites are also placed into a separate library,
+      the History library, as part of the build process.  The History
+      library may be used without Readline in applications which
+      desire its capabilities.
+    '';
+
+    homepage = http://savannah.gnu.org/projects/readline/;
+
+    license = "GPLv3+";
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
+  };
+}
+
+//
+
+# Don't run the native `strip' when cross-compiling.
+(if (stdenv ? cross)
+ then { dontStrip = true; }
+ else { }))
diff --git a/pkgs/development/libraries/ruby_ncursesw_sup/default.nix b/pkgs/development/libraries/ruby_ncursesw_sup/default.nix
index 67041ad06078..8d55bafeb20d 100644
--- a/pkgs/development/libraries/ruby_ncursesw_sup/default.nix
+++ b/pkgs/development/libraries/ruby_ncursesw_sup/default.nix
@@ -1,11 +1,12 @@
 { stdenv, fetchurl, ncurses, ruby, rubygems }:
 
 stdenv.mkDerivation rec {
-  name = ''ncursesw-sup-afd962b9c06108ff0643e98593c5605314d76917'';
+  name = "ncursesw-sup-${version}";
+  version = "1.4.6";
 
   src = fetchurl {
-    url = "https://github.com/sup-heliotrope/ncursesw-ruby/archive/afd962b9c06108ff0643e98593c5605314d76917.tar.gz";
-    sha256 = "13i286p4bm8zqg9xh96a1dg7wkywj9m6975gbh3w43d3rmfc1h6a";
+    url = "https://github.com/sup-heliotrope/ncursesw-ruby/archive/v${version}.tar.gz";
+    sha256 = "1fzmj5kqh2aql7r7jys8cyf7mb78kz71yc4a6gh74h9s8pybyhh7";
   };
 
   meta = {
@@ -32,12 +33,12 @@ stdenv.mkDerivation rec {
     # For some reason, the installation phase doesn't work with the default
     # make install command run by gem (we'll fix it and do it ourselves later)
     gem install --no-verbose --install-dir "$out/${ruby.gemPath}" \
-        --bindir "$out/bin" --no-rdoc --no-ri ncursesw-sup-1.3.1.2.gem || true
+        --bindir "$out/bin" --no-rdoc --no-ri ncursesw-${version}.gem || true
 
     # Needed for ruby to recognise the gem
     cp ncursesw.gemspec "$out/${ruby.gemPath}/specifications"
 
-    cd "$out/${ruby.gemPath}/gems/ncursesw-sup-1.3.1.2"
+    cd "$out/${ruby.gemPath}/gems/ncursesw-${version}"
     mkdir src
     mv lib src
     sed -i "s/srcdir = ./srcdir = src/" Makefile
diff --git a/pkgs/development/libraries/serd/default.nix b/pkgs/development/libraries/serd/default.nix
index 63733a35b204..2fd5c9ad493d 100644
--- a/pkgs/development/libraries/serd/default.nix
+++ b/pkgs/development/libraries/serd/default.nix
@@ -22,6 +22,6 @@ stdenv.mkDerivation rec {
     description = "A lightweight C library for RDF syntax which supports reading and writing Turtle and NTriples";
     license = licenses.mit;
     maintainers = [ maintainers.goibhniu ];
-
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/sord/default.nix b/pkgs/development/libraries/sord/default.nix
index 0f2326420cbb..8f122cb699ac 100644
--- a/pkgs/development/libraries/sord/default.nix
+++ b/pkgs/development/libraries/sord/default.nix
@@ -22,6 +22,6 @@ stdenv.mkDerivation rec {
     description = "A lightweight C library for storing RDF data in memory";
     license = licenses.mit;
     maintainers = [ maintainers.goibhniu ];
-
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/thrift/default.nix b/pkgs/development/libraries/thrift/default.nix
index 0153cfa62ace..e1129d25ef4e 100644
--- a/pkgs/development/libraries/thrift/default.nix
+++ b/pkgs/development/libraries/thrift/default.nix
@@ -15,6 +15,10 @@ stdenv.mkDerivation {
 
   enableParallelBuilding = true;
 
+  # Workaround to make the python wrapper not drop this package:
+  # pythonFull.override { extraLibs = [ thrift ]; }
+  pythonPath = [];
+
   buildInputs = [
     boost zlib libevent openssl python automake autoconf libtool pkgconfig
     bison flex
diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix
index 3ecf2ae46994..ac7b8adfd8ca 100644
--- a/pkgs/development/ocaml-modules/batteries/default.nix
+++ b/pkgs/development/ocaml-modules/batteries/default.nix
@@ -1,32 +1,18 @@
 {stdenv, fetchurl, ocaml, findlib, camomile, ounit}:
 
-let
-  ocaml_version = (builtins.parseDrvName ocaml.name).version;
-in
-
 stdenv.mkDerivation {
-  name = "ocaml-batteries-1.4.1";
+  name = "ocaml-batteries-2.2.0";
 
   src = fetchurl {
-    url = http://forge.ocamlcore.org/frs/download.php/684/batteries-1.4.1.tar.gz;
-    sha256 = "bdca7deba290d83c66c0a5001da52b2d7f2af58b7b7e7d9303d4363aaafe9c30";
+    url = http://forge.ocamlcore.org/frs/download.php/1363/batteries-2.2.tar.gz;
+    sha256 = "0z4wg357fzz7cnarjsrrdnpmxw8mxcj10fp67dm3bnn0l3zkjwbs";
   };
 
   buildInputs = [ocaml findlib camomile ounit];
 
-  patchPhase = ''
-    substituteInPlace Makefile --replace '/bin/echo -n' echo
-  '';
-
   configurePhase = "true"; 	# Skip configure
 
-  preInstall = ''
-    mkdir -p "$out/lib/ocaml/${ocaml_version}/site-lib"
-  '';
-
-  doCheck = true;
-
-  checkTarget = "test";
+  createFindlibDestdir = true;
 
   meta = {
     homepage = http://batteries.forge.ocamlcore.org/;
@@ -36,7 +22,7 @@ stdenv.mkDerivation {
       and comprehensive development platform for the OCaml programming
       language.
     '';
-    license = "LGPL";
+    license = stdenv.lib.licenses.lgpl21;
     platforms = ocaml.meta.platforms;
     maintainers = [
       stdenv.lib.maintainers.z77z
diff --git a/pkgs/development/ocaml-modules/extlib/default.nix b/pkgs/development/ocaml-modules/extlib/default.nix
index 41620b9424f8..8b977dd7c525 100644
--- a/pkgs/development/ocaml-modules/extlib/default.nix
+++ b/pkgs/development/ocaml-modules/extlib/default.nix
@@ -1,21 +1,21 @@
 {stdenv, fetchurl, ocaml, findlib}:
 
 stdenv.mkDerivation {
-  name = "ocaml-extlib-1.5.3";
+  name = "ocaml-extlib-1.6.1";
 
   src = fetchurl {
-    url = http://ocaml-extlib.googlecode.com/files/extlib-1.5.3.tar.gz;
-    sha256 = "c095eef4202a8614ff1474d4c08c50c32d6ca82d1015387785cf03d5913ec021";
+    url = http://ocaml-extlib.googlecode.com/files/extlib-1.6.1.tar.gz;
+    sha256 = "1jmfj2w0f3ap0swz8k3qqmrl6x2y4gkmg88vv024xnmliiiv7m48";
   };
 
   buildInputs = [ocaml findlib];
 
   createFindlibDestdir = true;
 
-  buildPhase = ''
-    make all
-    make opt
-  '';
+  configurePhase = "true";      # Skip configure
+  # De facto, option minimal=1 seems to be the default.  See the README.
+  buildPhase     = "make minimal=1 build";
+  installPhase   = "make minimal=1 install";
 
   meta = {
     homepage = http://code.google.com/p/ocaml-extlib/;
diff --git a/pkgs/development/ocaml-modules/ocamlnet/default.nix b/pkgs/development/ocaml-modules/ocamlnet/default.nix
index c1960d4706e4..f1bf39a283d6 100644
--- a/pkgs/development/ocaml-modules/ocamlnet/default.nix
+++ b/pkgs/development/ocaml-modules/ocamlnet/default.nix
@@ -1,20 +1,20 @@
-{stdenv, fetchurl, ncurses, ocaml, findlib, ocaml_pcre, camlzip, openssl, ocaml_ssl, lablgtk, cryptokit }:
+{stdenv, fetchurl, ncurses, ocaml, findlib, ocaml_pcre, camlzip, openssl, ocaml_ssl, cryptokit }:
 
 let
   ocaml_version = (builtins.parseDrvName ocaml.name).version;
 in
 
 stdenv.mkDerivation {
-  name = "ocamlnet-3.6.3";
+  name = "ocamlnet-3.7.3";
 
   src = fetchurl {
-    url = http://download.camlcity.org/download/ocamlnet-3.6.3.tar.gz;
-    sha256 = "c62fe0a4db6c63c04e24c8d76bcb504054f0b59a7a41c1abcbb8dd504afc9f29";
+    url = http://download.camlcity.org/download/ocamlnet-3.7.3.tar.gz;
+    sha256 = "0s24icyrxkqqai91rgxpf52s1fx70j7p12c8vq9vcmvdhll6kp2d";
   };
 
-  buildInputs = [ncurses ocaml findlib ocaml_pcre camlzip openssl ocaml_ssl lablgtk cryptokit];
+  buildInputs = [ncurses ocaml findlib ocaml_pcre camlzip openssl ocaml_ssl cryptokit];
 
-  propagatedbuildInputs = [ncurses ocaml_pcre camlzip openssl ocaml_ssl lablgtk cryptokit];
+  propagatedbuildInputs = [ncurses ocaml_pcre camlzip openssl ocaml_ssl cryptokit];
 
   patches = [ ./configure.patch ];
 
diff --git a/pkgs/development/ocaml-modules/odn/default.nix b/pkgs/development/ocaml-modules/odn/default.nix
new file mode 100644
index 000000000000..5f72afcf7666
--- /dev/null
+++ b/pkgs/development/ocaml-modules/odn/default.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchurl, ocaml, findlib, ocaml_typeconv, ounit}:
+
+stdenv.mkDerivation {
+  name = "ocaml-data-notation-0.0.11";
+
+  src = fetchurl {
+    url = https://forge.ocamlcore.org/frs/download.php/1310/ocaml-data-notation-0.0.11.tar.gz;
+    sha256 = "09a8zdyifpc2nl4hdvg9206142y31cq95ajgij011s1qcg3z93lj";
+  };
+
+  buildInputs = [ocaml findlib ocaml_typeconv ounit];
+
+  createFindlibDestdir = true;
+
+  configurePhase = "ocaml setup.ml -configure";
+  buildPhase     = "ocaml setup.ml -build";
+  installPhase   = "ocaml setup.ml -install";
+
+  meta = {
+    description = "Store data using OCaml notation";
+    homepage = https://forge.ocamlcore.org/projects/odn/;
+    license = stdenv.lib.licenses.lgpl21;
+    platforms = ocaml.meta.platforms;
+    maintainers = with stdenv.lib.maintainers; [
+      z77z
+    ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/react/default.nix b/pkgs/development/ocaml-modules/react/default.nix
index 02420204dbfa..a69ef9d446c2 100644
--- a/pkgs/development/ocaml-modules/react/default.nix
+++ b/pkgs/development/ocaml-modules/react/default.nix
@@ -1,34 +1,25 @@
-{stdenv, fetchurl, ocaml}:
-
-let
-  ocaml_version = (builtins.parseDrvName ocaml.name).version;
-  version = "0.9.2";
-in
+{stdenv, fetchurl, ocaml, findlib, ocaml_oasis}:
 
 stdenv.mkDerivation {
-  name = "ocaml-react-${version}";
+  name = "ocaml-react-0.9.4";
 
   src = fetchurl {
-    url = "http://erratique.ch/software/react/releases/react-${version}.tbz";
-    sha256 = "0fiaxzfxv8pc82d31jz85zryz06k84is0l3sn5g0di5mpc5falxr";
+    url = http://github.com/dbuenzli/react/archive/v0.9.4.tar.gz;
+    sha256 = "16k0kx93kd45s7pigkzvirfsbr22xhby0y88y86p473qxzc6ngrm";
   };
 
-  buildInputs = [ocaml];
+  buildInputs = [ocaml findlib ocaml_oasis];
+
+  createFindlibDestdir = true;
 
-  buildCommand = ''
-    export INSTALLDIR=$out/lib/ocaml/${ocaml_version}/site-lib/react
-    tar xjf $src
-    cd react-*
-    substituteInPlace src/META --replace '+react' $INSTALLDIR
-    chmod +x build
-    ./build 
-    ./build install
-  '';
+  configurePhase = "oasis setup && ocaml setup.ml -configure --prefix $out";
+  buildPhase     = "ocaml setup.ml -build";
+  installPhase   = "ocaml setup.ml -install";
 
   meta = {
     homepage = http://erratique.ch/software/react;
     description = "Applicative events and signals for OCaml";
-    license = "BSD";
+    license = stdenv.lib.licenses.bsd3;
     platforms = ocaml.meta.platforms;
     maintainers = [
       stdenv.lib.maintainers.z77z
diff --git a/pkgs/development/ocaml-modules/typeconv/3.0.5.nix b/pkgs/development/ocaml-modules/typeconv/3.0.5.nix
new file mode 100644
index 000000000000..299e7729b91e
--- /dev/null
+++ b/pkgs/development/ocaml-modules/typeconv/3.0.5.nix
@@ -0,0 +1,23 @@
+{stdenv, fetchurl, ocaml, findlib}:
+
+# note: works only with ocaml >3.12
+
+stdenv.mkDerivation {
+  name = "ocaml-typeconv-3.0.5";
+
+  src = fetchurl {
+    url = "http://forge.ocamlcore.org/frs/download.php/821/type_conv-3.0.5.tar.gz";
+    sha256 = "90ac6c401a600a23012a3f513def6f67d4979b11bd551f4d0af78f0f0b479198";
+  };
+
+  buildInputs = [ocaml findlib ]; 
+
+  createFindlibDestdir = true;
+
+  meta = {
+    homepage = "http://forge.ocamlcore.org/projects/type-conv/";
+    description = "Support library for OCaml preprocessor type conversions";
+    license = "LGPL";
+    platforms = ocaml.meta.platforms;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/typeconv/default.nix b/pkgs/development/ocaml-modules/typeconv/default.nix
index 299e7729b91e..33e30f5d5c8e 100644
--- a/pkgs/development/ocaml-modules/typeconv/default.nix
+++ b/pkgs/development/ocaml-modules/typeconv/default.nix
@@ -1,13 +1,11 @@
 {stdenv, fetchurl, ocaml, findlib}:
 
-# note: works only with ocaml >3.12
-
 stdenv.mkDerivation {
-  name = "ocaml-typeconv-3.0.5";
+  name = "ocaml-typeconv-109.60.01";
 
   src = fetchurl {
-    url = "http://forge.ocamlcore.org/frs/download.php/821/type_conv-3.0.5.tar.gz";
-    sha256 = "90ac6c401a600a23012a3f513def6f67d4979b11bd551f4d0af78f0f0b479198";
+    url = https://github.com/janestreet/type_conv/archive/109.60.01.tar.gz;
+    sha256 = "0lpxri68glgq1z2pp02rp45cb909xywbff8d4idljrf6fzzil2zx";
   };
 
   buildInputs = [ocaml findlib ]; 
@@ -17,7 +15,8 @@ stdenv.mkDerivation {
   meta = {
     homepage = "http://forge.ocamlcore.org/projects/type-conv/";
     description = "Support library for OCaml preprocessor type conversions";
-    license = "LGPL";
+    license = stdenv.lib.licenses.lgpl21;
     platforms = ocaml.meta.platforms;
+    maintainers = with stdenv.lib.maintainers; [ z77z ];
   };
 }
diff --git a/pkgs/development/tools/continuous-integration/jenkins/default.nix b/pkgs/development/tools/continuous-integration/jenkins/default.nix
new file mode 100644
index 000000000000..5194684261c9
--- /dev/null
+++ b/pkgs/development/tools/continuous-integration/jenkins/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "jenkins";
+  version = "1.550";
+
+  src = fetchurl {
+    url = "http://mirrors.jenkins-ci.org/war/${version}/jenkins.war";
+    sha256 = "1ziimbfs9kylga0xmxlfsfcc7qsirs5bnx00pa99m2l5sz2ki793";
+  };
+  meta = {
+    description = "An extendable open source continuous integration server.";
+    homepage = http://jenkins-ci.org;
+    license = stdenv.lib.licenses.mit;
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.coconnor ];
+  };
+
+  buildCommand = "ln -s $src $out";
+}
diff --git a/pkgs/development/tools/haskell/HaRe/default.nix b/pkgs/development/tools/haskell/HaRe/default.nix
index 6c128c25073e..883be6a8d411 100644
--- a/pkgs/development/tools/haskell/HaRe/default.nix
+++ b/pkgs/development/tools/haskell/HaRe/default.nix
@@ -7,8 +7,8 @@
 
 cabal.mkDerivation (self: {
   pname = "HaRe";
-  version = "0.7.1.4";
-  sha256 = "000vdvm38a3d3jpjg3cgsfl11w8jzvl0haqz78fy3zblqlndxy1m";
+  version = "0.7.1.6";
+  sha256 = "1nj70f7ki6wxvjm5ra83xr2yymfsakb5kg2q1dl54hvxsd0wqcw7";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
diff --git a/pkgs/development/tools/haskell/hlint/default.nix b/pkgs/development/tools/haskell/hlint/default.nix
index 860148cf244d..72ba1ba6b87b 100644
--- a/pkgs/development/tools/haskell/hlint/default.nix
+++ b/pkgs/development/tools/haskell/hlint/default.nix
@@ -1,15 +1,16 @@
-{ cabal, cpphs, filepath, haskellSrcExts, hscolour, transformers
-, uniplate
+{ cabal, cmdargs, cpphs, filepath, haskellSrcExts, hscolour
+, transformers, uniplate
 }:
 
 cabal.mkDerivation (self: {
   pname = "hlint";
-  version = "1.8.57";
-  sha256 = "062fpyjd3mha9faxdpg763sigafl4mvl8qqw3z31zkafz361qzm4";
+  version = "1.8.59";
+  sha256 = "14yn63zbbqwvxlis0kwga4mrz6qjr8kq1cq7f0rcilgqgh1dkwh8";
   isLibrary = true;
   isExecutable = true;
   buildDepends = [
-    cpphs filepath haskellSrcExts hscolour transformers uniplate
+    cmdargs cpphs filepath haskellSrcExts hscolour transformers
+    uniplate
   ];
   jailbreak = true;
   meta = {
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix
index 0d3eb5c824fa..b3a86a03d97c 100644
--- a/pkgs/development/tools/misc/gdb/default.nix
+++ b/pkgs/development/tools/misc/gdb/default.nix
@@ -8,7 +8,7 @@
 
 let
 
-  basename = "gdb-7.6.2";
+  basename = "gdb-7.7";
 
   # Whether (cross-)building for GNU/Hurd.  This is an approximation since
   # having `stdenv ? cross' doesn't tell us if we're building `crossDrv' and
@@ -27,9 +27,11 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://gnu/gdb/${basename}.tar.bz2";
-    sha256 = "1s6hjqmq7xz10hqx45dgrpfh5mla578shn3zxgnrsv66w4n0wsig";
+    sha256 = "08vcb97j1b7vxwq6088wb6s3g3bm8iwikd922y0xsgbbxv3d2104";
   };
 
+  patches = [ ./edit-signals.patch ];
+
   # I think python is not a native input, but I leave it
   # here while I will not need it cross building
   nativeBuildInputs = [ texinfo python ]
diff --git a/pkgs/development/tools/misc/gdb/edit-signals.patch b/pkgs/development/tools/misc/gdb/edit-signals.patch
new file mode 100644
index 000000000000..e9da8035ef5b
--- /dev/null
+++ b/pkgs/development/tools/misc/gdb/edit-signals.patch
@@ -0,0 +1,25 @@
+Patch adapted from
+https://www.sourceware.org/ml/gdb-patches/2012-08/msg00439.html
+
+Without it, spawning a terminal 'vim' from gdb 'edit' cmd, makes
+all gdb grazy.
+
+diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
+index 7ea0fec..be5455c 100644
+--- a/gdb/tui/tui-win.c
++++ b/gdb/tui/tui-win.c
+@@ -831,11 +831,12 @@ void
+ tui_initialize_win (void)
+ {
+ #ifdef SIGWINCH
+-#ifdef HAVE_SIGACTION
++#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
+   struct sigaction old_winch;
+ 
+-  memset (&old_winch, 0, sizeof (old_winch));
++  sigemptyset (&old_winch.sa_mask);
+   old_winch.sa_handler = &tui_sigwinch_handler;
++  old_winch.sa_flags = SA_RESTART;
+   sigaction (SIGWINCH, &old_winch, NULL);
+ #else
+   signal (SIGWINCH, &tui_sigwinch_handler);
diff --git a/pkgs/development/tools/ocaml/oasis/default.nix b/pkgs/development/tools/ocaml/oasis/default.nix
new file mode 100644
index 000000000000..3ab935705a2d
--- /dev/null
+++ b/pkgs/development/tools/ocaml/oasis/default.nix
@@ -0,0 +1,32 @@
+{stdenv, fetchurl, ocaml, findlib, ocaml_data_notation, ocaml_typeconv,
+ ocamlmod, ocamlify, ounit, expect}:
+
+stdenv.mkDerivation {
+  name = "ocaml-oasis-0.4.1";
+
+  src = fetchurl {
+    url = http://forge.ocamlcore.org/frs/download.php/1355/oasis-0.4.1.tar.gz;
+    sha256 = "1lsnw9f1jh6106kphxg40qp0sia6cbkbb9ahs5y6ifnfkmllkjhj";
+  };
+
+  createFindlibDestdir = true;
+
+  buildInputs =
+    [
+      ocaml findlib ocaml_data_notation ocaml_typeconv ocamlmod ocamlify ounit
+    ];
+
+  configurePhase = "ocaml setup.ml -configure --prefix $out";
+  buildPhase     = "ocaml setup.ml -build";
+  installPhase   = "ocaml setup.ml -install";
+
+  meta = {
+    homepage = http://oasis.forge.ocamlcore.org/;
+    description = "Configure, build and install system for OCaml projects";
+    license = stdenv.lib.licenses.lgpl21;
+    platforms = ocaml.meta.platforms;
+    maintainers = with stdenv.lib.maintainers; [
+      z77z
+    ];
+  };
+}
diff --git a/pkgs/development/tools/ocaml/ocamlify/default.nix b/pkgs/development/tools/ocaml/ocamlify/default.nix
new file mode 100644
index 000000000000..88b7451e0f00
--- /dev/null
+++ b/pkgs/development/tools/ocaml/ocamlify/default.nix
@@ -0,0 +1,26 @@
+{stdenv, fetchurl, ocaml, findlib, ounit}:
+
+stdenv.mkDerivation {
+  name = "ocamlify-0.0.2";
+
+  src = fetchurl {
+    url = http://forge.ocamlcore.org/frs/download.php/1209/ocamlify-0.0.2.tar.gz;
+    sha256 = "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii";
+  };
+
+  buildInputs = [ocaml findlib ounit];
+
+  configurePhase = "ocaml setup.ml -configure --prefix $out";
+  buildPhase     = "ocaml setup.ml -build";
+  installPhase   = "ocaml setup.ml -install";
+
+  meta = {
+    homepage = http://forge.ocamlcore.org/projects/ocamlmod/ocamlmod;
+    description = "Generate OCaml modules from source files";
+    platforms = ocaml.meta.platforms;
+    license = stdenv.lib.licenses.lgpl21;
+    maintainers = with stdenv.lib.maintainers; [
+      z77z
+    ];
+  };
+}
diff --git a/pkgs/development/tools/ocaml/ocamlmod/default.nix b/pkgs/development/tools/ocaml/ocamlmod/default.nix
new file mode 100644
index 000000000000..d72df18f8992
--- /dev/null
+++ b/pkgs/development/tools/ocaml/ocamlmod/default.nix
@@ -0,0 +1,25 @@
+{stdenv, fetchurl, ocaml, findlib, ounit}:
+
+stdenv.mkDerivation {
+  name = "ocamlmod-0.0.7";
+
+  src = fetchurl {
+    url = http://forge.ocamlcore.org/frs/download.php/1350/ocamlmod-0.0.7.tar.gz;
+    sha256 = "11kg7wh0gy492ma5c6bcjh6frv1a9lh9f26hiys2i0d1ky8s0ad3";
+  };
+
+  buildInputs = [ocaml findlib ounit];
+
+  configurePhase = "ocaml setup.ml -configure --prefix $out";
+  buildPhase     = "ocaml setup.ml -build";
+  installPhase   = "ocaml setup.ml -install";
+
+  meta = {
+    homepage = http://forge.ocamlcore.org/projects/ocamlmod/ocamlmod;
+    description = "Generate OCaml modules from source files";
+    platforms = ocaml.meta.platforms;
+    maintainers = with stdenv.lib.maintainers; [
+      z77z
+    ];
+  };
+}
diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix
index bbe213782485..90f7647aa05f 100644
--- a/pkgs/development/tools/selenium/chromedriver/default.nix
+++ b/pkgs/development/tools/selenium/chromedriver/default.nix
@@ -31,5 +31,6 @@ stdenv.mkDerivation rec {
     description = "A WebDriver server for running Selenium tests on Chrome";
     license = licenses.bsd3;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/games/planetaryannihilation/default.nix b/pkgs/games/planetaryannihilation/default.nix
new file mode 100755
index 000000000000..009d07d4456c
--- /dev/null
+++ b/pkgs/games/planetaryannihilation/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, config, fetchurl, patchelf, makeWrapper, xlibs, gtk, glib, udev, alsaLib, atk
+, nspr, fontconfig, cairo, pango, nss, freetype, gnome3, gdk_pixbuf, curl, systemd, xorg }:
+
+# TODO: use dynamic attributes once Nix 1.7 is out
+assert ((config.planetary_annihilation or null).url or null) != null;
+assert ((config.planetary_annihilation or null).sha256 or null) != null;
+
+/* to setup:
+ $ cat ~/.nixpkgs/config.nix
+ {
+  planetary_annihilation = {
+    url = "file:///home/user/PA_Linux_62857.tar.bz2";
+    sha256 = "0imi3k5144dsn3ka9khx3dj76klkw46ga7m6rddqjk4yslwabh3k";
+  };
+}
+*/
+
+stdenv.mkDerivation {
+  name = "planetary-annihalation";
+
+  src = fetchurl {
+    inherit (config.planetary_annihilation) url sha256;
+  };
+
+  buildInputs = [ patchelf makeWrapper ];
+ 
+  installPhase = ''
+    mkdir -p $out/{bin,lib}
+
+    cp -R * $out/
+    mv $out/*.so $out/lib
+    rm $out/libstdc++.so.6
+    ln -s $out/PA $out/bin/PA
+
+    ln -s ${systemd}/lib/libudev.so.1 $out/lib/libudev.so.0
+
+    patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" "$out/PA"
+    patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.gcc.gcc xlibs.libXdamage xorg.libXfixes gtk glib stdenv.glibc "$out" xlibs.libXext pango udev xlibs.libX11 xlibs.libXcomposite alsaLib atk nspr fontconfig cairo pango nss freetype gnome3.gconf gdk_pixbuf xlibs.libXrender ]}:{stdenv.gcc.gcc}/lib64:${stdenv.glibc}/lib64" "$out/host/CoherentUI_Host.bin" 
+
+    wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.gcc.gcc stdenv.glibc xlibs.libX11 xlibs.libXcursor gtk glib curl "$out" ]}:${stdenv.gcc.gcc}/lib64:${stdenv.glibc}/lib64"
+
+    for f in $out/lib/*; do
+      patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.gcc.gcc curl xlibs.libX11 stdenv.glibc xlibs.libXcursor "$out" ]}:${stdenv.gcc.gcc}/lib64:${stdenv.glibc}/lib64" $f
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://www.uberent.com/pa/;
+    description = "next-generation RTS that takes the genre to a planetary scale";
+    license = "unfree";
+    platforms = platforms.linux;
+    maintainers = [ maintainers.iElectric ];
+  };
+}
diff --git a/pkgs/misc/themes/gtk2/oxygen-gtk/default.nix b/pkgs/misc/themes/gtk2/oxygen-gtk/default.nix
index 88807ab6deaa..1bd4d5f35b4a 100644
--- a/pkgs/misc/themes/gtk2/oxygen-gtk/default.nix
+++ b/pkgs/misc/themes/gtk2/oxygen-gtk/default.nix
@@ -19,5 +19,6 @@ stdenv.mkDerivation rec {
     homepage = https://projects.kde.org/projects/playground/artwork/oxygen-gtk;
     license = licenses.lgpl2;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix
index 40a0d7af4968..f410f25e8cb7 100644
--- a/pkgs/misc/vim-plugins/default.nix
+++ b/pkgs/misc/vim-plugins/default.nix
@@ -109,10 +109,13 @@ in rec
   };
 
   YouCompleteMe = stdenv.mkDerivation {
-    # REGION AUTO UPDATE: { name="youcompleteme"; type="git"; url="git://github.com/Valloric/YouCompleteMe"; }
-    src = (fetchurl { url = "http://mawercer.de/~nix/repos/youcompleteme-git-97306.tar.bz2"; sha256 = "b9b892f5a723370c2034491dc72a4ca722c6cf1e5de4d60501141bba151bc719"; });
-    name = "youcompleteme-git-97306";
-    # END
+    src = fetchgit {
+      url = "https://github.com/Valloric/YouCompleteMe.git";
+      rev = "ee12530df0574e18289d6daf25ff72bd3c6e94f5";
+      sha256 = "1z93l2v0s078h632jrlhxzs9pg8phnx60qlrrhb3l2nbfk047rgx";
+    };
+
+    name = "youcompleteme-git-ee12530df0";
     buildInputs = [ python cmake ];
 
     configurePhase = ":";
diff --git a/pkgs/os-specific/linux/acpid/default.nix b/pkgs/os-specific/linux/acpid/default.nix
index a0ae59a5a5bb..c9d45835cfd0 100644
--- a/pkgs/os-specific/linux/acpid/default.nix
+++ b/pkgs/os-specific/linux/acpid/default.nix
@@ -1,11 +1,11 @@
 {stdenv, fetchurl}:
 
 stdenv.mkDerivation rec {
-  name = "acpid-2.0.21";
+  name = "acpid-2.0.22";
 
   src = fetchurl {
     url = "mirror://sourceforge/acpid2/${name}.tar.xz";
-    sha256 = "0vv3zz8p3wxhlp35aqgqvzn6lda595wzn7php3k47jwci1cpxrn4";
+    sha256 = "0cdbcy5xjdcyp2x6hzgpv6a9vg9bbxmypmfvv1qzgj43897la49x";
   };
 
   preBuild = ''
diff --git a/pkgs/os-specific/linux/alsa-utils/default.nix b/pkgs/os-specific/linux/alsa-utils/default.nix
index 484ecd06bb0b..6167696f336c 100644
--- a/pkgs/os-specific/linux/alsa-utils/default.nix
+++ b/pkgs/os-specific/linux/alsa-utils/default.nix
@@ -1,12 +1,12 @@
 {stdenv, fetchurl, alsaLib, gettext, ncurses, libsamplerate}:
 
 stdenv.mkDerivation rec {
-  name = "alsa-utils-1.0.27";
+  name = "alsa-utils-1.0.27.2";
 
   src = fetchurl {
     # url = "ftp://ftp.alsa-project.org/pub/utils/${name}.tar.bz2";
     url = "http://alsa.cybermirror.org/utils/${name}.tar.bz2";
-    sha256 = "1vssljbdzf0psqhhd7w9m9mzb0sl2kgx9fagkja25sqw6ivwsxkg";
+    sha256 = "1sjjngnq50jv5ilwsb4zys6smifni3bd6fn28gbnhfrg14wsrgq2";
   };
 
   buildInputs = [ alsaLib ncurses libsamplerate ];
@@ -16,12 +16,6 @@ stdenv.mkDerivation rec {
 
   installFlags = "ASOUND_STATE_DIR=$(TMPDIR)/dummy";
 
-  preConfigure =
-    ''
-      # Ensure that ‘90-alsa-restore.rules.in’ gets rebuilt.
-      rm alsactl/90-alsa-restore.rules
-    '';
-
   meta = {
     homepage = http://www.alsa-project.org/;
     description = "ALSA, the Advanced Linux Sound Architecture utils";
diff --git a/pkgs/os-specific/linux/bluez/bluez5.nix b/pkgs/os-specific/linux/bluez/bluez5.nix
index 4938f7f44706..ffa91e951a8d 100644
--- a/pkgs/os-specific/linux/bluez/bluez5.nix
+++ b/pkgs/os-specific/linux/bluez/bluez5.nix
@@ -5,11 +5,11 @@
 assert stdenv.isLinux;
 
 stdenv.mkDerivation rec {
-  name = "bluez-5.12";
+  name = "bluez-5.16";
    
   src = fetchurl {
     url = "mirror://kernel/linux/bluetooth/${name}.tar.xz";
-    sha256 = "0zk183gjsxissq9gma962cyvyqxydai8n6jgslxx0mpk2m7mgvvm";
+    sha256 = "0qxivd64az3qziw82axj2ksilllxq4fnb6fdrnlxr6d74550kmf8";
   };
 
   pythonPath = with pythonPackages;
@@ -71,6 +71,7 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     homepage = http://www.bluez.org/;
+    repositories.git = https://git.kernel.org/pub/scm/bluetooth/bluez.git;
     description = "Bluetooth support for Linux";
     platforms = platforms.linux;
   };
diff --git a/pkgs/os-specific/linux/checksec/default.nix b/pkgs/os-specific/linux/checksec/default.nix
index 0f3b87361f83..4701d774dfdc 100644
--- a/pkgs/os-specific/linux/checksec/default.nix
+++ b/pkgs/os-specific/linux/checksec/default.nix
@@ -35,8 +35,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A tool for checking security bits on executables";
     homepage    = "http://www.trapkit.de/tools/checksec.html";
-    platforms   = stdenv.lib.platforms.linux;
     license     = stdenv.lib.licenses.bsd3;
+    platforms   = stdenv.lib.platforms.linux;
     maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/os-specific/linux/conky/default.nix b/pkgs/os-specific/linux/conky/default.nix
index 086b792b4cd4..3e95daba29e3 100644
--- a/pkgs/os-specific/linux/conky/default.nix
+++ b/pkgs/os-specific/linux/conky/default.nix
@@ -1,5 +1,33 @@
-{ stdenv, fetchurl, pkgconfig, libxml2, curl, wirelesstools, glib, openssl
-, ncurses }:
+{ stdenv, fetchurl, pkgconfig
+
+# dependencies
+, glib, ncurses
+
+# optional features without extra dependencies
+, mpdSupport   ? true
+
+# optional features with extra dependencies
+, x11Support   ? false, x11           ? null
+, xdamage      ? false, libXdamage    ? null
+, wireless     ? false, wirelesstools ? null
+, luaSupport   ? false, lua5          ? null
+
+, rss          ? false
+, weatherMetar ? false
+, weatherXoap  ? false
+, curl ? null, libxml2 ? null
+}:
+
+assert luaSupport -> lua5          != null;
+assert wireless   -> wirelesstools != null;
+assert x11Support -> x11           != null;
+assert xdamage    -> x11Support && libXdamage != null;
+
+assert rss          -> curl != null && libxml2 != null;
+assert weatherMetar -> curl != null;
+assert weatherXoap  -> curl != null && libxml2 != null;
+
+with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "conky-1.9.0";
@@ -9,17 +37,35 @@ stdenv.mkDerivation rec {
     sha256 = "0vxvjmi3cdvnp994sv5zcdyncfn0mlxa71p2wm9zpyrmy58bbwds";
   };
 
-  patches = [ ./stdbool.patch ];
+  buildInputs = [ pkgconfig glib ncurses ]
+    ++ optional  luaSupport   lua5
+    ++ optional  wireless     wirelesstools
+    ++ optional  x11Support   x11
+    ++ optional  xdamage      libXdamage
+
+    ++ optionals rss          [ curl libxml2 ]
+    ++ optional  weatherMetar curl
+    ++ optionals weatherXoap  [ curl libxml2 ]
+    ;
 
-  buildInputs = [ pkgconfig libxml2 curl wirelesstools glib openssl ncurses ];
   configureFlags =
-    (map (x: "--disable-${x}") [ "x11" "xdamage" "own-window" "xft" "lua" ])
-    ++ (map (x: "--enable-${x}") [ "mpd" "double-buffer" "wlan" "rss"
-                                   "weather-metar" "weather-xoap" ]);
+    let flag = state: flags: if state then map (x: "--enable-${x}")  flags
+                                      else map (x: "--disable-${x}") flags;
+     in flag mpdSupport   [ "mpd" ]
+
+     ++ flag luaSupport   [ "lua" ]
+     ++ flag wireless     [ "wlan" ]
+     ++ flag x11Support   [ "x11" "xft" "argb" "double-buffer" "own-window" ] # conky won't compile without --enable-own-window
+     ++ flag xdamage      [ "xdamage" ]
+
+     ++ flag rss          [ "rss" ]
+     ++ flag weatherMetar [ "weather-metar" ]
+     ++ flag weatherXoap  [ "weather-xoap" ]
+     ;
 
   meta = {
     homepage = http://conky.sourceforge.net/;
-    description = "Conky is an advanced, highly configurable system monitor complied without X based on torsmo";
+    description = "Conky is an advanced, highly configurable system monitor based on torsmo";
     maintainers = [ stdenv.lib.maintainers.guibert ];
     license = stdenv.lib.licenses.gpl3Plus;
   };
diff --git a/pkgs/os-specific/linux/conky/stdbool.patch b/pkgs/os-specific/linux/conky/stdbool.patch
deleted file mode 100644
index 3f0b714a1f0c..000000000000
--- a/pkgs/os-specific/linux/conky/stdbool.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/src/conky.c b/src/conky.c
-index 5848b61..69a3d45 100644
---- a/src/conky.c
-+++ b/src/conky.c
-@@ -34,6 +34,7 @@
- #include "common.h"
- #include "timed_thread.h"
- #include <stdarg.h>
-+#include <stdbool.h>
- #include <math.h>
- #include <time.h>
- #include <locale.h>
diff --git a/pkgs/os-specific/linux/criu/default.nix b/pkgs/os-specific/linux/criu/default.nix
new file mode 100644
index 000000000000..349d690e4d19
--- /dev/null
+++ b/pkgs/os-specific/linux/criu/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, protobuf, protobufc, asciidoc, xmlto, utillinux }:
+
+assert stdenv.system == "x86_64-linux";
+stdenv.mkDerivation rec {
+  name    = "criu-${version}";
+  version = "1.2";
+
+  src = fetchurl {
+    url    = "http://download.openvz.org/criu/${name}.tar.bz2";
+    sha256 = "04xlnqvgbjd5wfmi97m5rr76a3agkz8g96hdyzhc6x8gd52bbg9y";
+  };
+
+  enableParallelBuilding = true;
+  buildInputs = [ protobuf protobufc asciidoc xmlto ];
+
+  patchPhase = ''
+    chmod +w ./scripts/gen-offsets.sh
+    substituteInPlace ./scripts/gen-offsets.sh --replace hexdump ${utillinux}/bin/hexdump
+  '';
+
+  buildPhase = ''
+    make config PREFIX=$out
+    make PREFIX=$out
+  '';
+
+  installPhase = ''
+    mkdir -p $out/etc/logrotate.d
+    make install PREFIX=$out LIBDIR=$out/lib ASCIIDOC=${asciidoc}/bin/asciidoc XMLTO=${xmlto}/bin/xmlto
+  '';
+
+  meta = {
+    description = "userspace checkpoint/restore for Linux";
+    homepage    = "http://criu.org";
+    license     = stdenv.lib.licenses.gpl2;
+    platforms   = [ "x86_64-linux" ];
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+  };
+}
diff --git a/pkgs/os-specific/linux/ffado/default.nix b/pkgs/os-specific/linux/ffado/default.nix
index 834f98960dfb..e024a608a0b6 100644
--- a/pkgs/os-specific/linux/ffado/default.nix
+++ b/pkgs/os-specific/linux/ffado/default.nix
@@ -44,5 +44,6 @@ stdenv.mkDerivation rec {
     description = "FireWire audio drivers";
     license = licenses.gpl3;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/os-specific/linux/kernel/grsec-path.patch b/pkgs/os-specific/linux/kernel/grsec-path.patch
index be242779548f..6f59cf8d80bd 100644
--- a/pkgs/os-specific/linux/kernel/grsec-path.patch
+++ b/pkgs/os-specific/linux/kernel/grsec-path.patch
@@ -1,15 +1,17 @@
 diff --git a/kernel/kmod.c b/kernel/kmod.c
-index 3227c2c..f32c944 100644
+index 67f7981..03f127d 100644
 --- a/kernel/kmod.c
 +++ b/kernel/kmod.c
-@@ -246,8 +246,8 @@ static int ____call_usermodehelper(void *data)
+@@ -246,9 +246,9 @@ static int ____call_usermodehelper(void *data)
  	   out the path to be used prior to this point and are now operating
  	   on that copy
  	*/
 -	if ((strncmp(sub_info->path, "/sbin/", 6) && strncmp(sub_info->path, "/usr/lib/", 9) &&
--	     strncmp(sub_info->path, "/lib/", 5) && strncmp(sub_info->path, "/lib64/", 7)) || strstr(sub_info->path, "..")) {
+-	     strncmp(sub_info->path, "/lib/", 5) && strncmp(sub_info->path, "/lib64/", 7) &&
+-	     strcmp(sub_info->path, "/usr/share/apport/apport")) || strstr(sub_info->path, "..")) {
 +	if ((strncmp(sub_info->path, "/sbin/", 6) && strncmp(sub_info->path, "/nix/store/", 11) &&
-+	     strncmp(sub_info->path, "/run/current-system/systemd/lib/", 32)) || strstr(sub_info->path, "..")) {
++	     strncmp(sub_info->path, "/run/current-system/systemd/lib/", 32)) ||
++	     strstr(sub_info->path, "..")) {
  		printk(KERN_ALERT "grsec: denied exec of usermode helper binary %.950s located outside of /sbin and system library paths\n", sub_info->path);
  		retval = -EPERM;
  		goto fail;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.10.nix b/pkgs/os-specific/linux/kernel/linux-3.10.nix
index 748611ab1b5f..4c6e01271fbd 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.10.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.10.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "3.10.31";
+  version = "3.10.33";
   extraMeta.branch = "3.10";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-    sha256 = "1nz8203avjjin3sivx6h6ddsramk37vp02g9lw2ix3hxji0lsz1m";
+    sha256 = "0pdrzhdylan87nrhpz9dxx3da0008hkch4k1cjw46gg2jmxcryhh";
   };
 
   features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.12.nix b/pkgs/os-specific/linux/kernel/linux-3.12.nix
index d276de69446a..e2ec7295a5f0 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.12.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.12.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "3.12.13";
+  version = "3.12.14";
   extraMeta.branch = "3.12";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-    sha256 = "08r4k64v0nkr0dnmir3n3x7f4i83akl3ahx9cl7rbj29zc4ninmd";
+    sha256 = "1fv5mr8y5kn7077brajgv6l4shs8044i6pkh6phv7ms5ywacbllx";
   };
 
   features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.4.nix b/pkgs/os-specific/linux/kernel/linux-3.4.nix
index a7bfee210ad8..294f616242d4 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.4.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.4.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "3.4.81";
+  version = "3.4.83";
   extraMeta.branch = "3.4";
 
   src = fetchurl {
     url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
-    sha256 = "17m8b9wcsz8ryakhk8v85iknylkjlbsx69wkj1rbvqi2f1sjihx5";
+    sha256 = "1jammd31cgzymaqd2qwrm1shx5xwpaxmpnv658fix275fn35a8gb";
   };
 
   features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix
index ae226f0908b8..dd1998147602 100644
--- a/pkgs/os-specific/linux/kernel/manual-config.nix
+++ b/pkgs/os-specific/linux/kernel/manual-config.nix
@@ -38,7 +38,7 @@ in {
 
 let
   inherit (stdenv.lib)
-    hasAttr getAttr optional optionalString maintainers platforms;
+    hasAttr getAttr optional optionalString optionalAttrs maintainers platforms;
 
   installkernel = writeTextFile { name = "installkernel"; executable=true; text = ''
     #!${stdenv.shell} -e
@@ -73,9 +73,7 @@ let
 
       installsFirmware = (config.isEnabled "FW_LOADER") &&
         (isModular || (config.isDisabled "FIRMWARE_IN_KERNEL"));
-    in {
-      outputs = if isModular then [ "out" "dev" ] else null;
-
+    in (optionalAttrs isModular { outputs = [ "out" "dev" ]; }) // {
       passthru = {
         inherit version modDirVersion config kernelPatches;
       };
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index fdaf19154d3e..a41290168fe0 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -44,12 +44,6 @@ rec {
     features.apparmor = true;
   };
 
-  sec_perm_2_6_24 =
-    { name = "sec_perm-2.6.24";
-      patch = ./sec_perm-2.6.24.patch;
-      features.secPermPatch = true;
-    };
-
   no_xsave =
     { name = "no-xsave";
       patch = ./no-xsave.patch;
@@ -81,8 +75,8 @@ rec {
   grsecurity_3_0_3_2_55 =
     { name = "grsecurity-3.0-3.2.55";
       patch = fetchurl {
-        url = http://grsecurity.net/stable/grsecurity-3.0-3.2.55-201403122114.patch;
-        sha256 = "0jfi8dp7zrbq9ai12h0fxmj0r73wf5vp3y43n506y8ha7cyrrk5y";
+        url = http://grsecurity.net/stable/grsecurity-3.0-3.2.55-201403202347.patch;
+        sha256 = "19fwbpnfgq7iylrd0akazmh349xvxc9saxcsiqzhficfrsc4fyd3";
       };
       features.grsecurity = true;
       # The grsec kernel patch seems to include the apparmor patches as of 3.0-3.2.55
@@ -92,8 +86,8 @@ rec {
   grsecurity_3_0_3_13_6 =
     { name = "grsecurity-3.0-3.13.6";
       patch = fetchurl {
-        url = http://grsecurity.net/test/grsecurity-3.0-3.13.6-201403122116.patch;
-        sha256 = "0nsr6dxa7w9dl4bjmx7wh3vng9llbfjcxh3yr61434bzabymj9nm";
+        url = http://grsecurity.net/test/grsecurity-3.0-3.13.6-201403202349.patch;
+        sha256 = "0a1alz46k1g9nryx7qb040v5zf09ax7shj5wb0xj58gfpm67g86p";
       };
       features.grsecurity = true;
       # The grsec kernel patch seems to include the apparmor patches as of 3.0-3.13.6
diff --git a/pkgs/os-specific/linux/kernel/sec_perm-2.6.24.patch b/pkgs/os-specific/linux/kernel/sec_perm-2.6.24.patch
deleted file mode 100644
index de9b29949c3d..000000000000
--- a/pkgs/os-specific/linux/kernel/sec_perm-2.6.24.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Index: linux-2.6.24-rc3/security/security.c
-===================================================================
-RCS file: /ext1/sysadm/transparent/repository/linux-2.6.24-rc3/security/security.c,v
-retrieving revision 1.1
-retrieving revision 1.2
-diff -u -p -r1.1 -r1.2
---- linux-2.6.24-rc3/security/security.c	21 Nov 2007 13:03:11 -0000	1.1
-+++ linux-2.6.24-rc3/security/security.c	21 Nov 2007 13:07:55 -0000	1.2
-@@ -409,6 +409,7 @@ int security_inode_permission(struct ino
- 		return 0;
- 	return security_ops->inode_permission(inode, mask, nd);
- }
-+EXPORT_SYMBOL(security_inode_permission);
- 
- int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
- {
diff --git a/pkgs/os-specific/linux/ktap/default.nix b/pkgs/os-specific/linux/ktap/default.nix
index 542096733595..a82804cb8379 100644
--- a/pkgs/os-specific/linux/ktap/default.nix
+++ b/pkgs/os-specific/linux/ktap/default.nix
@@ -25,8 +25,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A lightweight script-based dynamic tracing tool for Linux.";
     homepage    = "http://www.ktap.org";
-    platforms   = stdenv.lib.platforms.linux;
     license     = stdenv.lib.licenses.gpl2;
+    platforms   = stdenv.lib.platforms.linux;
     maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/os-specific/linux/pax-utils/default.nix b/pkgs/os-specific/linux/pax-utils/default.nix
index 8d58873d5c12..83f0dc1e82d2 100644
--- a/pkgs/os-specific/linux/pax-utils/default.nix
+++ b/pkgs/os-specific/linux/pax-utils/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "pax-utils-${version}";
-  version = "0.7";
+  version = "0.8.1";
 
   src = fetchurl {
     url = "http://dev.gentoo.org/~vapier/dist/${name}.tar.xz";
-    sha256 = "111vmwn0ikrmy3s0w3rzpbzwrphawljrmcjya0isg5yam7lwxi0s";
+    sha256 = "1fgm70s52x48dxjihs0rcwmpfsi2dxbjzcilxy9fzg0i39dz4kw4";
   };
 
   makeFlags = [
diff --git a/pkgs/os-specific/linux/plymouth/default.nix b/pkgs/os-specific/linux/plymouth/default.nix
index bf3da1954676..4c51c4fea6cb 100644
--- a/pkgs/os-specific/linux/plymouth/default.nix
+++ b/pkgs/os-specific/linux/plymouth/default.nix
@@ -52,5 +52,6 @@ stdenv.mkDerivation rec {
     description = "A graphical boot animation";
     license = licenses.gpl2;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/os-specific/linux/procps-ng/default.nix b/pkgs/os-specific/linux/procps-ng/default.nix
index 0b3389f903a8..cd8a8eaec133 100644
--- a/pkgs/os-specific/linux/procps-ng/default.nix
+++ b/pkgs/os-specific/linux/procps-ng/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, ncurses }:
 
 stdenv.mkDerivation {
-  name = "procps-ng-3.3.9";
+  name = "procps-3.3.9";
 
   src = fetchurl {
     url = mirror://sourceforge/procps-ng/procps-ng-3.3.9.tar.xz;
diff --git a/pkgs/os-specific/linux/spl/3_12-compat.patch b/pkgs/os-specific/linux/spl/3_12-compat.patch
new file mode 100644
index 000000000000..b196098b7df2
--- /dev/null
+++ b/pkgs/os-specific/linux/spl/3_12-compat.patch
@@ -0,0 +1,429 @@
+commit c3d9c0df3ee8d43db22815ebbfbe8b803fa46e46
+Author: Richard Yao <ryao@gentoo.org>
+Date:   Tue Nov 5 11:35:54 2013 -0500
+
+    Linux 3.12 compat: New shrinker API
+    
+    torvalds/linux@24f7c6 introduced a new shrinker API while
+    torvalds/linux@a0b021 dropped support for the old shrinker API.
+    This patch adds support for the new shrinker API by wrapping
+    the old one with the new one.
+    
+    This change also reorganizes the autotools checks on the shrinker
+    API such that the configure script will fail early if an unknown
+    API is encountered in the future.
+    
+    Support for the set_shrinker() API which was used by Linux 2.6.22
+    and older has been dropped.  As a general rule compatibility is
+    only maintained back to Linux 2.6.26.
+    
+    Signed-off-by: Richard Yao <ryao@gentoo.org>
+    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+    Closes zfsonlinux/zfs#1732
+    Closes zfsonlinux/zfs#1822
+    Closes #293
+    Closes #307
+
+diff --git a/config/spl-build.m4 b/config/spl-build.m4
+index b0e3348..7d744db 100644
+--- a/config/spl-build.m4
++++ b/config/spl-build.m4
+@@ -27,8 +27,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
+ 	SPL_AC_TYPE_ATOMIC64_XCHG
+ 	SPL_AC_TYPE_UINTPTR_T
+ 	SPL_AC_2ARGS_REGISTER_SYSCTL
+-	SPL_AC_SET_SHRINKER
+-	SPL_AC_3ARGS_SHRINKER_CALLBACK
++	SPL_AC_SHRINKER_CALLBACK
+ 	SPL_AC_PATH_IN_NAMEIDATA
+ 	SPL_AC_TASK_CURR
+ 	SPL_AC_CTL_UNNUMBERED
+@@ -885,37 +884,18 @@ AC_DEFUN([SPL_AC_2ARGS_REGISTER_SYSCTL],
+ 	])
+ ])
+ 
+-dnl #
+-dnl # 2.6.23 API change
+-dnl # Old set_shrinker API replaced with register_shrinker
+-dnl #
+-AC_DEFUN([SPL_AC_SET_SHRINKER], [
+-	AC_MSG_CHECKING([whether set_shrinker() available])
+-	SPL_LINUX_TRY_COMPILE([
+-		#include <linux/mm.h>
+-	],[
+-		return set_shrinker(DEFAULT_SEEKS, NULL);
+-	],[
+-		AC_MSG_RESULT([yes])
+-		AC_DEFINE(HAVE_SET_SHRINKER, 1,
+-		          [set_shrinker() available])
+-	],[
+-		AC_MSG_RESULT([no])
+-	])
+-])
+-
+-dnl #
+-dnl # 2.6.35 API change,
+-dnl # Add context to shrinker callback
+-dnl #
+-AC_DEFUN([SPL_AC_3ARGS_SHRINKER_CALLBACK],
+-	[AC_MSG_CHECKING([whether shrinker callback wants 3 args])
++AC_DEFUN([SPL_AC_SHRINKER_CALLBACK],[
+ 	tmp_flags="$EXTRA_KCFLAGS"
+ 	EXTRA_KCFLAGS="-Werror"
++	dnl #
++	dnl # 2.6.23 to 2.6.34 API change
++	dnl # ->shrink(int nr_to_scan, gfp_t gfp_mask)
++	dnl #
++	AC_MSG_CHECKING([whether old 2-argument shrinker exists])
+ 	SPL_LINUX_TRY_COMPILE([
+ 		#include <linux/mm.h>
+ 
+-		int shrinker_cb(struct shrinker *, int, unsigned int);
++		int shrinker_cb(int nr_to_scan, gfp_t gfp_mask);
+ 	],[
+ 		struct shrinker cache_shrinker = {
+ 			.shrink = shrinker_cb,
+@@ -924,10 +904,86 @@ AC_DEFUN([SPL_AC_3ARGS_SHRINKER_CALLBACK],
+ 		register_shrinker(&cache_shrinker);
+ 	],[
+ 		AC_MSG_RESULT(yes)
+-		AC_DEFINE(HAVE_3ARGS_SHRINKER_CALLBACK, 1,
+-		          [shrinker callback wants 3 args])
++		AC_DEFINE(HAVE_2ARGS_OLD_SHRINKER_CALLBACK, 1,
++			[old shrinker callback wants 2 args])
+ 	],[
+ 		AC_MSG_RESULT(no)
++		dnl #
++		dnl # 2.6.35 - 2.6.39 API change
++		dnl # ->shrink(struct shrinker *,
++		dnl #          int nr_to_scan, gfp_t gfp_mask)
++		dnl #
++		AC_MSG_CHECKING([whether old 3-argument shrinker exists])
++		SPL_LINUX_TRY_COMPILE([
++			#include <linux/mm.h>
++
++			int shrinker_cb(struct shrinker *, int nr_to_scan,
++					gfp_t gfp_mask);
++		],[
++			struct shrinker cache_shrinker = {
++				.shrink = shrinker_cb,
++				.seeks = DEFAULT_SEEKS,
++			};
++			register_shrinker(&cache_shrinker);
++		],[
++			AC_MSG_RESULT(yes)
++			AC_DEFINE(HAVE_3ARGS_SHRINKER_CALLBACK, 1,
++				[old shrinker callback wants 3 args])
++		],[
++			AC_MSG_RESULT(no)
++			dnl #
++			dnl # 3.0 - 3.11 API change
++			dnl # ->shrink(struct shrinker *,
++			dnl #          struct shrink_control *sc)
++			dnl #
++			AC_MSG_CHECKING(
++				[whether new 2-argument shrinker exists])
++			SPL_LINUX_TRY_COMPILE([
++				#include <linux/mm.h>
++
++				int shrinker_cb(struct shrinker *,
++						struct shrink_control *sc);
++			],[
++				struct shrinker cache_shrinker = {
++					.shrink = shrinker_cb,
++					.seeks = DEFAULT_SEEKS,
++				};
++				register_shrinker(&cache_shrinker);
++			],[
++				AC_MSG_RESULT(yes)
++				AC_DEFINE(HAVE_2ARGS_NEW_SHRINKER_CALLBACK, 1,
++					[new shrinker callback wants 2 args])
++			],[
++				AC_MSG_RESULT(no)
++				dnl #
++				dnl # 3.12 API change,
++				dnl # ->shrink() is logically split in to
++				dnl # ->count_objects() and ->scan_objects()
++				dnl #
++				AC_MSG_CHECKING(
++				    [whether ->count_objects callback exists])
++				SPL_LINUX_TRY_COMPILE([
++					#include <linux/mm.h>
++
++					unsigned long shrinker_cb(
++						struct shrinker *,
++						struct shrink_control *sc);
++				],[
++					struct shrinker cache_shrinker = {
++						.count_objects = shrinker_cb,
++						.scan_objects = shrinker_cb,
++						.seeks = DEFAULT_SEEKS,
++					};
++					register_shrinker(&cache_shrinker);
++				],[
++					AC_MSG_RESULT(yes)
++					AC_DEFINE(HAVE_SPLIT_SHRINKER_CALLBACK,
++						1, [->count_objects exists])
++				],[
++					AC_MSG_ERROR(error)
++				])
++			])
++		])
+ 	])
+ 	EXTRA_KCFLAGS="$tmp_flags"
+ ])
+diff --git a/include/linux/mm_compat.h b/include/linux/mm_compat.h
+index cb1bef9..37c9b08 100644
+--- a/include/linux/mm_compat.h
++++ b/include/linux/mm_compat.h
+@@ -148,107 +148,167 @@ extern shrink_icache_memory_t shrink_icache_memory_fn;
+ #endif /* HAVE_SHRINK_ICACHE_MEMORY */
+ 
+ /*
+- * Linux 2.6. - 2.6. Shrinker API Compatibility.
++ * Due to frequent changes in the shrinker API the following
++ * compatibility wrappers should be used.  They are as follows:
++ *
++ * SPL_SHRINKER_DECLARE is used to declare the shrinker which is
++ * passed to spl_register_shrinker()/spl_unregister_shrinker().  Use
++ * shrinker_name to set the shrinker variable name, shrinker_callback
++ * to set the callback function, and seek_cost to define the cost of
++ * reclaiming an object.
++ *
++ *   SPL_SHRINKER_DECLARE(shrinker_name, shrinker_callback, seek_cost);
++ *
++ * SPL_SHRINKER_CALLBACK_FWD_DECLARE is used when a forward declaration
++ * of the shrinker callback function is required.  Only the callback
++ * function needs to be passed.
++ *
++ *   SPL_SHRINKER_CALLBACK_FWD_DECLARE(shrinker_callback);
++ *
++ * SPL_SHRINKER_CALLBACK_WRAPPER is used to declare the callback function
++ * which is registered with the shrinker.  This function will call your
++ * custom shrinker which must use the following prototype.  Notice the
++ * leading __'s, these must be appended to the callback_function name.
++ *
++ *   int  __shrinker_callback(struct shrinker *, struct shrink_control *)
++ *   SPL_SHRINKER_CALLBACK_WRAPPER(shrinker_callback);a
++ *
++ *
++ * Example:
++ *
++ * SPL_SHRINKER_CALLBACK_FWD_DECLARE(my_shrinker_fn);
++ * SPL_SHRINKER_DECLARE(my_shrinker, my_shrinker_fn, 1);
++ *
++ * static int
++ * __my_shrinker_fn(struct shrinker *shrink, struct shrink_control *sc)
++ * {
++ *	if (sc->nr_to_scan) {
++ *		...scan objects in the cache and reclaim them...
++ *	}
++ *
++ *	...calculate number of objects in the cache...
++ *
++ *	return (number of objects in the cache);
++ * }
++ * SPL_SHRINKER_CALLBACK_WRAPPER(my_shrinker_fn);
+  */
+-#ifdef HAVE_SET_SHRINKER
+-typedef struct spl_shrinker {
+-	struct shrinker *shrinker;
+-	shrinker_t fn;
+-	int seeks;
+-} spl_shrinker_t;
+-
+-static inline void
+-spl_register_shrinker(spl_shrinker_t *ss)
+-{
+-	ss->shrinker = set_shrinker(ss->seeks, ss->fn);
+-}
+ 
+-static inline void
+-spl_unregister_shrinker(spl_shrinker_t *ss)
+-{
+-	remove_shrinker(ss->shrinker);
+-}
++#define	spl_register_shrinker(x)	register_shrinker(x)
++#define	spl_unregister_shrinker(x)	unregister_shrinker(x)
+ 
+-# define SPL_SHRINKER_DECLARE(s, x, y)                                 \
+-	static spl_shrinker_t s = {                                    \
+-		.shrinker = NULL,                                      \
+-		.fn = x,                                               \
+-		.seeks = y                                             \
+-	}
+-
+-# define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn)                         \
+-	static int fn(int, unsigned int)
+-# define SPL_SHRINKER_CALLBACK_WRAPPER(fn)                             \
+-static int                                                             \
+-fn(int nr_to_scan, unsigned int gfp_mask)                              \
+-{                                                                      \
+-	struct shrink_control sc;                                      \
+-                                                                       \
+-        sc.nr_to_scan = nr_to_scan;                                    \
+-        sc.gfp_mask = gfp_mask;                                        \
+-                                                                       \
+-	return __ ## fn(NULL, &sc);                                    \
++/*
++ * Linux 2.6.23 - 2.6.34 Shrinker API Compatibility.
++ */
++#if defined(HAVE_2ARGS_OLD_SHRINKER_CALLBACK)
++#define	SPL_SHRINKER_DECLARE(s, x, y)					\
++static struct shrinker s = {						\
++	.shrink = x,							\
++	.seeks = y							\
+ }
+ 
+-#else
++#define	SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn)				\
++static int fn(int nr_to_scan, unsigned int gfp_mask)
+ 
+-# define spl_register_shrinker(x)	register_shrinker(x)
+-# define spl_unregister_shrinker(x)	unregister_shrinker(x)
+-# define SPL_SHRINKER_DECLARE(s, x, y)                                 \
+-	static struct shrinker s = {                                   \
+-		.shrink = x,                                           \
+-		.seeks = y                                             \
+-	}
++#define	SPL_SHRINKER_CALLBACK_WRAPPER(fn)				\
++static int								\
++fn(int nr_to_scan, unsigned int gfp_mask)				\
++{									\
++	struct shrink_control sc;					\
++									\
++	sc.nr_to_scan = nr_to_scan;					\
++	sc.gfp_mask = gfp_mask;						\
++									\
++	return (__ ## fn(NULL, &sc));					\
++}
+ 
+ /*
+- * Linux 2.6. - 2.6. Shrinker API Compatibility.
++ * Linux 2.6.35 to 2.6.39 Shrinker API Compatibility.
+  */
+-# if defined(HAVE_SHRINK_CONTROL_STRUCT)
+-#  define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn)                        \
+-	static int fn(struct shrinker *, struct shrink_control *)
+-#  define SPL_SHRINKER_CALLBACK_WRAPPER(fn)                            \
+-static int                                                             \
+-fn(struct shrinker *shrink, struct shrink_control *sc) {               \
+-	return __ ## fn(shrink, sc);                                   \
++#elif defined(HAVE_3ARGS_SHRINKER_CALLBACK)
++#define	SPL_SHRINKER_DECLARE(s, x, y)					\
++static struct shrinker s = {						\
++	.shrink = x,							\
++	.seeks = y							\
++}
++
++#define	SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn)				\
++static int fn(struct shrinker *, int, unsigned int)
++
++#define	SPL_SHRINKER_CALLBACK_WRAPPER(fn)				\
++static int								\
++fn(struct shrinker *shrink, int nr_to_scan, unsigned int gfp_mask)	\
++{									\
++	struct shrink_control sc;					\
++									\
++	sc.nr_to_scan = nr_to_scan;					\
++	sc.gfp_mask = gfp_mask;						\
++									\
++	return (__ ## fn(shrink, &sc));					\
+ }
+ 
+ /*
+- * Linux 2.6. - 2.6. Shrinker API Compatibility.
++ * Linux 3.0 to 3.11 Shrinker API Compatibility.
+  */
+-# elif defined(HAVE_3ARGS_SHRINKER_CALLBACK)
+-#  define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn)                       \
+-	static int fn(struct shrinker *, int, unsigned int)
+-#  define SPL_SHRINKER_CALLBACK_WRAPPER(fn)                           \
+-static int                                                            \
+-fn(struct shrinker *shrink, int nr_to_scan, unsigned int gfp_mask)    \
+-{                                                                     \
+-	struct shrink_control sc;                                     \
+-                                                                      \
+-        sc.nr_to_scan = nr_to_scan;                                   \
+-        sc.gfp_mask = gfp_mask;                                       \
+-                                                                      \
+-	return __ ## fn(shrink, &sc);                                 \
++#elif defined(HAVE_2ARGS_NEW_SHRINKER_CALLBACK)
++#define	SPL_SHRINKER_DECLARE(s, x, y)					\
++static struct shrinker s = {						\
++	.shrink = x,							\
++	.seeks = y							\
++}
++
++#define	SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn)				\
++static int fn(struct shrinker *, struct shrink_control *)
++
++#define	SPL_SHRINKER_CALLBACK_WRAPPER(fn)				\
++static int								\
++fn(struct shrinker *shrink, struct shrink_control *sc)			\
++{									\
++	return (__ ## fn(shrink, sc));					\
+ }
+ 
+ /*
+- * Linux 2.6. - 2.6. Shrinker API Compatibility.
++ * Linux 3.12 and later Shrinker API Compatibility.
+  */
+-# else
+-#  define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn)                       \
+-	static int fn(int, unsigned int)
+-#  define SPL_SHRINKER_CALLBACK_WRAPPER(fn)                           \
+-static int                                                            \
+-fn(int nr_to_scan, unsigned int gfp_mask)                             \
+-{                                                                     \
+-	struct shrink_control sc;                                     \
+-                                                                      \
+-        sc.nr_to_scan = nr_to_scan;                                   \
+-        sc.gfp_mask = gfp_mask;                                       \
+-                                                                      \
+-	return __ ## fn(NULL, &sc);                                   \
++#elif defined(HAVE_SPLIT_SHRINKER_CALLBACK)
++#define	SPL_SHRINKER_DECLARE(s, x, y)					\
++static struct shrinker s = {						\
++	.count_objects = x ## _count_objects,				\
++	.scan_objects = x ## _scan_objects,				\
++	.seeks = y							\
+ }
+ 
+-# endif
+-#endif /* HAVE_SET_SHRINKER */
++#define	SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn)				\
++static unsigned long fn ## _count_objects(struct shrinker *,		\
++    struct shrink_control *);						\
++static unsigned long fn ## _scan_objects(struct shrinker *,		\
++    struct shrink_control *)
++
++#define	SPL_SHRINKER_CALLBACK_WRAPPER(fn)				\
++static unsigned long							\
++fn ## _count_objects(struct shrinker *shrink, struct shrink_control *sc)\
++{									\
++	int __ret__;							\
++									\
++	sc->nr_to_scan = 0;						\
++	__ret__ = __ ## fn(NULL, sc);					\
++									\
++	/* Errors may not be returned and must be converted to zeros */	\
++	return ((__ret__ < 0) ? 0 : __ret__);				\
++}									\
++									\
++static unsigned long							\
++fn ## _scan_objects(struct shrinker *shrink, struct shrink_control *sc)	\
++{									\
++	int __ret__;							\
++									\
++	__ret__ = __ ## fn(NULL, sc);					\
++	return ((__ret__ < 0) ? SHRINK_STOP : __ret__);			\
++}
++#else
++/*
++ * Linux 2.x to 2.6.22, or a newer shrinker API has been introduced.
++ */
++#error "Unknown shrinker callback"
++#endif
+ 
+ #endif /* SPL_MM_COMPAT_H */
diff --git a/pkgs/os-specific/linux/spl/3_13-compat-1.patch b/pkgs/os-specific/linux/spl/3_13-compat-1.patch
new file mode 100644
index 000000000000..40946931c802
--- /dev/null
+++ b/pkgs/os-specific/linux/spl/3_13-compat-1.patch
@@ -0,0 +1,61 @@
+From 3e96de17d723d6f6c9e2fd04b059b50d4e0bbef0 Mon Sep 17 00:00:00 2001
+From: Richard Yao <ryao@gentoo.org>
+Date: Thu, 8 Aug 2013 04:30:55 -0400
+Subject: [PATCH] Linux 3.13 compat: Remove unused flags variable from
+ __cv_init()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC 4.8.1 complained about an unused flags variable when building
+against Linux 2.6.26.8:
+
+/var/tmp/portage/sys-kernel/spl-9999/work/spl-9999/module/spl/../../module/spl/spl-condvar.c:
+In function ‘__cv_init’:
+/var/tmp/portage/sys-kernel/spl-9999/work/spl-9999/module/spl/../../module/spl/spl-condvar.c:39:6:
+error: variable ‘flags’ set but not used
+[-Werror=unused-but-set-variable]
+  int flags = KM_SLEEP;
+        ^
+	cc1: all warnings being treated as errors
+
+Additionally, the superfluous code uses a preempt_count variable that is
+no longer available on Linux 3.13. Deleting the unnecessary code fixes a
+Linux 3.13 compatibility issue.
+
+Signed-off-by: Richard Yao <ryao@gentoo.org>
+Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Closes #312
+---
+ module/spl/spl-condvar.c | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/module/spl/spl-condvar.c b/module/spl/spl-condvar.c
+index 283648a..8236412 100644
+--- a/module/spl/spl-condvar.c
++++ b/module/spl/spl-condvar.c
+@@ -36,8 +36,6 @@
+ void
+ __cv_init(kcondvar_t *cvp, char *name, kcv_type_t type, void *arg)
+ {
+-	int flags = KM_SLEEP;
+-
+ 	SENTRY;
+ 	ASSERT(cvp);
+ 	ASSERT(name == NULL);
+@@ -51,12 +49,6 @@
+ 	atomic_set(&cvp->cv_refs, 1);
+ 	cvp->cv_mutex = NULL;
+ 
+-        /* We may be called when there is a non-zero preempt_count or
+-	 * interrupts are disabled is which case we must not sleep.
+-	 */
+-        if (current_thread_info()->preempt_count || irqs_disabled())
+-		flags = KM_NOSLEEP;
+-
+ 	SEXIT;
+ }
+ EXPORT_SYMBOL(__cv_init);
+-- 
+1.8.5.5
+
diff --git a/pkgs/os-specific/linux/spl/3_13-compat-2.patch b/pkgs/os-specific/linux/spl/3_13-compat-2.patch
new file mode 100644
index 000000000000..1f487f042f81
--- /dev/null
+++ b/pkgs/os-specific/linux/spl/3_13-compat-2.patch
@@ -0,0 +1,168 @@
+From 50a0749eba31e821a7edf286f1e3b149f7d13c59 Mon Sep 17 00:00:00 2001
+From: Richard Yao <ryao@gentoo.org>
+Date: Mon, 25 Nov 2013 11:22:33 -0500
+Subject: [PATCH] Linux 3.13 compat: Pass NULL for new delegated inode argument
+
+This check was originally added for SLES10, a093c6a, to check for
+a 'struct vfsmount *' argument which they added.  However, since
+SLES10 is based on a 2.6.16 kernel which is no longer supported
+this functionality was dropped.  The checks were refactored to
+support Linux 3.13 without concern for historical versions.
+
+Signed-off-by: Richard Yao <ryao@gentoo.org>
+Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Closes #312
+---
+ config/spl-build.m4    | 52 ++++++++++++++++++++++++++++++++++++++++----------
+ module/spl/spl-vnode.c | 22 ++++++++++++---------
+ 2 files changed, 55 insertions(+), 19 deletions(-)
+
+diff --git a/config/spl-build.m4 b/config/spl-build.m4
+index 7d744db..8426780 100644
+--- a/config/spl-build.m4
++++ b/config/spl-build.m4
+@@ -1842,41 +1842,73 @@ AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST],
+ 	EXTRA_KCFLAGS="$tmp_flags"
+ ])
+ 
+-dnl #
+-dnl # SLES API change, never adopted in mainline,
+-dnl # Third 'struct vfsmount *' argument removed.
+-dnl #
+ AC_DEFUN([SPL_AC_2ARGS_VFS_UNLINK],
+ 	[AC_MSG_CHECKING([whether vfs_unlink() wants 2 args])
+ 	SPL_LINUX_TRY_COMPILE([
+ 		#include <linux/fs.h>
+ 	],[
+-		vfs_unlink(NULL, NULL);
++		vfs_unlink((struct inode *) NULL, (struct dentry *) NULL);
+ 	],[
+ 		AC_MSG_RESULT(yes)
+ 		AC_DEFINE(HAVE_2ARGS_VFS_UNLINK, 1,
+ 		          [vfs_unlink() wants 2 args])
+ 	],[
+ 		AC_MSG_RESULT(no)
++		dnl #
++		dnl # Linux 3.13 API change
++		dnl # Added delegated inode
++		dnl #
++		AC_MSG_CHECKING([whether vfs_unlink() wants 3 args])
++		SPL_LINUX_TRY_COMPILE([
++			#include <linux/fs.h>
++		],[
++			vfs_unlink((struct inode *) NULL,
++				(struct dentry *) NULL,
++				(struct inode **) NULL);
++		],[
++			AC_MSG_RESULT(yes)
++			AC_DEFINE(HAVE_3ARGS_VFS_UNLINK, 1,
++				  [vfs_unlink() wants 3 args])
++		],[
++			AC_MSG_ERROR(no)
++		])
++
+ 	])
+ ])
+ 
+-dnl #
+-dnl # SLES API change, never adopted in mainline,
+-dnl # Third and sixth 'struct vfsmount *' argument removed.
+-dnl #
+ AC_DEFUN([SPL_AC_4ARGS_VFS_RENAME],
+ 	[AC_MSG_CHECKING([whether vfs_rename() wants 4 args])
+ 	SPL_LINUX_TRY_COMPILE([
+ 		#include <linux/fs.h>
+ 	],[
+-		vfs_rename(NULL, NULL, NULL, NULL);
++		vfs_rename((struct inode *) NULL, (struct dentry *) NULL,
++			(struct inode *) NULL, (struct dentry *) NULL);
+ 	],[
+ 		AC_MSG_RESULT(yes)
+ 		AC_DEFINE(HAVE_4ARGS_VFS_RENAME, 1,
+ 		          [vfs_rename() wants 4 args])
+ 	],[
+ 		AC_MSG_RESULT(no)
++		dnl #
++		dnl # Linux 3.13 API change
++		dnl # Added delegated inode
++		dnl #
++		AC_MSG_CHECKING([whether vfs_rename() wants 5 args])
++		SPL_LINUX_TRY_COMPILE([
++			#include <linux/fs.h>
++		],[
++			vfs_rename((struct inode *) NULL,
++				(struct dentry *) NULL,
++				(struct inode *) NULL,
++				(struct dentry *) NULL,
++				(struct inode **) NULL);
++		],[
++			AC_MSG_RESULT(yes)
++			AC_DEFINE(HAVE_5ARGS_VFS_RENAME, 1,
++				  [vfs_rename() wants 5 args])
++		],[
++			AC_MSG_ERROR(no)
++		])
+ 	])
+ ])
+ 
+diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c
+index 0784ff2..5496067 100644
+--- a/module/spl/spl-vnode.c
++++ b/module/spl/spl-vnode.c
+@@ -334,7 +334,11 @@
+ 		if (inode)
+ 			ihold(inode);
+ 
++#ifdef HAVE_2ARGS_VFS_UNLINK
+ 		rc = vfs_unlink(parent.dentry->d_inode, dentry);
++#else
++		rc = vfs_unlink(parent.dentry->d_inode, dentry, NULL);
++#endif /* HAVE_2ARGS_VFS_UNLINK */
+ exit1:
+ 		dput(dentry);
+ 	} else {
+@@ -412,10 +416,10 @@
+ 
+ #ifdef HAVE_4ARGS_VFS_RENAME
+ 	rc = vfs_rename(old_dir->d_inode, old_dentry,
+-			new_dir->d_inode, new_dentry);
++	    new_dir->d_inode, new_dentry);
+ #else
+-	rc = vfs_rename(old_dir->d_inode, old_dentry, oldnd.nd_mnt,
+-			new_dir->d_inode, new_dentry, newnd.nd_mnt);
++	rc = vfs_rename(old_dir->d_inode, old_dentry,
++	    new_dir->d_inode, new_dentry, NULL);
+ #endif /* HAVE_4ARGS_VFS_RENAME */
+ exit4:
+ 	unlock_rename(new_dir, old_dir);
+@@ -478,9 +482,9 @@
+                 if (inode)
+                         atomic_inc(&inode->i_count);
+ #ifdef HAVE_2ARGS_VFS_UNLINK
+-                rc = vfs_unlink(nd.nd_dentry->d_inode, dentry);
++		rc = vfs_unlink(nd.nd_dentry->d_inode, dentry);
+ #else
+-                rc = vfs_unlink(nd.nd_dentry->d_inode, dentry, nd.nd_mnt);
++		rc = vfs_unlink(nd.nd_dentry->d_inode, dentry, NULL);
+ #endif /* HAVE_2ARGS_VFS_UNLINK */
+ exit2:
+                 dput(dentry);
+@@ -571,11 +575,11 @@
+                 SGOTO(exit5, rc);
+ 
+ #ifdef HAVE_4ARGS_VFS_RENAME
+-        rc = vfs_rename(old_dir->d_inode, old_dentry,
+-                        new_dir->d_inode, new_dentry);
++	rc = vfs_rename(old_dir->d_inode, old_dentry,
++	    new_dir->d_inode, new_dentry);
+ #else
+-        rc = vfs_rename(old_dir->d_inode, old_dentry, oldnd.nd_mnt,
+-                        new_dir->d_inode, new_dentry, newnd.nd_mnt);
++	rc = vfs_rename(old_dir->d_inode, old_dentry,
++	    new_dir->d_inode, new_dentry, NULL);
+ #endif /* HAVE_4ARGS_VFS_RENAME */
+ exit5:
+         dput(new_dentry);
+-- 
+1.8.5.5
+
diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix
index ee264f67127a..1d70a76a001c 100644
--- a/pkgs/os-specific/linux/spl/default.nix
+++ b/pkgs/os-specific/linux/spl/default.nix
@@ -7,7 +7,7 @@ stdenv.mkDerivation {
     sha256 = "196scl8q0bkkak6m0p1l1fz254cgsizqm73bf9wk3iynamq7qmrw";
   };
 
-  patches = [ ./install_prefix.patch ];
+  patches = [ ./install_prefix.patch ./3_12-compat.patch ./3_13-compat-1.patch ./3_13-compat-2.patch ];
 
   buildInputs = [ perl autoconf automake libtool ];
 
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
     ./autogen.sh
 
     substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid
-    substituteInPlace ./module/spl/spl-module.c  --replace /bin/mknod mknod 
+    substituteInPlace ./module/spl/spl-module.c  --replace /bin/mknod mknod
 
     substituteInPlace ./module/spl/spl-generic.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:${gawk}:/bin"
     substituteInPlace ./module/splat/splat-vnode.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin"
@@ -40,6 +40,6 @@ stdenv.mkDerivation {
     homepage = http://zfsonlinux.org/;
     platforms = stdenv.lib.platforms.linux;
     license = stdenv.lib.licenses.gpl2Plus;
-    maintainers = with stdenv.lib.maintainers; [ jcumming ];
+    maintainers = with stdenv.lib.maintainers; [ jcumming wizeman ];
   };
 }
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index 2c2ed582083f..caa69a9e3a8a 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -1,11 +1,14 @@
 { stdenv, fetchurl, pkgconfig, intltool, gperf, libcap, dbus, kmod
 , xz, pam, acl, cryptsetup, libuuid, m4, utillinux
 , glib, kbd, libxslt, coreutils, libgcrypt, sysvtools, docbook_xsl
-, kexectools
+, kexectools, libmicrohttpd
+, python ? null, pythonSupport ? false
 }:
 
 assert stdenv.isLinux;
 
+assert pythonSupport -> python != null;
+
 stdenv.mkDerivation rec {
   version = "203";
   name = "systemd-${version}";
@@ -25,7 +28,8 @@ stdenv.mkDerivation rec {
   buildInputs =
     [ pkgconfig intltool gperf libcap dbus.libs kmod xz pam acl
       /* cryptsetup */ libuuid m4 glib libxslt libgcrypt docbook_xsl
-    ];
+      libmicrohttpd
+    ] ++ stdenv.lib.optional pythonSupport python;
 
   configureFlags =
     [ "--localstatedir=/var"
diff --git a/pkgs/os-specific/linux/udisks/1-default.nix b/pkgs/os-specific/linux/udisks/1-default.nix
index b53af52755fa..19cfec9f0657 100644
--- a/pkgs/os-specific/linux/udisks/1-default.nix
+++ b/pkgs/os-specific/linux/udisks/1-default.nix
@@ -3,11 +3,11 @@
 , libxslt, docbook_xsl, utillinux }:
 
 stdenv.mkDerivation rec {
-  name = "udisks-1.0.4";
+  name = "udisks-1.0.5";
 
   src = fetchurl {
     url = "http://hal.freedesktop.org/releases/${name}.tar.gz";
-    sha256 = "1xgqifddwaavmjc8c30i0mdffyirsld7c6qhfyjw7f9khwv8jjw5";
+    sha256 = "0wbg3jrv8limdgvcygf4dqin3y6d30y9pcmmk711vq571vmq5v7j";
   };
 
   patches = [ ./purity.patch ./no-pci-db.patch ];
@@ -28,7 +28,11 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig ];
 
-  configureFlags = "--localstatedir=/var --enable-lvm2";
+  configureFlags = [
+    "--localstatedir=/var"
+    "--enable-lvm2"
+    "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
+  ];
 
   meta = {
     homepage = http://www.freedesktop.org/wiki/Software/udisks;
diff --git a/pkgs/os-specific/linux/udisks/2-default.nix b/pkgs/os-specific/linux/udisks/2-default.nix
index 90272d8f0959..6c9b743fe177 100644
--- a/pkgs/os-specific/linux/udisks/2-default.nix
+++ b/pkgs/os-specific/linux/udisks/2-default.nix
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
 
   configureFlags = [
     "--localstatedir=/var"
-    "--with-systemdsystemunitdir=$(out)/etc/systemd/systemd"
+    "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
     "--with-udevdir=$(out)/lib/udev"
   ];
 
diff --git a/pkgs/os-specific/linux/zfs/3.13-compat.patch b/pkgs/os-specific/linux/zfs/3.13-compat.patch
new file mode 100644
index 000000000000..f89d38f72acc
--- /dev/null
+++ b/pkgs/os-specific/linux/zfs/3.13-compat.patch
@@ -0,0 +1,43 @@
+From 729210564a5325e190fc4fba22bf17bacf957ace Mon Sep 17 00:00:00 2001
+From: Richard Yao <ryao@gentoo.org>
+Date: Mon, 25 Nov 2013 12:21:21 -0500
+Subject: [PATCH] Properly ignore bdi_setup_and_register return value
+
+This broke compilation against Linux 3.13 and GCC 4.7.3.
+
+Signed-off-by: Richard Yao <ryao@gentoo.org>
+Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Closes #1906
+---
+ config/kernel-bdi-setup-and-register.m4 | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/config/kernel-bdi-setup-and-register.m4 b/config/kernel-bdi-setup-and-register.m4
+index 4196091..cb8ed67 100644
+--- a/config/kernel-bdi-setup-and-register.m4
++++ b/config/kernel-bdi-setup-and-register.m4
+@@ -1,12 +1,14 @@
+ dnl #
+ dnl # 2.6.34 API change
+-dnl # The bdi_setup_and_register() helper function is avilable and
++dnl # The bdi_setup_and_register() helper function is available and
+ dnl # exported by the kernel.  This is a trivial helper function but
+ dnl # using it significantly simplifies the code surrounding setting
+ dnl # up and tearing down the bdi structure.
+ dnl #
+ AC_DEFUN([ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER],
+ 	[AC_MSG_CHECKING([whether bdi_setup_and_register() is available])
++	tmp_flags="$EXTRA_KCFLAGS"
++	EXTRA_KCFLAGS="-Wno-unused-result"
+ 	ZFS_LINUX_TRY_COMPILE_SYMBOL([
+ 		#include <linux/backing-dev.h>
+ 	], [
+@@ -18,4 +20,5 @@ AC_DEFUN([ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER],
+ 	], [
+ 		AC_MSG_RESULT(no)
+ 	])
++	EXTRA_KCFLAGS="$tmp_flags"
+ ])
+-- 
+1.8.5.5
+
diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix
index 67ed1312826a..f8f3c9ed3165 100644
--- a/pkgs/os-specific/linux/zfs/default.nix
+++ b/pkgs/os-specific/linux/zfs/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
     sha256 = "18b5f18k8mwb17r5ippsilmp1a2sqjw9fwn0z82159dkhsadg33b";
   };
 
-  patches = [ ./mount_zfs_prefix.patch ./nix-build.patch ];
+  patches = [ ./mount_zfs_prefix.patch ./nix-build.patch ./libblkid-1db7b9b.patch ./gcc-4.8.patch ./3.13-compat.patch ];
 
   buildInputs = [ spl perl autoconf automake libtool zlib libuuid coreutils ];
 
@@ -45,6 +45,6 @@ stdenv.mkDerivation {
     homepage = http://zfsonlinux.org/;
     license = stdenv.lib.licenses.cddl;
     platforms = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [ jcumming ];
+    maintainers = with stdenv.lib.maintainers; [ jcumming wizeman ];
   };
 }
diff --git a/pkgs/os-specific/linux/zfs/gcc-4.8.patch b/pkgs/os-specific/linux/zfs/gcc-4.8.patch
new file mode 100644
index 000000000000..341360163761
--- /dev/null
+++ b/pkgs/os-specific/linux/zfs/gcc-4.8.patch
@@ -0,0 +1,114 @@
+commit 0f62f3f9abc4bfa0bcafee9bfa3d55e91dcb371d
+Author: Brian Behlendorf <behlendorf1@llnl.gov>
+Date:   Tue Jan 14 09:39:13 2014 -0800
+
+    Disable GCCs aggressive loop optimization
+    
+    GCC >+ 4.8's aggressive loop optimization breaks some of the iterators
+    over the dn_blkptr[] pseudo-array in dnode_phys. Since dn_blkptr[] is
+    defined as a single-element array, GCC believes an iterator can only
+    access index 0 and will unroll the loop into a single iteration.
+    
+    One way to resolve the issue would be to cast the array to a pointer
+    and fix all the iterators that might break.  The only loop where it
+    is known to cause a problem is this loop in dmu_objset_write_ready():
+    
+        for (i = 0; i < dnp->dn_nblkptr; i++)
+                bp->blk_fill += dnp->dn_blkptr[i].blk_fill;
+    
+    In the common case where dn_nblkptr is 3, the loop is only executed a
+    single time and "i" is equal to 1 following the loop.
+    
+    The specific breakage caused by this problem is that the blk_fill of
+    root block pointers wouldn't be set properly when more than one blkptr
+    is in use (when no indrect blocks are needed).
+    
+    The simple reproducing sequence is:
+    
+    zpool create tank /tank.img
+    zdb -ddddd tank 0
+    
+    Notice that "fill=31", however, there are two L0 indirect blocks with
+    "F=31" and "F=5". The fill count should be 36 rather than 31. This
+    problem causes an assert to be hit in a simple "zdb tank" when built
+    with --enable-debug.
+    
+    However, this approach was not taken because we need to be absolutely
+    sure we catch all instances of this unwanted optimization.  Therefore,
+    the build system has been updated to detect if GCC supports the
+    aggressive loop optimization.  If it does the optimization will be
+    explicitly disabled using the -fno-aggressive-loop-optimization option.
+    
+    Original-fix-by: Tim Chase <tim@chase2k.com>
+    Signed-off-by: Tim Chase <tim@chase2k.com>
+    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+    Closes #2010
+    Closes #2051
+
+diff --git a/config/Rules.am b/config/Rules.am
+index e3fa5b5..24f9426 100644
+--- a/config/Rules.am
++++ b/config/Rules.am
+@@ -1,8 +1,10 @@
+ DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h
+ 
+ AM_LIBTOOLFLAGS = --silent
+-AM_CFLAGS  = -Wall -Wstrict-prototypes
+-AM_CFLAGS += -fno-strict-aliasing ${NO_UNUSED_BUT_SET_VARIABLE} ${DEBUG_CFLAGS}
++AM_CFLAGS  = ${DEBUG_CFLAGS} -Wall -Wstrict-prototypes
++AM_CFLAGS += ${NO_UNUSED_BUT_SET_VARIABLE}
++AM_CFLAGS += ${NO_AGGRESSIVE_LOOP_OPTIMIZATIONS}
++AM_CFLAGS += -fno-strict-aliasing
+ AM_CPPFLAGS  = -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT
+ AM_CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64
+ AM_CPPFLAGS += -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\"
+diff --git a/config/always-no-aggressive-loop-optimizations.m4 b/config/always-no-aggressive-loop-optimizations.m4
+new file mode 100644
+index 0000000..8f2115a
+--- /dev/null
++++ b/config/always-no-aggressive-loop-optimizations.m4
+@@ -0,0 +1,20 @@
++dnl #
++dnl # Check if gcc supports -fno-aggressive-loop-optimizations
++dnl #
++AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_NO_AGGRESSIVE_LOOP_OPTIMIZATIONS], [
++	AC_MSG_CHECKING([for -fno-aggressive-loop-optimizations support])
++
++	saved_flags="$CFLAGS"
++	CFLAGS="$CFLAGS -fno-aggressive-loop-optimizations"
++
++	AC_RUN_IFELSE([AC_LANG_PROGRAM([], [])], [
++		NO_AGGRESSIVE_LOOP_OPTIMIZATIONS=-fno-aggressive-loop-optimizations
++		AC_MSG_RESULT([yes])
++	], [
++		NO_AGGRESSIVE_LOOP_OPTIMIZATIONS=
++		AC_MSG_RESULT([no])
++	])
++
++	CFLAGS="$saved_flags"
++	AC_SUBST([NO_AGGRESSIVE_LOOP_OPTIMIZATIONS])
++])
+diff --git a/config/kernel.m4 b/config/kernel.m4
+index cbf0ca3..62a9b42 100644
+--- a/config/kernel.m4
++++ b/config/kernel.m4
+@@ -104,6 +104,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
+ 	dnl # -Wall -fno-strict-aliasing -Wstrict-prototypes and other
+ 	dnl # compiler options are added by the kernel build system.
+ 	KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE"
++	KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_AGGRESSIVE_LOOP_OPTIMIZATIONS"
+ 	KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"
+ 	KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
+ 
+diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
+index 005185b..477b916 100644
+--- a/config/zfs-build.m4
++++ b/config/zfs-build.m4
+@@ -62,6 +62,7 @@ AC_DEFUN([ZFS_AC_DEBUG_DMU_TX], [
+ 
+ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
+ 	ZFS_AC_CONFIG_ALWAYS_NO_UNUSED_BUT_SET_VARIABLE
++	ZFS_AC_CONFIG_ALWAYS_NO_AGGRESSIVE_LOOP_OPTIMIZATIONS
+ ])
+ 
+ AC_DEFUN([ZFS_AC_CONFIG], [
diff --git a/pkgs/os-specific/linux/zfs/libblkid-1db7b9b.patch b/pkgs/os-specific/linux/zfs/libblkid-1db7b9b.patch
new file mode 100644
index 000000000000..894bf395ce85
--- /dev/null
+++ b/pkgs/os-specific/linux/zfs/libblkid-1db7b9b.patch
@@ -0,0 +1,118 @@
+commit 1db7b9be75a225cedb3b7a60028ca5695e5b8346
+Author: Richard Yao <ryao@gentoo.org>
+Date:   Wed Aug 28 16:17:47 2013 -0400
+
+    Fix libblkid support
+    
+    libblkid support is dormant because the autotools check is broken and
+    liblkid identifies ZFS vdevs as "zfs_member", not "zfs". We fix that
+    with a few changes:
+    
+    First, we fix the libblkid autotools check to do a few things:
+    
+    1. Make a 64MB file, which is the minimum size ZFS permits.
+    2. Make 4 fake uberblock entries to make libblkid's check succeed.
+    3. Return 0 upon success to make autotools use the success case.
+    4. Include stdlib.h to avoid implicit declration of free().
+    5. Check for "zfs_member", not "zfs"
+    6. Make --with-blkid disable autotools check (avoids Gentoo sandbox violation)
+    7. Pass '-lblkid' correctly using LIBS not LDFLAGS.
+    
+    Second, we change the libblkid support to scan for "zfs_member", not
+    "zfs".
+    
+    This makes --with-blkid work on Gentoo.
+    
+    Signed-off-by: Richard Yao <ryao@gentoo.org>
+    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+    Issue #1751
+
+diff --git a/config/user-libblkid.m4 b/config/user-libblkid.m4
+index 276587f..2dd2623 100644
+--- a/config/user-libblkid.m4
++++ b/config/user-libblkid.m4
+@@ -22,26 +22,45 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_LIBBLKID], [
+ 		[with_blkid=check])
+ 
+ 	LIBBLKID=
+-	AS_IF([test "x$with_blkid" != xno],
++	AS_IF([test "x$with_blkid" = xyes],
++	[
++		AC_SUBST([LIBBLKID], ["-lblkid"])
++		AC_DEFINE([HAVE_LIBBLKID], 1,
++			[Define if you have libblkid])
++	])
++
++	AS_IF([test "x$with_blkid" = xcheck],
+ 	[
+ 		AC_CHECK_LIB([blkid], [blkid_get_cache],
+ 		[
+ 			AC_MSG_CHECKING([for blkid zfs support])
+ 
+ 			ZFS_DEV=`mktemp`
+-			dd if=/dev/zero of=$ZFS_DEV bs=1024k count=8 \
++			truncate -s 64M $ZFS_DEV
++			echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
++				dd of=$ZFS_DEV bs=1k count=8 \
++				seek=128 conv=notrunc &>/dev/null \
+ 				>/dev/null 2>/dev/null
+ 			echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
+ 				dd of=$ZFS_DEV bs=1k count=8 \
+ 				seek=132 conv=notrunc &>/dev/null \
+ 				>/dev/null 2>/dev/null
++			echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
++				dd of=$ZFS_DEV bs=1k count=8 \
++				seek=136 conv=notrunc &>/dev/null \
++				>/dev/null 2>/dev/null
++			echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
++				dd of=$ZFS_DEV bs=1k count=8 \
++				seek=140 conv=notrunc &>/dev/null \
++				>/dev/null 2>/dev/null
+ 
+-			saved_LDFLAGS="$LDFLAGS"
+-			LDFLAGS="-lblkid"
++			saved_LIBS="$LIBS"
++			LIBS="-lblkid"
+ 
+ 			AC_RUN_IFELSE([AC_LANG_PROGRAM(
+ 			[
+ 				#include <stdio.h>
++				#include <stdlib.h>
+ 				#include <blkid/blkid.h>
+ 			],
+ 			[
+@@ -58,10 +77,10 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_LIBBLKID], [
+ 					return 2;
+ 				}
+ 
+-				if (strcmp(value, "zfs")) {
++				if (strcmp(value, "zfs_member")) {
+ 					free(value);
+ 					blkid_put_cache(cache);
+-					return 3;
++					return 0;
+ 				}
+ 
+ 				free(value);
+@@ -82,7 +101,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_LIBBLKID], [
+ 					[--with-blkid given but unavailable])])
+ 			])
+ 
+-			LDFLAGS="$saved_LDFLAGS"
++			LIBS="$saved_LIBS"
+ 		],
+ 		[
+ 			AS_IF([test "x$with_blkid" != xcheck],
+diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c
+index 53609f2..d1fa98e 100644
+--- a/lib/libzfs/libzfs_import.c
++++ b/lib/libzfs/libzfs_import.c
+@@ -965,7 +965,7 @@ zpool_find_import_blkid(libzfs_handle_t *hdl, pool_list_t *pools)
+ 		goto err_blkid2;
+ 	}
+ 
+-	err = blkid_dev_set_search(iter, "TYPE", "zfs");
++	err = blkid_dev_set_search(iter, "TYPE", "zfs_member");
+ 	if (err != 0) {
+ 		(void) zfs_error_fmt(hdl, EZFS_BADCACHE,
+ 		    dgettext(TEXT_DOMAIN, "blkid_dev_set_search() %d"), err);
diff --git a/pkgs/servers/amqp/rabbitmq-server/default.nix b/pkgs/servers/amqp/rabbitmq-server/default.nix
index 4bb05a23fafc..45a6c2189db6 100644
--- a/pkgs/servers/amqp/rabbitmq-server/default.nix
+++ b/pkgs/servers/amqp/rabbitmq-server/default.nix
@@ -4,11 +4,11 @@
 stdenv.mkDerivation rec {
   name = "rabbitmq-server-${version}";
 
-  version = "3.2.1";
+  version = "3.2.4";
 
   src = fetchurl {
     url = "http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/${name}.tar.gz";
-    sha256 = "0j9yx64sdgkv0h20zjs65aa2ag6wwv50i6hd3x69m0cc6shzcc0f";
+    sha256 = "17rvqhzcb7rscp228vmgixk0rsqi42m820jzxj9g5wid6qmzjc59";
   };
 
   buildInputs =
diff --git a/pkgs/servers/gpsd/0001-Import-LD_LIBRARY_PATH-to-allow-running-scons-check-.patch b/pkgs/servers/gpsd/0001-Import-LD_LIBRARY_PATH-to-allow-running-scons-check-.patch
new file mode 100644
index 000000000000..3a38340f43a3
--- /dev/null
+++ b/pkgs/servers/gpsd/0001-Import-LD_LIBRARY_PATH-to-allow-running-scons-check-.patch
@@ -0,0 +1,25 @@
+From d7e56abcae8bcb85dc935e94418a2f0e9956941b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com>
+Date: Mon, 17 Feb 2014 20:52:50 +0000
+Subject: [PATCH 1/2] Import LD_LIBRARY_PATH to allow running 'scons check'
+ without 'chrpath'
+
+---
+ SConstruct | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/SConstruct b/SConstruct
+index 14e2f59..86b94bc 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -215,6 +215,7 @@ import_env = (
+     'PKG_CONFIG_LIBDIR',      # Pass more environment variables to pkg-config (required for crossbuilds)
+     'STAGING_DIR',     # Required by the OpenWRT and CeroWrt builds.
+     'STAGING_PREFIX',  # Required by the OpenWRT and CeroWrt builds.
++    'LD_LIBRARY_PATH', # Allows running 'scons check' without 'chrpath'
+     )
+ envs = {}
+ for var in import_env:
+-- 
+1.9.0
+
diff --git a/pkgs/servers/gpsd/0002-Import-XML_CATALOG_FILES-to-be-able-to-validate-the-.patch b/pkgs/servers/gpsd/0002-Import-XML_CATALOG_FILES-to-be-able-to-validate-the-.patch
new file mode 100644
index 000000000000..f12d7a52ba0c
--- /dev/null
+++ b/pkgs/servers/gpsd/0002-Import-XML_CATALOG_FILES-to-be-able-to-validate-the-.patch
@@ -0,0 +1,28 @@
+From aed93b6ada5b9b76b85d11d9bad732ca005295af Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com>
+Date: Sat, 15 Mar 2014 15:08:01 +0100
+Subject: [PATCH 2/2] Import XML_CATALOG_FILES to be able to validate the
+ manual
+
+In nixos/nixpkgs, 'xmlto' depends on $XML_CATALOG_FILES to be able to
+validate XML documents. Because without it, it'll try to go online to
+download DTD's and builders don't have network access...
+---
+ SConstruct | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/SConstruct b/SConstruct
+index 86b94bc..a0b3d25 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -216,6 +216,7 @@ import_env = (
+     'STAGING_DIR',     # Required by the OpenWRT and CeroWrt builds.
+     'STAGING_PREFIX',  # Required by the OpenWRT and CeroWrt builds.
+     'LD_LIBRARY_PATH', # Allows running 'scons check' without 'chrpath'
++    'XML_CATALOG_FILES', # Enables validating the manual with 'xmlto' using nix build system
+     )
+ envs = {}
+ for var in import_env:
+-- 
+1.9.0
+
diff --git a/pkgs/servers/gpsd/default.nix b/pkgs/servers/gpsd/default.nix
index 25051167ca51..a52ca2b6871b 100644
--- a/pkgs/servers/gpsd/default.nix
+++ b/pkgs/servers/gpsd/default.nix
@@ -1,54 +1,87 @@
-{ fetchurl, stdenv, pythonPackages, pkgconfig, dbus, dbus_glib
+{ fetchurl, stdenv, scons, pythonFull, pkgconfig, dbus, dbus_glib
 , ncurses, libX11, libXt, libXpm, libXaw, libXext, makeWrapper
 , libusb1, docbook_xml_dtd_412, docbook_xsl, bc
-, libxslt, xmlto, gpsdUser ? "gpsd" }:
+, libxslt, xmlto, gpsdUser ? "gpsd", gpsdGroup ? "dialout"
+}:
+
+# TODO: the 'xgps' program doesn't work: "ImportError: No module named gobject"
+# TODO: put the X11 deps behind a guiSupport parameter for headless support
 
 stdenv.mkDerivation rec {
-  name = "gpsd-2.95";
+  name = "gpsd-3.10";
 
   src = fetchurl {
-    url = "http://download.berlios.de/gpsd/${name}.tar.gz";
-    sha256 = "1bjhyjg561kwp6zc2wg58njdvpnsj5yaa2slz8g3ga1176jl68w3";
+    url = "http://download-mirror.savannah.gnu.org/releases/gpsd/${name}.tar.gz";
+    sha256 = "0823hl5zgwnbgm0fq3i4z34lv76cpj0k6m0zjiygiyrxrz0w4vvh";
   };
 
-  nativeBuildInputs = [ makeWrapper pkgconfig docbook_xml_dtd_412 docbook_xsl
-    xmlto bc pythonPackages.wrapPython ];
+  nativeBuildInputs = [
+    scons makeWrapper pkgconfig docbook_xml_dtd_412 docbook_xsl xmlto bc
+    pythonFull
+  ];
 
-  pythonPath = [ pythonPackages.curses ];
+  buildInputs = [
+    pythonFull dbus dbus_glib ncurses libX11 libXt libXpm libXaw libXext
+    libxslt libusb1
+  ];
 
-  buildInputs = [ pythonPackages.python dbus dbus_glib ncurses libX11 libXt
-    libXpm libXaw libXext libxslt libusb1 ];
+  patches = [
+    ./0001-Import-LD_LIBRARY_PATH-to-allow-running-scons-check-.patch
+    ./0002-Import-XML_CATALOG_FILES-to-be-able-to-validate-the-.patch
+  ];
 
-  configureFlags = "--enable-static --enable-dbus --enable-gpsd-user=${gpsdUser}";
+  # - leapfetch=no disables going online at build time to fetch leap-seconds
+  #   info. See <gpsd-src>/build.txt for more info.
+  # - chrpath=no stops the build from using 'chrpath' (which we don't have).
+  #   'chrpath' is used to be able to run the tests from the source tree, but
+  #   we use $LD_LIBRARY_PATH instead.
+  buildPhase = ''
+    patchShebangs .
+    mkdir -p "$out"
+    sed -e "s|python_lib_dir = .*|python_lib_dir = \"$out/lib/${pythonFull.python.libPrefix}/site-packages\"|" -i SConstruct
+    scons prefix="$out" leapfetch=no gpsd_user=${gpsdUser} gpsd_group=${gpsdGroup} \
+        systemd=yes udevdir="$out/lib/udev" chrpath=no
+  '';
 
   doCheck = true;
 
-  postInstall = "wrapPythonPrograms";
+  checkPhase = ''
+    export LD_LIBRARY_PATH="$PWD"
+    scons check
+  '';
+
+  # TODO: the udev rules file and the hotplug script need fixes to work on NixOS
+  installPhase = ''
+    scons install
+    mkdir -p "$out/lib/udev/rules.d"
+    scons udev-install
+  '';
 
-  meta = {
-    description = "`gpsd', a GPS service daemon";
+  postInstall = "wrapPythonPrograms";
 
+  meta = with stdenv.lib; {
+    description = "GPS service daemon";
     longDescription = ''
-      gpsd is a service daemon that monitors one or more GPSes
-      attached to a host computer through serial or USB ports, making
-      all data on the location/course/velocity of the sensors
-      available to be queried on TCP port 2947 of the host computer.
-      With gpsd, multiple GPS client applications (such as
-      navigational and wardriving software) can share access to GPSes
-      without contention or loss of data.  Also, gpsd responds to
-      queries with a format that is substantially easier to parse than
-      the NMEA 0183 emitted by most GPSes.  The gpsd distribution
-      includes a linkable C service library, a C++ wrapper class, and
-      a Python module that developers of gpsd-aware applications can
-      use to encapsulate all communication with gpsd.
+      gpsd is a service daemon that monitors one or more GPSes or AIS
+      receivers attached to a host computer through serial or USB ports,
+      making all data on the location/course/velocity of the sensors
+      available to be queried on TCP port 2947 of the host computer. With
+      gpsd, multiple location-aware client applications (such as navigational
+      and wardriving software) can share access to receivers without
+      contention or loss of data. Also, gpsd responds to queries with a
+      format that is substantially easier to parse than the NMEA 0183 emitted
+      by most GPSes. The gpsd distribution includes a linkable C service
+      library, a C++ wrapper class, and a Python module that developers of
+      gpsd-aware applications can use to encapsulate all communication with
+      gpsd. Third-party client bindings for Java and Perl also exist.
 
       Besides gpsd itself, the project provides auxiliary tools for
-      diagnostic monitoring and profiling of GPSes and feeding
-      GPS-aware applications GPS logs for diagnostic purposes.
+      diagnostic monitoring and profiling of receivers and feeding
+      location-aware applications GPS/AIS logs for diagnostic purposes.
     '';
-
-    homepage = http://gpsd.berlios.de/;
-
+    homepage = http://catb.org/gpsd/;
     license = "BSD-style";
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
   };
 }
diff --git a/pkgs/servers/http/tomcat/6.0.nix b/pkgs/servers/http/tomcat/6.0.nix
index d8304ba4dbee..ee0049ce08f6 100644
--- a/pkgs/servers/http/tomcat/6.0.nix
+++ b/pkgs/servers/http/tomcat/6.0.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl }:
 
-let version = "6.0.37"; in
+let version = "6.0.39"; in
 
 stdenv.mkDerivation rec {
   name = "apache-tomcat-${version}";
 
   src = fetchurl {
     url = "mirror://apache/tomcat/tomcat-6/v${version}/bin/${name}.tar.gz";
-    sha256 = "000v63amhbyp8nkw3a4pff1vm4nxri5n9j7rknhnqaxzab3sp49y";
+    sha256 = "19qix6affhc252n03smjf482drg3nxd27shni1gvhphgj3zfmgfy";
   };
 
   installPhase =
diff --git a/pkgs/servers/irc/ngircd/default.nix b/pkgs/servers/irc/ngircd/default.nix
new file mode 100644
index 000000000000..738881e2aafe
--- /dev/null
+++ b/pkgs/servers/irc/ngircd/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, zlib, openssl, pam, libiconvOrNull }:
+
+stdenv.mkDerivation rec {
+  name = "ngircd-21";
+
+  src = fetchurl {
+    url = "http://ngircd.barton.de/pub/ngircd/${name}.tar.xz";
+    sha256 = "19llx54zy6hc8k7kcs1f234qc20mqpnlnb30c663c42jxq5x6xii";
+  };
+
+  configureFlags = [
+    "--with-syslog"
+    "--with-zlib"
+    "--with-pam"
+    "--with-openssl"
+    "--enable-ipv6"
+    "--with-iconv"
+  ];
+
+  buildInputs = [ zlib pam openssl libiconvOrNull ];
+
+  meta = {
+    description = "Next Generation IRC Daemon";
+    homepage    = http://ngircd.barton.de;
+    license     = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.shlevy ];
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/servers/mail/dovecot/2.2.x-module_dir.patch b/pkgs/servers/mail/dovecot/2.2.x-module_dir.patch
index cce63fe250c6..3ba11d41b1bd 100644
--- a/pkgs/servers/mail/dovecot/2.2.x-module_dir.patch
+++ b/pkgs/servers/mail/dovecot/2.2.x-module_dir.patch
@@ -1,6 +1,6 @@
-diff -ur dovecot-2.2.2-orig/src/auth/main.c dovecot-2.2.2/src/auth/main.c
---- dovecot-2.2.2-orig/src/auth/main.c	2013-03-13 15:26:46.000000000 +0100
-+++ dovecot-2.2.2/src/auth/main.c	2013-05-20 20:23:58.126024535 +0200
+diff -ur dovecot-2.2.12-orig/src/auth/main.c dovecot-2.2.12/src/auth/main.c
+--- dovecot-2.2.12-orig/src/auth/main.c	2014-02-11 23:23:37.000000000 +0100
++++ dovecot-2.2.12/src/auth/main.c	2014-03-14 09:28:17.642334838 +0100
 @@ -193,7 +193,7 @@
  	mod_set.debug = global_auth_settings->debug;
  	mod_set.filter_callback = auth_module_filter;
@@ -19,10 +19,10 @@ diff -ur dovecot-2.2.2-orig/src/auth/main.c dovecot-2.2.2/src/auth/main.c
  					  &mod_set);
  	module_dir_init(modules);
  }
-diff -ur dovecot-2.2.2-orig/src/config/all-settings.c dovecot-2.2.2/src/config/all-settings.c
---- dovecot-2.2.2-orig/src/config/all-settings.c	2013-05-15 12:20:55.000000000 +0200
-+++ dovecot-2.2.2/src/config/all-settings.c	2013-05-21 00:31:46.624073562 +0200
-@@ -766,7 +766,7 @@
+diff -ur dovecot-2.2.12-orig/src/config/all-settings.c dovecot-2.2.12/src/config/all-settings.c
+--- dovecot-2.2.12-orig/src/config/all-settings.c	2014-02-11 23:31:37.000000000 +0100
++++ dovecot-2.2.12/src/config/all-settings.c	2014-03-14 09:32:08.907608311 +0100
+@@ -773,7 +773,7 @@
  	.last_valid_gid = 0,
  
  	.mail_plugins = "",
@@ -31,18 +31,19 @@ diff -ur dovecot-2.2.2-orig/src/config/all-settings.c dovecot-2.2.2/src/config/a
  
  	.mail_log_prefix = "%s(%u): ",
  
-@@ -3274,7 +3274,7 @@
+@@ -3304,7 +3304,7 @@
  	.base_dir = PKG_RUNDIR,
  	.libexec_dir = PKG_LIBEXECDIR,
  	.mail_plugins = "",
 -	.mail_plugin_dir = MODULEDIR,
 +	.mail_plugin_dir = "/var/lib/dovecot/modules",
+ 	.auth_socket_path = "auth-userdb",
  	.doveadm_socket_path = "doveadm-server",
  	.doveadm_worker_count = 0,
- 	.doveadm_port = 0,
-diff -ur dovecot-2.2.2-orig/src/config/config-parser.c dovecot-2.2.2/src/config/config-parser.c
---- dovecot-2.2.2-orig/src/config/config-parser.c	2013-02-04 22:05:42.000000000 +0100
-+++ dovecot-2.2.2/src/config/config-parser.c	2013-05-20 20:23:58.106024534 +0200
+Only in dovecot-2.2.12/src/config: all-settings.c.orig
+diff -ur dovecot-2.2.12-orig/src/config/config-parser.c dovecot-2.2.12/src/config/config-parser.c
+--- dovecot-2.2.12-orig/src/config/config-parser.c	2014-02-11 23:23:37.000000000 +0100
++++ dovecot-2.2.12/src/config/config-parser.c	2014-03-14 09:28:17.645334840 +0100
 @@ -990,7 +990,7 @@
  
  	memset(&mod_set, 0, sizeof(mod_set));
@@ -52,9 +53,9 @@ diff -ur dovecot-2.2.2-orig/src/config/config-parser.c dovecot-2.2.2/src/config/
  	module_dir_init(modules);
  
  	i_array_init(&new_roots, 64);
-diff -ur dovecot-2.2.2-orig/src/dict/main.c dovecot-2.2.2/src/dict/main.c
---- dovecot-2.2.2-orig/src/dict/main.c	2013-02-04 22:05:42.000000000 +0100
-+++ dovecot-2.2.2/src/dict/main.c	2013-05-20 20:23:58.101024534 +0200
+diff -ur dovecot-2.2.12-orig/src/dict/main.c dovecot-2.2.12/src/dict/main.c
+--- dovecot-2.2.12-orig/src/dict/main.c	2014-02-11 23:23:37.000000000 +0100
++++ dovecot-2.2.12/src/dict/main.c	2014-03-14 09:28:17.645334840 +0100
 @@ -61,7 +61,7 @@
  	mod_set.abi_version = DOVECOT_ABI_VERSION;
  	mod_set.require_init_funcs = TRUE;
@@ -64,22 +65,23 @@ diff -ur dovecot-2.2.2-orig/src/dict/main.c dovecot-2.2.2/src/dict/main.c
  	module_dir_init(modules);
  
  	/* Register only after loading modules. They may contain SQL drivers,
-diff -ur dovecot-2.2.2-orig/src/doveadm/doveadm-settings.c dovecot-2.2.2/src/doveadm/doveadm-settings.c
---- dovecot-2.2.2-orig/src/doveadm/doveadm-settings.c	2013-04-07 19:13:06.000000000 +0200
-+++ dovecot-2.2.2/src/doveadm/doveadm-settings.c	2013-05-20 20:23:58.399024539 +0200
-@@ -76,7 +76,7 @@
+diff -ur dovecot-2.2.12-orig/src/doveadm/doveadm-settings.c dovecot-2.2.12/src/doveadm/doveadm-settings.c
+--- dovecot-2.2.12-orig/src/doveadm/doveadm-settings.c	2014-02-11 23:23:37.000000000 +0100
++++ dovecot-2.2.12/src/doveadm/doveadm-settings.c	2014-03-14 09:32:56.540087069 +0100
+@@ -77,7 +77,7 @@
  	.base_dir = PKG_RUNDIR,
  	.libexec_dir = PKG_LIBEXECDIR,
  	.mail_plugins = "",
 -	.mail_plugin_dir = MODULEDIR,
 +	.mail_plugin_dir = "/var/lib/dovecot/modules",
+ 	.auth_socket_path = "auth-userdb",
  	.doveadm_socket_path = "doveadm-server",
  	.doveadm_worker_count = 0,
- 	.doveadm_port = 0,
-diff -ur dovecot-2.2.2-orig/src/lib-fs/fs-api.c dovecot-2.2.2/src/lib-fs/fs-api.c
---- dovecot-2.2.2-orig/src/lib-fs/fs-api.c	2013-04-18 16:07:26.000000000 +0200
-+++ dovecot-2.2.2/src/lib-fs/fs-api.c	2013-05-20 20:23:58.099024534 +0200
-@@ -82,7 +82,7 @@
+Only in dovecot-2.2.12/src/doveadm: doveadm-settings.c.orig
+diff -ur dovecot-2.2.12-orig/src/lib-fs/fs-api.c dovecot-2.2.12/src/lib-fs/fs-api.c
+--- dovecot-2.2.12-orig/src/lib-fs/fs-api.c	2014-02-11 23:23:37.000000000 +0100
++++ dovecot-2.2.12/src/lib-fs/fs-api.c	2014-03-14 09:28:17.646334843 +0100
+@@ -89,7 +89,7 @@
  	mod_set.abi_version = DOVECOT_ABI_VERSION;
  	mod_set.ignore_missing = TRUE;
  
@@ -88,10 +90,11 @@ diff -ur dovecot-2.2.2-orig/src/lib-fs/fs-api.c dovecot-2.2.2/src/lib-fs/fs-api.
  					     module_name, &mod_set);
  	module_dir_init(fs_modules);
  
-diff -ur dovecot-2.2.2-orig/src/lib-ssl-iostream/iostream-ssl.c dovecot-2.2.2/src/lib-ssl-iostream/iostream-ssl.c
---- dovecot-2.2.2-orig/src/lib-ssl-iostream/iostream-ssl.c	2013-04-09 22:45:19.000000000 +0200
-+++ dovecot-2.2.2/src/lib-ssl-iostream/iostream-ssl.c	2013-05-20 20:23:58.089024534 +0200
-@@ -28,7 +28,7 @@
+Only in dovecot-2.2.12/src/lib-fs: fs-api.c.orig
+diff -ur dovecot-2.2.12-orig/src/lib-ssl-iostream/iostream-ssl.c dovecot-2.2.12/src/lib-ssl-iostream/iostream-ssl.c
+--- dovecot-2.2.12-orig/src/lib-ssl-iostream/iostream-ssl.c	2014-02-11 23:23:37.000000000 +0100
++++ dovecot-2.2.12/src/lib-ssl-iostream/iostream-ssl.c	2014-03-14 09:28:17.646334843 +0100
+@@ -30,7 +30,7 @@
  	memset(&mod_set, 0, sizeof(mod_set));
  	mod_set.abi_version = DOVECOT_ABI_VERSION;
  	mod_set.setting_name = "<built-in lib-ssl-iostream lookup>";
@@ -100,10 +103,11 @@ diff -ur dovecot-2.2.2-orig/src/lib-ssl-iostream/iostream-ssl.c dovecot-2.2.2/sr
  
  	ssl_vfuncs = module_get_symbol(ssl_module, "ssl_vfuncs");
  	if (ssl_vfuncs == NULL) {
-diff -ur dovecot-2.2.2-orig/src/lib-storage/mail-storage-settings.c dovecot-2.2.2/src/lib-storage/mail-storage-settings.c
---- dovecot-2.2.2-orig/src/lib-storage/mail-storage-settings.c	2013-05-15 12:20:00.000000000 +0200
-+++ dovecot-2.2.2/src/lib-storage/mail-storage-settings.c	2013-05-20 20:23:57.858024531 +0200
-@@ -260,7 +260,7 @@
+Only in dovecot-2.2.12/src/lib-ssl-iostream: iostream-ssl.c.orig
+diff -ur dovecot-2.2.12-orig/src/lib-storage/mail-storage-settings.c dovecot-2.2.12/src/lib-storage/mail-storage-settings.c
+--- dovecot-2.2.12-orig/src/lib-storage/mail-storage-settings.c	2014-02-11 23:23:37.000000000 +0100
++++ dovecot-2.2.12/src/lib-storage/mail-storage-settings.c	2014-03-14 09:28:17.646334843 +0100
+@@ -262,7 +262,7 @@
  	.last_valid_gid = 0,
  
  	.mail_plugins = "",
@@ -112,3 +116,4 @@ diff -ur dovecot-2.2.2-orig/src/lib-storage/mail-storage-settings.c dovecot-2.2.
  
  	.mail_log_prefix = "%s(%u): ",
  
+Only in dovecot-2.2.12/src/lib-storage: mail-storage-settings.c.orig
diff --git a/pkgs/servers/mail/dovecot/2.2.x.nix b/pkgs/servers/mail/dovecot/2.2.x.nix
index 06635e33954f..2b1aca3e9269 100644
--- a/pkgs/servers/mail/dovecot/2.2.x.nix
+++ b/pkgs/servers/mail/dovecot/2.2.x.nix
@@ -2,13 +2,13 @@
 , inotifyTools }:
 
 stdenv.mkDerivation rec {
-  name = "dovecot-2.2.6";
+  name = "dovecot-2.2.12";
 
   buildInputs = [perl systemd openssl pam bzip2 zlib openldap inotifyTools];
 
   src = fetchurl {
     url = "http://dovecot.org/releases/2.2/${name}.tar.gz";
-    sha256 = "1rfnsg0a57cv02pl68h3jhbd5v3071a75bvf9gs95fd41g72n9v2";
+    sha256 = "0mlcwgrxfwy1fqfk3wwbh1h9f0jddg4rnj612ckj1zv5asp1rppk";
   };
 
   preConfigure = ''
diff --git a/pkgs/servers/openafs-client/default.nix b/pkgs/servers/openafs-client/default.nix
index ba0b80fc61e8..47c8c12edef6 100644
--- a/pkgs/servers/openafs-client/default.nix
+++ b/pkgs/servers/openafs-client/default.nix
@@ -4,11 +4,11 @@
 assert stdenv.isLinux;
 
 stdenv.mkDerivation {
-  name = "openafs-1.6.1-${kernel.version}";
+  name = "openafs-1.6.6-${kernel.version}";
 
   src = fetchurl {
-    url = http://www.openafs.org/dl/openafs/1.6.1/openafs-1.6.1-src.tar.bz2;
-    sha256 = "1c7mid0dwl2x0sikr70bi5cs881y6pa4dfwkdmr3jscvx3wgfpnh";
+    url = http://www.openafs.org/dl/openafs/1.6.6/openafs-1.6.6-src.tar.bz2;
+    sha256 = "0xfa64hvz0avp89zgz8ksmp24s6ns0z3103m4mspshhhdlikypk3";
   };
 
   buildInputs = [ autoconf automake flex yacc ncurses perl which ];
@@ -41,6 +41,5 @@ stdenv.mkDerivation {
     license = stdenv.lib.licenses.ipl10;
     platforms = stdenv.lib.platforms.linux;
     maintainers = stdenv.lib.maintainers.z77z;
-    broken = true;
   };
 }
diff --git a/pkgs/servers/search/elasticsearch/default.nix b/pkgs/servers/search/elasticsearch/default.nix
index 165a01517b43..c6939ce5f7a4 100644
--- a/pkgs/servers/search/elasticsearch/default.nix
+++ b/pkgs/servers/search/elasticsearch/default.nix
@@ -1,10 +1,10 @@
 { stdenv, fetchurl, makeWrapper, jre, utillinux }:
 stdenv.mkDerivation rec {
-  name = "elasticsearch-1.0.0";
+  name = "elasticsearch-1.0.1";
 
   src = fetchurl {
     url = "https://download.elasticsearch.org/elasticsearch/elasticsearch/${name}.tar.gz";
-    sha256 = "06ym7hl47339a5dav2hawnxv820y0lbvh9xxd0lfp1f815vbql01";
+    sha256 = "0nwv7llw7gk94alfcpxxy0lybhnw7fggv30v7ylsxn20id9g7kba";
   };
 
   patches = [ ./es-home.patch ];
diff --git a/pkgs/servers/serfdom/default.nix b/pkgs/servers/serfdom/default.nix
index 13c878888e29..274fc89f94d0 100644
--- a/pkgs/servers/serfdom/default.nix
+++ b/pkgs/servers/serfdom/default.nix
@@ -1,80 +1,105 @@
-{ stdenv, fetchurl, fetchgit, go, lib }:
+{ stdenv, fetchurl, fetchgit, fetchhg, go, lib }:
 
 let
   goDeps = [
     {
-      dir    = "github.com/hashicorp";
-      name   = "serf";
-      rev    = "21113c8207d8e02b7ff738c9be80fcaabf67251d";
-      sha256 = "10lmgb0caffp0x02nriahyfq9p6qkhr8carfq38m8cjxqxs2v0nk";
+      dir     = "github.com/hashicorp";
+      name    = "serf";
+      rev     = "c5b41a9d1d261135117a8d501d3293efade3cc74";
+      sha256  = "a314d3c13fb370842a8f7c6650abfa907b51172a09c64f9184a240fab05b43df";
+      fetcher = git;
     }
     {
-      dir    = "github.com/armon";
-      name   = "go-metrics";
-      rev    = "8ceaed1d0bc3a25db6e65e79ee4f895013313c17";
-      sha256 = "1yzajmx26br4812m9gz4v7qj6fcmhg4a9jz9l3i20hh2x06srmpg";
+      dir     = "github.com/armon";
+      name    = "go-metrics";
+      rev     = "e12c3591b520e819e8234bd585d592774f2b2ad5";
+      sha256  = "79476efefb68876fcad7e71e76d95f4a7eece2cfcdc5a9c10f998af3178230ba";
+      fetcher = git;
     }
     {
-      dir    = "github.com/hashicorp";
-      name   = "logutils";
-      rev    = "8e0820fe7ac5eb2b01626b1d99df47c5449eb2d8";
-      sha256 = "184lnn7x1v3xvj6zz1rg9s0252wkkd59kij2iyrrm7y80bym2jys";
+      dir     = "github.com/hashicorp";
+      name    = "logutils";
+      rev     = "8e0820fe7ac5eb2b01626b1d99df47c5449eb2d8";
+      sha256  = "184lnn7x1v3xvj6zz1rg9s0252wkkd59kij2iyrrm7y80bym2jys";
+      fetcher = git;
     }
     {
-      dir    = "github.com/hashicorp";
-      name   = "memberlist";
-      rev    = "825ad4aca57c7323e8dadde149bfdec9d9621ffe";
-      sha256 = "0mm0hm2kncafq5ml58ki7ilh3b47ni0w19n50ilahhhm4lsfry7z";
+      dir     = "github.com/hashicorp";
+      name    = "memberlist";
+      rev     = "d5be01d1f4d75b086eba4ae808f2767c08cbbf73";
+      sha256  = "4ab2b610d439e96c169d9caf9ac0e009d71d3ef9a2fd2c812870b71eb6b27dfc";
+      fetcher = git;
     }
     {
-      dir    = "github.com/ugorji";
-      name   = "go";
-      rev    = "cdeae7b76625959e4164eab9eb303087a794f2cc";
-      sha256 = "0pcjlbhp6vxnksy12rav6c8bvi2v010407l5hibxqdvnampvhlkb";
+      dir     = "github.com/ugorji";
+      name    = "go";
+      rev     = "71c2886f5a673a35f909803f38ece5810165097b";
+      sha256  = "128853bcc5f114c300772cbce316b55e84206fa56705c5b9cc94c1693b11ee94";
+      fetcher = git;
     }
     {
-      dir    = "github.com/mitchellh";
-      name   = "cli";
-      rev    = "69f0b65ce53b27f729b1b807b88dc88007f41dd3";
-      sha256 = "0hnnqd8vg5ca2hglkrj141ba2akdh7crl2lsrgz8d6ipw6asszx3";
+      dir     = "github.com/mitchellh";
+      name    = "cli";
+      rev     = "69f0b65ce53b27f729b1b807b88dc88007f41dd3";
+      sha256  = "0hnnqd8vg5ca2hglkrj141ba2akdh7crl2lsrgz8d6ipw6asszx3";
+      fetcher = git;
     }
     {
-      dir    = "github.com/armon";
-      name   = "mdns";
-      rev    = "17be83de467449f38a8395c30534a9cf0c03e5ea";
-      sha256 = "1fhb6vldclgdx9aqqh1gl87cl5sw3nbq9b7mibkljhbk3cdajyxn";
+      dir     = "github.com/armon";
+      name    = "mdns";
+      rev     = "8be7e3ac4e941555169a99d01abcabd3c982d87a";
+      sha256  = "87cd3a0ada3b094ee8fc4c4742158e0d051cde893da1ea320158a47d6254f69d";
+      fetcher = git;
     }
     {
-      dir    = "github.com/miekg";
-      name   = "dns";
-      rev    = "5eec7f362c392f0a7eaadea69b13667d665feb82";
-      sha256 = "0irlzhd78qmn3lyfbkxmwajv0mm6jp6x0cg7hb9hyj6d01ynlv09";
+      dir     = "github.com/miekg";
+      name    = "dns";
+      rev     = "7ebb4c59b39d5984952a355086606dd91f6cfe86";
+      sha256  = "8418ad2d27e607cef1dc0003471416294443e467f2de9df135e3a2ab411e2512";
+      fetcher = git;
     }
     {
-      dir    = "github.com/mitchellh";
-      name   = "mapstructure";
-      rev    = "57bb2fa7a7e00b26c80e4c4b0d4f15a210d94039";
-      sha256 = "13lvd5vw8y6h5zl3samkrb7237kk778cky7k7ys1cm46mfd957zy";
+      dir     = "github.com/mitchellh";
+      name    = "mapstructure";
+      rev     = "57bb2fa7a7e00b26c80e4c4b0d4f15a210d94039";
+      sha256  = "13lvd5vw8y6h5zl3samkrb7237kk778cky7k7ys1cm46mfd957zy";
+      fetcher = git;
+    }
+    {
+      dir     = "github.com/ryanuber";
+      name    = "columnize";
+      rev     = "d066e113d6e13232f45bda646a915dffeee7f1a4";
+      sha256  = "2aaec396a223fc4b45117a595e74c0a874bd5cd9604c742b8c4747436b4721e9";
+      fetcher = git;
+    }
+    {
+      dir     = "code.google.com/p";
+      name    = "go.net";
+      rev     = "89dbba2db2d4";
+      sha256  = "0168inai10nkdrz4g0rjlj8b5v34mv135v8bhyvh501vnqql50jn";
+      fetcher = hg;
     }
   ];
+  git = desc: fetchgit { url = "https://${desc.dir}/${desc.name}";
+                         inherit (desc) rev sha256; };
+  hg = desc: fetchhg { url = "https://${desc.dir}/${desc.name}";
+                       tag = desc.rev;
+                       inherit (desc) sha256; };
   createGoPathCmds =
     lib.concatStrings
       (map (desc:
-            let
-              fetched = fetchgit { url = "https://${desc.dir}/${desc.name}";
-                                   inherit (desc) rev sha256; };
-            in ''
+            let fetched = desc.fetcher desc; in ''
               mkdir -p $GOPATH/src/${desc.dir}
               ln -s ${fetched} $GOPATH/src/${desc.dir}/${desc.name}
             '') goDeps);
 in
   stdenv.mkDerivation rec {
-    version = "0.4.1";
+    version = "0.5.0";
     name = "serfdom-${version}";
 
     src = fetchurl {
       url = "https://github.com/hashicorp/serf/archive/v${version}.tar.gz";
-      sha256 = "0f4fxhw2r31ks9rs9h3wx9lsymnp8szk0gzggvibwhl2bm6kn6d8";
+      sha256 = "1p2cpkdx0gck1ypxc98im7gsv3275avpkizhsif3nxvl1xd8g1qp";
     };
 
     buildInputs = [ go ];
diff --git a/pkgs/servers/sql/postgresql/9.3.x.nix b/pkgs/servers/sql/postgresql/9.3.x.nix
index 7f6e2d25d187..3b5c820c94d1 100644
--- a/pkgs/servers/sql/postgresql/9.3.x.nix
+++ b/pkgs/servers/sql/postgresql/9.3.x.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, zlib, readline }:
+{ stdenv, fetchurl, zlib, readline, libossp_uuid }:
 
 let version = "9.3.3"; in
 
@@ -10,12 +10,17 @@ stdenv.mkDerivation rec {
     sha256 = "e925d8abe7157bd8bece6b7c0dd0c343d87a2b4336f85f4681ce596af99c3879";
   };
 
-  buildInputs = [ zlib readline ];
+  buildInputs = [ zlib readline libossp_uuid ];
 
   enableParallelBuilding = true;
 
   makeFlags = [ "world" ];
 
+  configureFlags =
+    ''
+      --with-ossp-uuid
+    '';
+
   patches = [ ./disable-resolve_symlinks.patch ./less-is-more.patch ];
 
   installTargets = [ "install-world" ];
diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix
index beca7414c363..6990da2352ed 100644
--- a/pkgs/servers/x11/xorg/default.nix
+++ b/pkgs/servers/x11/xorg/default.nix
@@ -1569,6 +1569,16 @@ let
     buildInputs = [pkgconfig fontsproto libdrm libpciaccess randrproto renderproto videoproto xextproto xf86driproto xorgserver xproto ];
   })) // {inherit fontsproto libdrm libpciaccess randrproto renderproto videoproto xextproto xf86driproto xorgserver xproto ;};
 
+  xf86videomodesetting = (stdenv.mkDerivation ((if overrides ? xf86videomodesetting then overrides.xf86videomodesetting else x: x) {
+    name = "xf86-video-modesetting-0.8.1";
+    builder = ./builder.sh;
+    src = fetchurl {
+      url = mirror://xorg/individual/driver/xf86-video-modesetting-0.8.1.tar.bz2;
+      sha256 = "1jhjhgji6169sj7489qahcnmi8cf7y22wvj8qsmrg537rgbxia1v";
+    };
+    buildInputs = [pkgconfig fontsproto libdrm udev libpciaccess randrproto libX11 xextproto xorgserver xproto ];
+  })) // {inherit fontsproto libdrm udev libpciaccess randrproto libX11 xextproto xorgserver xproto ;};
+
   xf86videoneomagic = (stdenv.mkDerivation ((if overrides ? xf86videoneomagic then overrides.xf86videoneomagic else x: x) {
     name = "xf86-video-neomagic-1.2.8";
     builder = ./builder.sh;
diff --git a/pkgs/servers/x11/xorg/tarballs-7.7.list b/pkgs/servers/x11/xorg/tarballs-7.7.list
index 24279ac70f9b..eccc931f42f0 100644
--- a/pkgs/servers/x11/xorg/tarballs-7.7.list
+++ b/pkgs/servers/x11/xorg/tarballs-7.7.list
@@ -136,6 +136,7 @@ mirror://xorg/individual/driver/xf86-video-i128-1.3.6.tar.bz2
 mirror://xorg/individual/driver/xf86-video-intel-2.21.15.tar.bz2
 mirror://xorg/individual/driver/xf86-video-mach64-6.9.4.tar.bz2
 mirror://xorg/individual/driver/xf86-video-mga-1.6.3.tar.bz2
+mirror://xorg/individual/driver/xf86-video-modesetting-0.8.1.tar.bz2
 mirror://xorg/individual/driver/xf86-video-neomagic-1.2.8.tar.bz2
 mirror://xorg/X11R7.7/src/everything/xf86-video-newport-0.2.4.tar.bz2
 mirror://xorg/individual/driver/xf86-video-nv-2.1.20.tar.bz2
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index 6e74af5fce52..f1cf34b160c6 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -12,12 +12,6 @@ let lib = import ../../../lib; in lib.makeOverridable (
 , extraBuildInputs ? []
 }:
 
-if ! builtins ? langVersion then
-
-  abort "This version of Nixpkgs requires Nix >= 1.2, please upgrade!"
-
-else
-
 let
 
   allowUnfree = config.allowUnfree or true && builtins.getEnv "HYDRA_DISALLOW_UNFREE" != "1";
diff --git a/pkgs/tools/graphics/pfstools/default.nix b/pkgs/tools/graphics/pfstools/default.nix
index 9b0a83725eaa..fbd1778faefd 100644
--- a/pkgs/tools/graphics/pfstools/default.nix
+++ b/pkgs/tools/graphics/pfstools/default.nix
@@ -2,11 +2,11 @@
 freeglut, bzip2, libX11, libpng, expat, pkgconfig }:
 
 stdenv.mkDerivation rec {
-  name = "pfstools-1.8.3";
+  name = "pfstools-1.8.5";
 
   src = fetchurl {
     url = "mirror://sourceforge/pfstools/${name}.tar.gz";
-    sha256 = "1j3pzwpxvsx9220176bfjallc73jyda61xqkvnmlxqfd3n7ycgx1";
+    sha256 = "01kk2r8afrb3vrhm8abfjdhhan97lzpapc4n8w1mpdp3kv9miy9c";
   };
 
   configureFlags = "--with-moc=${qt4}/bin/moc";
diff --git a/pkgs/tools/misc/autorandr/default.nix b/pkgs/tools/misc/autorandr/default.nix
index 2c7505260a69..960d85ab6be6 100644
--- a/pkgs/tools/misc/autorandr/default.nix
+++ b/pkgs/tools/misc/autorandr/default.nix
@@ -16,6 +16,7 @@ in
     src = fetchgit {
       inherit rev;
       url = "https://github.com/wertarbyte/autorandr.git";
+      sha256 = "1x8agg6mf5jr0imw7dznr8kxyw970bf252bda9q7b0z4yksya2zd"; 
     };
 
     patchPhase = ''
diff --git a/pkgs/tools/misc/colord/default.nix b/pkgs/tools/misc/colord/default.nix
index 525c3ba9f2c4..a744adbe05c1 100644
--- a/pkgs/tools/misc/colord/default.nix
+++ b/pkgs/tools/misc/colord/default.nix
@@ -12,7 +12,11 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  configureFlags = "--with-udevrulesdir=$out/lib/udev/rules.d --with-systemdsystemunitdir=$out/lib/udev/rules.d --disable-bash-completion";
+  configureFlags = [
+    "--with-udevrulesdir=$out/lib/udev/rules.d"
+    "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
+    "--disable-bash-completion"
+  ];
 
   buildInputs = [ glib polkit pkgconfig intltool gusb libusb1 lcms2 sqlite systemd dbus gobjectIntrospection
                   bashCompletion ];
diff --git a/pkgs/tools/misc/fasd/default.nix b/pkgs/tools/misc/fasd/default.nix
new file mode 100644
index 000000000000..77d1d58c30c2
--- /dev/null
+++ b/pkgs/tools/misc/fasd/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchgit, pandoc, ... } :
+
+let
+  rev = "287af2b80e0829b08dc6329b4fe8d8e5594d64b0";
+in
+stdenv.mkDerivation {
+
+  name = "fasd-1.0.1";
+
+  src = fetchgit {
+    url = "https://github.com/clvv/fasd.git";
+    inherit rev;
+    sha256 = "0kv9iyfdf916x0gab9fzs4vmsnkaqmb6kh4xna485nqij89xzkgs";
+  };
+
+  installPhase = ''
+    PREFIX=$out make install
+  '';
+
+  meta = {
+    homepage = "https://github.com/clvv/fasd";
+    description = "quick command-line access to files and directories for POSIX shells";
+    license = "free";
+
+    longDescription = ''
+      Fasd is a command-line productivity booster.
+      Fasd offers quick access to files and directories for POSIX shells. It is
+      inspired by tools like autojump, z and v. Fasd keeps track of files and
+      directories you have accessed, so that you can quickly reference them in the
+      command line.
+    '';
+
+    platforms = stdenv.lib.platforms.all;
+  };
+}
+
+
diff --git a/pkgs/tools/misc/system-config-printer/default.nix b/pkgs/tools/misc/system-config-printer/default.nix
index b0da497c322e..51cb1d22a49e 100644
--- a/pkgs/tools/misc/system-config-printer/default.nix
+++ b/pkgs/tools/misc/system-config-printer/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
 
   configureFlags =
     [ "--with-udev-rules"
-      "--with-systemdsystemunitdir=$(out)/etc/systemd/systemd"
+      "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
     ];
 
   postInstall =
diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix
index 3edce28151ea..986e0f449d26 100644
--- a/pkgs/tools/misc/youtube-dl/default.nix
+++ b/pkgs/tools/misc/youtube-dl/default.nix
@@ -1,14 +1,14 @@
 { stdenv, fetchurl, python, zip }:
 
 let
-  version = "2014.03.12";
+  version = "2014.03.18.1";
 in
 stdenv.mkDerivation rec {
   name = "youtube-dl-${version}";
 
   src = fetchurl {
     url = "http://youtube-dl.org/downloads/${version}/${name}.tar.gz";
-    sha256 = "1fap7mx2bmfr1jv7v5n2khl72mbasnzlasqd8gi654cl9xp12p5x";
+    sha256 = "0yyyvwa5av4ay8kxxlsav49mp2dcxflz6w0as0nklyg6k5zb5pn1";
   };
 
   buildInputs = [ python ];
diff --git a/pkgs/tools/networking/easyrsa/default.nix b/pkgs/tools/networking/easyrsa/default.nix
index 99cfb92a18b6..e49c32aac704 100644
--- a/pkgs/tools/networking/easyrsa/default.nix
+++ b/pkgs/tools/networking/easyrsa/default.nix
@@ -26,7 +26,8 @@ stdenv.mkDerivation rec {
 
   # Make sane defaults and patch default config vars
   postInstall = ''
-    for prog in $(find "$out/share/easy-rsa" -executable); do
+    cp $out/share/easy-rsa/openssl-1.0.0.cnf $out/share/easy-rsa/openssl.cnf
+    for prog in $(find "$out/share/easy-rsa" -executable -type f); do
       makeWrapper "$prog" "$out/bin/$(basename $prog)" \
         --set EASY_RSA "$out/share/easy-rsa" \
         --set OPENSSL "${openssl}/bin/openssl" \
diff --git a/pkgs/tools/networking/isync/default.nix b/pkgs/tools/networking/isync/default.nix
index 86986ed9b954..ed01ccacd797 100644
--- a/pkgs/tools/networking/isync/default.nix
+++ b/pkgs/tools/networking/isync/default.nix
@@ -1,14 +1,13 @@
 { fetchurl, stdenv, openssl, pkgconfig, db }:
 
 stdenv.mkDerivation rec {
-  name = "isync-1.0.6";
+  name = "isync-1.1.0";
 
   src = fetchurl {
     url = "mirror://sourceforge/isync/${name}.tar.gz";
-    sha256 = "0bv3hw6mc9xi55q6lpyz1w3dyrk6rlxa8ny2x1b44mrnbrx7chz5";
+    sha256 = "51f5618c239013fb770f98ae269f24ee417214efaaf7e22821b4a27cf9a9213c";
   };
 
-  patches = [ ./isync-recursice-imap.patch ]; # usefull patch to enable subfolders listing
   buildInputs = [ openssl pkgconfig db ];
 
   meta = {
diff --git a/pkgs/tools/networking/nbd/default.nix b/pkgs/tools/networking/nbd/default.nix
index 54f6689582dc..b2943eb2aced 100644
--- a/pkgs/tools/networking/nbd/default.nix
+++ b/pkgs/tools/networking/nbd/default.nix
@@ -1,14 +1,11 @@
 { stdenv, fetchurl, pkgconfig, glib }:
 
-let
-  name = "nbd-3.7";
-in
-stdenv.mkDerivation {
-  inherit name;
+stdenv.mkDerivation rec {
+  name = "nbd-3.8";
 
   src = fetchurl {
     url = "mirror://sourceforge/nbd/${name}.tar.xz";
-    sha256 = "1k4bvg5rg4q6b58y4kd9qwj07sznsfbknlpc6y1bk6c48rgr3d0b";
+    sha256 = "1qnkzrnc9m4n814ciqh95q9j8l7d6yd7sn36q8yn0dmi1rvj78j8";
   };
 
   buildInputs = [ pkgconfig glib ] ++ stdenv.lib.optional (stdenv ? glibc) stdenv.glibc.kernelHeaders;
diff --git a/pkgs/tools/networking/network-manager-applet/default.nix b/pkgs/tools/networking/network-manager-applet/default.nix
index 4d2dff22d114..6db55ada1929 100644
--- a/pkgs/tools/networking/network-manager-applet/default.nix
+++ b/pkgs/tools/networking/network-manager-applet/default.nix
@@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
     ln -s ${networkmanager_openconnect}/libexec/* $out/libexec/
     wrapProgram "$out/bin/nm-applet" \
       --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
-      --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/share" \
+      --prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:${gnome3.gtk}/share:$out/share" \
       --set GCONF_CONFIG_SOURCE "xml::~/.gconf" \
       --prefix PATH ":" "${gnome3.gconf}/bin"
   '';
diff --git a/pkgs/tools/networking/openssh/default.nix b/pkgs/tools/networking/openssh/default.nix
index 0b68ec83b522..b0d1dba891b6 100644
--- a/pkgs/tools/networking/openssh/default.nix
+++ b/pkgs/tools/networking/openssh/default.nix
@@ -18,11 +18,11 @@ let
 in
 
 stdenv.mkDerivation rec {
-  name = "openssh-6.5p1";
+  name = "openssh-6.6p1";
 
   src = fetchurl {
     url = "ftp://ftp.nl.uu.net/pub/OpenBSD/OpenSSH/portable/${name}.tar.gz";
-    sha256 = "09wh7mi65aahyxd2xvq1makckhd5laid8c0pb8njaidrbpamw6d1";
+    sha256 = "1fq3w86q05y5nn6z878wm312k0svaprw8k007188fd259dkg1ha8";
   };
 
   prePatch = stdenv.lib.optionalString hpnSupport
diff --git a/pkgs/tools/networking/openvpn/openvpn_learnaddress.nix b/pkgs/tools/networking/openvpn/openvpn_learnaddress.nix
new file mode 100644
index 000000000000..748f41c90538
--- /dev/null
+++ b/pkgs/tools/networking/openvpn/openvpn_learnaddress.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchgit, makeWrapper,  coreutils, gawk, utillinux }:
+
+stdenv.mkDerivation rec {
+  name = "openvpn-learnaddress-19b03c3";
+
+  src = fetchgit {
+    url = https://gist.github.com/4058733.git;
+    rev = "19b03c3beb0190df46ea07bf4b68244acb8eae80";
+    sha256 = "16pcyvyhwsx34i0cjkkx906lmrwdd9gvznvqdwlad4ha8l8f8z42";
+  };
+
+  buildInputs = [ makeWrapper coreutils gawk utillinux ];
+
+  installPhase = ''
+    install -Dm555 ovpn-learnaddress $out/libexec/openvpn/openvpn-learnaddress
+
+    wrapProgram $out/libexec/openvpn/openvpn-learnaddress \
+        --prefix PATH : ${coreutils}/bin:${gawk}/bin:${utillinux}/bin
+  '';
+
+  meta = {
+    description = "Openvpn learn-address script to manage a hosts-like file";
+    homepage = https://gist.github.com/offlinehacker/4058733/;
+    maintainers = [ stdenv.lib.maintainers.offline ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/pkgs/tools/networking/telnet/default.nix b/pkgs/tools/networking/telnet/default.nix
index c0dbf710ffb9..9827b62c6c4a 100644
--- a/pkgs/tools/networking/telnet/default.nix
+++ b/pkgs/tools/networking/telnet/default.nix
@@ -4,7 +4,8 @@ stdenv.mkDerivation {
   name = "telnet-1.2";
 
   src = fetchurl {
-    url = ftp://ftp.suse.com/pub/people/kukuk/ipv6/telnet-bsd-1.2.tar.bz2;
+    #url = ftp://ftp.suse.com/pub/people/kukuk/ipv6/telnet-bsd-1.2.tar.bz2; # broken
+    url = mirror://gentoo/distfiles/telnet-bsd-1.2.tar.bz2;
     sha256 = "0cs7ks22dhcn5qfjv2vl6ikhw93x68gg33zdn5f5cxgg81kx5afn";
   };
 
diff --git a/pkgs/tools/package-management/rpm/default.nix b/pkgs/tools/package-management/rpm/default.nix
index 9a96baf5fe00..7997603a706c 100644
--- a/pkgs/tools/package-management/rpm/default.nix
+++ b/pkgs/tools/package-management/rpm/default.nix
@@ -1,14 +1,14 @@
-{ stdenv, fetchurl, cpio, zlib, bzip2, file, elfutils, nspr, nss, popt, db4, xz, python }:
+{ stdenv, fetchurl, cpio, zlib, bzip2, file, elfutils, nspr, nss, popt, db, xz, python }:
 
 stdenv.mkDerivation rec {
-  name = "rpm-4.7.2";
+  name = "rpm-4.11.2";
 
   src = fetchurl {
-    url = "http://rpm.org/releases/rpm-4.7.x/${name}.tar.bz2";
-    sha1 = "07b90f653775329ea726ce0005c4c82f56167ca0";
+    url = "http://rpm.org/releases/rpm-4.11.x/${name}.tar.bz2";
+    sha256 = "1m2859js0dwg26sg2mnbkpzhvx303b12kx26az74cf5k6bk8sgs0";
   };
 
-  buildInputs = [ cpio zlib bzip2 file nspr nss popt db4 xz python ];
+  buildInputs = [ cpio zlib bzip2 file nspr nss popt db xz python ];
 
   # Note: we don't add elfutils to buildInputs, since it provides a
   # bad `ld' and other stuff.
@@ -18,10 +18,10 @@ stdenv.mkDerivation rec {
   
   configureFlags = "--with-external-db --without-lua --enable-python";
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://www.rpm.org/;
-    license = "GPLv2";
+    license = licenses.gpl2;
     description = "The RPM Package Manager";
-    maintainers = stdenv.lib.maintainers.mornfall;
+    maintainers = with maintainers; [ mornfall ];
   };
 }
diff --git a/pkgs/tools/security/cb0cat/default.nix b/pkgs/tools/security/cb0cat/default.nix
index 251c91260561..0f84cfa6ebc7 100644
--- a/pkgs/tools/security/cb0cat/default.nix
+++ b/pkgs/tools/security/cb0cat/default.nix
@@ -17,8 +17,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "cryptographic tool based on the CBEAMr0 sponge function";
     homepage    = "https://www.cblnk.com";
-    platforms   = stdenv.lib.platforms.unix;
     license     = stdenv.lib.licenses.bsd3;
+    platforms   = stdenv.lib.platforms.unix;
     maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/tools/security/ccid/default.nix b/pkgs/tools/security/ccid/default.nix
index 4be2393eed5d..fdcd15a4b825 100644
--- a/pkgs/tools/security/ccid/default.nix
+++ b/pkgs/tools/security/ccid/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, pcsclite, pkgconfig, libusb1, perl }:
 stdenv.mkDerivation rec {
-  version = "1.4.14";
+  version = "1.4.15";
   name = "ccid-${version}";
 
   src = fetchurl {
     url = "http://ftp.de.debian.org/debian/pool/main/c/ccid/ccid_${version}.orig.tar.bz2";
-    sha256 = "0inibkhzk4ghg85jkysscjrzshmxfdzz6b54dqj182l0isn082y5";
+    sha256 = "02lrdmqlw2ilbmgcpi2h7w741p025c10frxdn5w3wnzi8qi1hdjl";
   };
 
   patchPhase = ''
diff --git a/pkgs/tools/security/duo-unix/default.nix b/pkgs/tools/security/duo-unix/default.nix
new file mode 100644
index 000000000000..078e7cc06e0b
--- /dev/null
+++ b/pkgs/tools/security/duo-unix/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, pam, openssl, zlib }:
+
+stdenv.mkDerivation rec {
+  name = "duo-unix";
+  version = "1.9.7";
+
+  src = fetchurl {
+    url    = "https://dl.duosecurity.com/duo_unix-${version}.tar.gz";
+    sha256 = "090kx9nixlhvy5nw0ywqmi7yhd4nz7wvdv38cpkgrspkridfl07j";
+  };
+
+  buildInputs = [ pam openssl zlib ];
+  configureFlags =
+    [ "--with-pam=$(out)/lib/security"
+      "--prefix=$(out)"
+      "--sysconfdir=$(out)/etc/duo"
+      "--with-openssl=${openssl}"
+      "--enable-lib64=no"
+    ];
+
+  meta = {
+    description = "Duo Security Unix login integration";
+    homepage    = "https://duosecurity.com";
+    license     = stdenv.lib.licenses.gpl2;
+    platforms   = stdenv.lib.platforms.unix;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+  };
+}
diff --git a/pkgs/tools/security/nmap/default.nix b/pkgs/tools/security/nmap/default.nix
index 1b2e940540d4..a6452cdb89b4 100644
--- a/pkgs/tools/security/nmap/default.nix
+++ b/pkgs/tools/security/nmap/default.nix
@@ -4,7 +4,8 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "nmap-6.40";
+  name = "nmap-${version}";
+  version = "6.40";
 
   src = fetchurl {
     url = "http://nmap.org/dist/${name}.tar.bz2";
@@ -21,8 +22,11 @@ stdenv.mkDerivation rec {
   buildInputs =
     [ libpcap libX11 gtk pkgconfig openssl python pygtk makeWrapper pysqlite ];
 
-  meta = with stdenv.lib; {
-    platforms = platforms.linux;
-    maintainers = maintainers.mornfall;
+  meta = {
+    description = "A free and open source utility for network discovery and security auditing.";
+    homepage    = "http://www.nmap.org";
+    license     = stdenv.lib.licenses.gpl2;
+    platforms   = stdenv.lib.platforms.linux;
+    maintainers = with stdenv.lib.maintainers; [ mornfall thoughtpolice ];
   };
 }
diff --git a/pkgs/tools/security/pcsclite/default.nix b/pkgs/tools/security/pcsclite/default.nix
index 18fa10451536..7f13ffc8db5f 100644
--- a/pkgs/tools/security/pcsclite/default.nix
+++ b/pkgs/tools/security/pcsclite/default.nix
@@ -5,20 +5,17 @@ stdenv.mkDerivation rec {
   name = "pcsclite-${version}";
 
   src = fetchurl {
-    url = "http://ftp.de.debian.org/debian/pool/main/p/pcsc-lite/pcsc-lite_${version}.orig.tar.bz2";
+    url = "https://alioth.debian.org/frs/download.php/file/3963/pcsc-lite-${version}.tar.bz2";
     sha256 = "04i63zi9ayg38z3cahp6gf3rgx23w17bmcpdccm2hvaj63blnz30";
   };
 
   # The OS should care on preparing the drivers into this location
   configureFlags = [
     "--enable-usbdropdir=/var/lib/pcsc/drivers"
-    "--with-systemdsystemunitdir=$out/lib/systemd/system" # probably
+    "--with-systemdsystemunitdir=$out/etc/systemd/system"
+    "--enable-confdir=$out/etc"
   ];
 
-  preConfigure = ''
-    configureFlags="$configureFlags --enable-confdir=$out/etc"
-  '';
-
   buildInputs = [ udev dbus_libs perl ];
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/tools/security/scrypt/default.nix b/pkgs/tools/security/scrypt/default.nix
index ca2c9f43dfcd..fe2a19491d99 100644
--- a/pkgs/tools/security/scrypt/default.nix
+++ b/pkgs/tools/security/scrypt/default.nix
@@ -13,8 +13,9 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "The scrypt encryption utility";
-    homepage = https://www.tarsnap.com/scrypt.html;
-    license = "BSD";
-    platforms = stdenv.lib.platforms.all;
+    homepage    = https://www.tarsnap.com/scrypt.html;
+    license     = stdenv.lib.licenses.bsd2;
+    platforms   = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
   };
 }
diff --git a/pkgs/tools/security/ssdeep/default.nix b/pkgs/tools/security/ssdeep/default.nix
new file mode 100644
index 000000000000..66fdedc49063
--- /dev/null
+++ b/pkgs/tools/security/ssdeep/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name    = "ssdeep-${version}";
+  version = "2.10";
+
+  src = fetchurl {
+    url    = "mirror://sourceforge/ssdeep/${name}.tar.gz";
+    sha256 = "1p7dgchq8hgadnxz5qh95ay17k5j74l4qyd15wspc54lb603p2av";
+  };
+
+  postFixup = ''
+    patchelf --set-rpath "$(patchelf --print-rpath $out/bin/ssdeep):$out/lib" $out/bin/ssdeep
+  '';
+
+  meta = {
+    description = "A program for calculating fuzzy hashes";
+    homepage    = "http://www.ssdeep.sf.net";
+    license     = stdenv.lib.licenses.gpl2;
+    platforms   = stdenv.lib.platforms.unix;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+  };
+}
diff --git a/pkgs/tools/security/tor/default.nix b/pkgs/tools/security/tor/default.nix
index e8c27c5f2b1e..dd4d797825f3 100644
--- a/pkgs/tools/security/tor/default.nix
+++ b/pkgs/tools/security/tor/default.nix
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
 
   meta = {
     homepage = http://www.torproject.org/;
+    repositories.git = https://git.torproject.org/git/tor;
     description = "Tor, an anonymous network router to improve privacy on the Internet";
 
     longDescription=''
@@ -30,10 +31,7 @@ stdenv.mkDerivation rec {
 
     license="mBSD";
 
-    maintainers =
-      [ # Russell O’Connor <roconnor@theorem.ca> ?
-        stdenv.lib.maintainers.ludo
-      ];
+    maintainers = with stdenv.lib.maintainers; [ phreedom ludo ];
     platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
   };
 }
diff --git a/pkgs/tools/security/vidalia/default.nix b/pkgs/tools/security/vidalia/default.nix
index 6ce094997806..f221a1b89e66 100644
--- a/pkgs/tools/security/vidalia/default.nix
+++ b/pkgs/tools/security/vidalia/default.nix
@@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     homepage = https://www.torproject.org/projects/vidalia.html.en;
+    repositories.git = git://git.torproject.org/vidalia;
     description = "a cross-platform graphical controller for the Tor software, built using the Qt framework";
     license = licenses.gpl2Plus;
     maintainers = [ maintainers.phreedom ];
diff --git a/pkgs/tools/system/logcheck/default.nix b/pkgs/tools/system/logcheck/default.nix
index 7d15ade348cf..208ff837b346 100644
--- a/pkgs/tools/system/logcheck/default.nix
+++ b/pkgs/tools/system/logcheck/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   _name   = "logcheck";
-  version = "1.3.15";
+  version = "1.3.16";
   name    = "${_name}-${version}";
 
   src = fetchurl {
-    url = "mirror://debian/pool/main/l/${_name}/${_name}_${version}.tar.gz";
-    sha256 = "1rdrs12hkm5i5yyz89a6cwhf4fzjkbcd4q4zy6sk148aji9lg6xj";
+    url = "mirror://debian/pool/main/l/${_name}/${_name}_${version}.tar.xz";
+    sha256 = "1rmq4s2fj86226ncw2kdjvjbi29375gd7vdq62fsbjxm4m6nzsiy";
   };
 
   preConfigure = ''
diff --git a/pkgs/tools/text/podiff/default.nix b/pkgs/tools/text/podiff/default.nix
index fc9e3785cf3e..ccfeabaa73bd 100644
--- a/pkgs/tools/text/podiff/default.nix
+++ b/pkgs/tools/text/podiff/default.nix
@@ -20,5 +20,6 @@ stdenv.mkDerivation rec {
     homepage = http://puszcza.gnu.org.ua/software/podiff;
     license = licenses.gpl3Plus;
     maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/tools/text/silver-searcher/default.nix b/pkgs/tools/text/silver-searcher/default.nix
index e8a1ee96505c..d5d022c8063f 100644
--- a/pkgs/tools/text/silver-searcher/default.nix
+++ b/pkgs/tools/text/silver-searcher/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
     sha256 = "b6993e077f650eb0976cbc924640665fa9b2499a899ecba5a6cad5cf9addfdff";
   };
 
-  NIX_LDFLAGS = "-lgcc_s";
+  NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
 
   buildInputs = [ autoreconfHook pkgconfig pcre zlib lzma ];
 
diff --git a/pkgs/tools/text/uni2ascii/default.nix b/pkgs/tools/text/uni2ascii/default.nix
index 0f54644eba56..c81e02b43995 100644
--- a/pkgs/tools/text/uni2ascii/default.nix
+++ b/pkgs/tools/text/uni2ascii/default.nix
@@ -34,5 +34,6 @@ stdenv.mkDerivation rec {
     similar ASCII characters, e.g. by stripping diacritics.
     '';
     maintainers = [ "cillian.deroiste@gmail.com" ];
+    platforms = stdenv.lib.platforms.linux;
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 6a9159a6dfb0..5d341bc8a0d0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -586,6 +586,10 @@ let
 
   enca = callPackage ../tools/text/enca { };
 
+  fasd = callPackage ../tools/misc/fasd {
+    inherit (haskellPackages) pandoc;
+  };
+
   fop = callPackage ../tools/typesetting/fop { };
 
   mcrl = callPackage ../tools/misc/mcrl { };
@@ -851,6 +855,8 @@ let
 
   dtach = callPackage ../tools/misc/dtach { };
 
+  duo-unix = callPackage ../tools/security/duo-unix { };
+
   duplicity = callPackage ../tools/backup/duplicity {
     inherit (pythonPackages) boto lockfile;
     gnupg = gnupg1;
@@ -1600,6 +1606,8 @@ let
 
   openvpn = callPackage ../tools/networking/openvpn { };
 
+  openvpn_learnaddress = callPackage ../tools/networking/openvpn/openvpn_learnaddress.nix { };
+
   optipng = callPackage ../tools/graphics/optipng { };
 
   oslrd = callPackage ../tools/networking/oslrd { };
@@ -1872,6 +1880,8 @@ let
   sg3_utils = callPackage ../tools/system/sg3_utils { };
 
   sharutils = callPackage ../tools/archivers/sharutils { };
+  
+  shotwell = callPackage ../applications/graphics/shotwell { };
 
   shebangfix = callPackage ../tools/misc/shebangfix { };
 
@@ -1945,6 +1955,8 @@ let
 
   super = callPackage ../tools/security/super { };
 
+  ssdeep = callPackage ../tools/security/ssdeep { };
+
   ssmtp = callPackage ../tools/networking/ssmtp {
     tlsSupport = true;
   };
@@ -2315,6 +2327,7 @@ let
 
   bashInteractive = appendToName "interactive" (callPackage ../shells/bash {
     interactive = true;
+    readline = readline63; # Includes many vi mode fixes
   });
 
   bashCompletion = callPackage ../shells/bash-completion { };
@@ -2880,7 +2893,7 @@ let
 
   nvidia_cg_toolkit = callPackage ../development/compilers/nvidia-cg-toolkit { };
 
-  ocaml = ocaml_3_12_1;
+  ocaml = ocamlPackages.ocaml;
 
   ocaml_3_08_0 = callPackage ../development/compilers/ocaml/3.08.0.nix { };
 
@@ -2961,24 +2974,30 @@ let
 
     mlgmp =  callPackage ../development/ocaml-modules/mlgmp { };
 
-    ocaml_batteries = callPackage ../development/ocaml-modules/batteries {
-      camomile = camomile_0_8_2;
-    };
+    ocaml_batteries = callPackage ../development/ocaml-modules/batteries { };
 
     ocaml_cryptgps = callPackage ../development/ocaml-modules/cryptgps { };
 
+    ocaml_data_notation = callPackage ../development/ocaml-modules/odn { };
+
     ocaml_expat = callPackage ../development/ocaml-modules/expat { };
 
     ocamlgraph = callPackage ../development/ocaml-modules/ocamlgraph { };
 
     ocaml_http = callPackage ../development/ocaml-modules/http { };
 
+    ocamlify = callPackage ../development/tools/ocaml/ocamlify { };
+
     ocaml_lwt = callPackage ../development/ocaml-modules/lwt { };
 
+    ocamlmod = callPackage ../development/tools/ocaml/ocamlmod { };
+
     ocaml_mysql = callPackage ../development/ocaml-modules/mysql { };
 
     ocamlnet = callPackage ../development/ocaml-modules/ocamlnet { };
 
+    ocaml_oasis = callPackage ../development/tools/ocaml/oasis { };
+
     ocaml_pcre = callPackage ../development/ocaml-modules/pcre {
       inherit pcre;
     };
@@ -3001,6 +3020,8 @@ let
 
     ocaml_typeconv = callPackage ../development/ocaml-modules/typeconv { };
 
+    ocaml_typeconv_3_0_5 = callPackage ../development/ocaml-modules/typeconv/3.0.5.nix { };
+
     ocaml_sexplib = callPackage ../development/ocaml-modules/sexplib { };
 
     ocaml_extlib = callPackage ../development/ocaml-modules/extlib { };
@@ -3012,7 +3033,7 @@ let
     opam = opam_1_1;
   };
 
-  ocamlPackages = recurseIntoAttrs ocamlPackages_3_12_1;
+  ocamlPackages = recurseIntoAttrs ocamlPackages_4_01_0;
   ocamlPackages_3_10_0 = mkOcamlPackages ocaml_3_10_0 pkgs.ocamlPackages_3_10_0;
   ocamlPackages_3_11_2 = mkOcamlPackages ocaml_3_11_2 pkgs.ocamlPackages_3_11_2;
   ocamlPackages_3_12_1 = mkOcamlPackages ocaml_3_12_1 pkgs.ocamlPackages_3_12_1;
@@ -3218,6 +3239,7 @@ let
     suitesparse = null;
     openjdk = null;
     gnuplot = null;
+    readline = readline63;
   };
   octaveFull = (lowPrio (callPackage ../development/interpreters/octave {
     fltk = fltk13;
@@ -3688,6 +3710,8 @@ let
 
   jikespg = callPackage ../development/tools/parsing/jikespg { };
 
+  jenkins = callPackage ../development/tools/continuous-integration/jenkins { };
+
   lcov = callPackage ../development/tools/analysis/lcov { };
 
   leiningen = callPackage ../development/tools/build-managers/leiningen { };
@@ -3836,6 +3860,7 @@ let
 
   gdb = callPackage ../development/tools/misc/gdb {
     hurd = gnu.hurdCross;
+    readline = readline63;
     inherit (gnu) mig;
   };
 
@@ -4219,9 +4244,7 @@ let
 
   geoclue2 = callPackage ../development/libraries/geoclue/2.0.nix {};
 
-  geoip = builderDefsPackage ../development/libraries/geoip {
-    inherit zlib;
-  };
+  geoip = callPackage ../development/libraries/geoip { };
 
   geoipjava = callPackage ../development/libraries/java/geoipjava { };
 
@@ -4596,7 +4619,6 @@ let
   judy = callPackage ../development/libraries/judy { };
 
   keybinder = callPackage ../development/libraries/keybinder {
-    inherit (gnome2) gnome_common;
     automake = automake111x;
     lua = lua5_1;
   };
@@ -4684,9 +4706,7 @@ let
 
   libchamplain_0_6 = callPackage ../development/libraries/libchamplain/0.6.nix {};
 
-  libchop = callPackage ../development/libraries/libchop {
-    gnutls = gnutls31;
-  };
+  libchop = callPackage ../development/libraries/libchop { };
 
   libcm = callPackage ../development/libraries/libcm { };
 
@@ -5559,7 +5579,7 @@ let
 
   raul = callPackage ../development/libraries/audio/raul { };
 
-  readline = readline6;
+  readline = readline6; # 6.2 works, 6.3 breaks python, parted
 
   readline4 = callPackage ../development/libraries/readline/readline4.nix { };
 
@@ -5574,6 +5594,15 @@ let
       else stdenv;
   };
 
+  readline63 = callPackage ../development/libraries/readline/readline6.3.nix {
+    stdenv =
+      # On Darwin, Readline uses `-arch_only', which is specific to
+      # Apple-GCC.  So give it what it expects.
+      if stdenv.isDarwin
+      then overrideGCC stdenv gccApple
+      else stdenv;
+  };
+
   librdf_raptor = callPackage ../development/libraries/librdf/raptor.nix { };
 
   librdf_raptor2 = callPackage ../development/libraries/librdf/raptor2.nix { };
@@ -6075,6 +6104,8 @@ let
   ack = perlPackages.ack;
 
   perlcritic = perlPackages.PerlCritic;
+  
+  planetary_annihilation = callPackage ../games/planetaryannihilation { };
 
 
   ### DEVELOPMENT / PYTHON MODULES
@@ -6100,10 +6131,10 @@ let
     python = python33;
   });
 
-  python34Packages = import ./python-packages.nix {
+  python34Packages = recurseIntoAttrs (import ./python-packages.nix {
     inherit pkgs;
     python = python34;
-  };
+  });
 
   python32Packages = import ./python-packages.nix {
     inherit pkgs;
@@ -6318,6 +6349,8 @@ let
 
   nginx = callPackage ../servers/http/nginx { };
 
+  ngircd = callPackage ../servers/irc/ngircd { };
+
   opensmtpd = callPackage ../servers/mail/opensmtpd { };
 
   petidomo = callPackage ../servers/mail/petidomo { };
@@ -6570,12 +6603,23 @@ let
 
   cifs_utils = callPackage ../os-specific/linux/cifs-utils { };
 
-  conky = callPackage ../os-specific/linux/conky { };
+  conky = callPackage ../os-specific/linux/conky {
+    mpdSupport   = config.conky.mpdSupport   or true;
+    x11Support   = config.conky.x11Support   or false;
+    xdamage      = config.conky.xdamage      or false;
+    wireless     = config.conky.wireless     or false;
+    luaSupport   = config.conky.luaSupport   or false;
+    rss          = config.conky.rss          or false;
+    weatherMetar = config.conky.weatherMetar or false;
+    weatherXoap  = config.conky.weatherXoap  or false;
+  };
 
   cpufrequtils = callPackage ../os-specific/linux/cpufrequtils { };
 
   cryopid = callPackage ../os-specific/linux/cryopid { };
 
+  criu = callPackage ../os-specific/linux/criu { };
+
   cryptsetup = callPackage ../os-specific/linux/cryptsetup { };
 
   cramfsswap = callPackage ../os-specific/linux/cramfsswap { };
@@ -6727,9 +6771,7 @@ let
 
   linux_3_2 = makeOverridable (import ../os-specific/linux/kernel/linux-3.2.nix) {
     inherit fetchurl stdenv perl buildLinux;
-    kernelPatches =
-      [ kernelPatches.sec_perm_2_6_24
-      ];
+    kernelPatches = [];
   };
 
   grsecurityOverrider = args: {
@@ -6777,9 +6819,7 @@ let
 
   linux_3_4 = makeOverridable (import ../os-specific/linux/kernel/linux-3.4.nix) {
     inherit fetchurl stdenv perl buildLinux;
-    kernelPatches =
-      [ kernelPatches.sec_perm_2_6_24
-      ] ++ lib.optionals ((platform.kernelArch or null) == "mips")
+    kernelPatches = lib.optionals ((platform.kernelArch or null) == "mips")
       [ kernelPatches.mips_fpureg_emu
         kernelPatches.mips_fpu_sigill
       ];
@@ -6799,10 +6839,7 @@ let
 
   linux_3_10 = makeOverridable (import ../os-specific/linux/kernel/linux-3.10.nix) {
     inherit fetchurl stdenv perl buildLinux;
-    kernelPatches =
-      [
-        kernelPatches.sec_perm_2_6_24
-      ] ++ lib.optionals ((platform.kernelArch or null) == "mips")
+    kernelPatches = lib.optionals ((platform.kernelArch or null) == "mips")
       [ kernelPatches.mips_fpureg_emu
         kernelPatches.mips_fpu_sigill
         kernelPatches.mips_ext3_n32
@@ -6820,10 +6857,7 @@ let
 
   linux_3_11 = makeOverridable (import ../os-specific/linux/kernel/linux-3.11.nix) {
     inherit fetchurl stdenv perl buildLinux;
-    kernelPatches =
-      [
-        kernelPatches.sec_perm_2_6_24
-      ] ++ lib.optionals ((platform.kernelArch or null) == "mips")
+    kernelPatches = lib.optionals ((platform.kernelArch or null) == "mips")
       [ kernelPatches.mips_fpureg_emu
         kernelPatches.mips_fpu_sigill
         kernelPatches.mips_ext3_n32
@@ -6832,10 +6866,7 @@ let
 
   linux_3_12 = makeOverridable (import ../os-specific/linux/kernel/linux-3.12.nix) {
     inherit fetchurl stdenv perl buildLinux;
-    kernelPatches =
-      [
-        kernelPatches.sec_perm_2_6_24
-      ] ++ lib.optionals ((platform.kernelArch or null) == "mips")
+    kernelPatches = lib.optionals ((platform.kernelArch or null) == "mips")
       [ kernelPatches.mips_fpureg_emu
         kernelPatches.mips_fpu_sigill
         kernelPatches.mips_ext3_n32
@@ -6844,10 +6875,7 @@ let
 
   linux_3_13 = makeOverridable (import ../os-specific/linux/kernel/linux-3.13.nix) {
     inherit fetchurl stdenv perl buildLinux;
-    kernelPatches =
-      [
-        kernelPatches.sec_perm_2_6_24
-      ] ++ lib.optionals ((platform.kernelArch or null) == "mips")
+    kernelPatches = lib.optionals ((platform.kernelArch or null) == "mips")
       [ kernelPatches.mips_fpureg_emu
         kernelPatches.mips_fpu_sigill
         kernelPatches.mips_ext3_n32
@@ -7077,9 +7105,11 @@ let
 
   prayer = callPackage ../servers/prayer { };
 
-  procps = callPackage ../os-specific/linux/procps { };
+  procps = procps-ng;
+
+  procps-old = lowPrio (callPackage ../os-specific/linux/procps { });
 
-  "procps-ng" = callPackage ../os-specific/linux/procps-ng { };
+  procps-ng = callPackage ../os-specific/linux/procps-ng { };
 
   qemu_kvm = lowPrio (qemu.override { x86Only = true; });
 
@@ -7436,6 +7466,8 @@ let
 
   vistafonts = callPackage ../data/fonts/vista-fonts { };
 
+  wqy_microhei = callPackage ../data/fonts/wqy-microhei { };
+
   wqy_zenhei = callPackage ../data/fonts/wqy-zenhei { };
 
   xhtml1 = callPackage ../data/sgml+xml/schemas/xml-dtd/xhtml1 { };
@@ -7486,11 +7518,9 @@ let
 
   antiword = callPackage ../applications/office/antiword {};
 
-  ardour = callPackage ../applications/audio/ardour {
-    inherit (gnome) libgnomecanvas libgnomecanvasmm;
-  };
+  ardour = ardour3;
 
-  ardour3 =  lowPrio (callPackage ../applications/audio/ardour/ardour3.nix {
+  ardour3 =  lowPrio (callPackage ../applications/audio/ardour {
     inherit (gnome) libgnomecanvas libgnomecanvasmm;
   });
 
@@ -7731,6 +7761,8 @@ let
 
   ed = callPackage ../applications/editors/ed { };
 
+  ekho = callPackage ../applications/audio/ekho { };
+
   elinks = callPackage ../applications/networking/browsers/elinks { };
 
   elvis = callPackage ../applications/editors/elvis { };
@@ -7792,6 +7824,8 @@ let
 
     cua = callPackage ../applications/editors/emacs-modes/cua { };
 
+    darcsum = callPackage ../applications/editors/emacs-modes/darcsum { };
+
     # ecb = callPackage ../applications/editors/emacs-modes/ecb { };
 
     jabber = callPackage ../applications/editors/emacs-modes/jabber { };
@@ -8873,6 +8907,8 @@ let
 
   skype_call_recorder = callPackage ../applications/networking/instant-messengers/skype-call-recorder { };
 
+  slrn = callPackage ../applications/networking/newsreaders/slrn { };
+
   ssvnc = callPackage ../applications/networking/remote/ssvnc { };
 
   st = callPackage ../applications/misc/st {
@@ -9107,13 +9143,12 @@ let
       else stdenv;
   };
 
-  vimwrapper = callPackage ../applications/editors/vim/wrapper.nix {
-    inherit vim;
-    vimrc = config.vim.vimrc or null;
-  };
+  vimWrapper = wrapVim vim;
 
   vimHugeX = vim_configurable;
 
+  vimHugeXWrapper = wrapVim vimHugeX;
+
   vim_configurable = callPackage ../applications/editors/vim/configurable.nix {
     inherit (pkgs) fetchurl fetchhg stdenv ncurses pkgconfig gettext
       composableDerivation lib config glib gtk python perl tcl ruby;
@@ -9146,6 +9181,11 @@ let
     flags = [ "python" "X11" ]; # only flag "X11" by now
   });
 
+  wrapVim = vim: import ../applications/editors/vim/wrapper.nix {
+    inherit stdenv makeWrapper writeText vim;
+    vimrc = config.vim.vimrc or "";
+  };
+
   virtviewer = callPackage ../applications/virtualization/virt-viewer {};
   virtmanager = callPackage ../applications/virtualization/virt-manager {
     inherit (gnome) gnome_python;
@@ -9164,6 +9204,8 @@ let
 
   vlc = callPackage ../applications/video/vlc { };
 
+  vmpk = callPackage ../applications/audio/vmpk { };
+
   vnstat = callPackage ../applications/networking/vnstat { };
 
   vorbisTools = callPackage ../applications/audio/vorbis-tools { };
@@ -9178,10 +9220,7 @@ let
     graphicsSupport = false;
   };
 
-  weechat = callPackage ../applications/networking/irc/weechat {
-    # weechat doesn't exit with gnutls32. Use 3.1 for now.
-    gnutls = gnutls31;
-  };
+  weechat = callPackage ../applications/networking/irc/weechat { };
 
   weston = callPackage ../applications/window-managers/weston { };
 
@@ -9226,7 +9265,7 @@ let
     , icon ? "${browser}/lib/${browser.name}/icons/mozicon128.png" }:
     let
       cfg = stdenv.lib.attrByPath [ browserName ] {} config;
-      enableAdobeFlash = cfg.enableAdobeFlash or true;
+      enableAdobeFlash = cfg.enableAdobeFlash or false;
       enableGnash = cfg.enableGnash or false;
     in
     import ../applications/networking/browsers/firefox/wrapper.nix {
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index cc0bab08414e..16405f53da67 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -526,6 +526,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   adjunctions = callPackage ../development/libraries/haskell/adjunctions {};
 
+  aes = callPackage ../development/libraries/haskell/aes {};
+
   aeson = callPackage ../development/libraries/haskell/aeson {
     blazeBuilder = if (pkgs.stdenv.lib.versionOlder ghc.version "7.6") then self.blazeBuilder else null;
   };
@@ -756,6 +758,10 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   checkers = callPackage ../development/libraries/haskell/checkers {};
 
+  chell = callPackage ../development/libraries/haskell/chell {};
+
+  chellQuickcheck = callPackage ../development/libraries/haskell/chell-quickcheck {};
+
   chunkedData = callPackage ../development/libraries/haskell/chunked-data {};
 
   citeprocHs = callPackage ../development/libraries/haskell/citeproc-hs {};
@@ -854,6 +860,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   cryptohash = callPackage ../development/libraries/haskell/cryptohash {};
 
+  cryptohashConduit = callPackage ../development/libraries/haskell/cryptohash-conduit {};
+
   cryptohashCryptoapi = callPackage ../development/libraries/haskell/cryptohash-cryptoapi {};
 
   cryptoNumbers = callPackage ../development/libraries/haskell/crypto-numbers {};
@@ -982,6 +990,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   dlist = callPackage ../development/libraries/haskell/dlist {};
 
+  dlistInstances = callPackage ../development/libraries/haskell/dlist-instances {};
+
   dns = callPackage ../development/libraries/haskell/dns {};
 
   doctest = callPackage ../development/libraries/haskell/doctest {};
@@ -998,6 +1008,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   DSH = callPackage ../development/libraries/haskell/DSH {};
 
+  dsp = callPackage ../development/libraries/haskell/dsp {};
+
   dstring = callPackage ../development/libraries/haskell/dstring {};
 
   dualTree = callPackage ../development/libraries/haskell/dual-tree {};
@@ -1258,6 +1270,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   happstackLite = callPackage ../development/libraries/haskell/happstack/happstack-lite.nix {};
 
+  happstackFastCGI = callPackage ../development/libraries/haskell/happstack/happstack-fastcgi.nix {};
+
   hashable_1_1_2_5 = callPackage ../development/libraries/haskell/hashable/1.1.2.5.nix {};
   hashable_1_2_1_0 = callPackage ../development/libraries/haskell/hashable/1.2.1.0.nix {};
   hashable = self.hashable_1_2_1_0;
@@ -1437,13 +1451,19 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   hsloggerTemplate = callPackage ../development/libraries/haskell/hslogger-template {};
 
-  hspec = callPackage ../development/libraries/haskell/hspec {};
+  hspec = callPackage ../development/libraries/haskell/hspec {
+    QuickCheck = self.QuickCheck_2_7_1;
+    quickcheckIo = self.quickcheckIo.override { QuickCheck = self.QuickCheck_2_7_1; };
+  };
 
   hspecExpectations = callPackage ../development/libraries/haskell/hspec-expectations {};
 
   hspecExpectationsLens = callPackage ../development/libraries/haskell/hspec-expectations-lens {};
 
-  hspecMeta = callPackage ../development/libraries/haskell/hspec-meta {};
+  hspecMeta = callPackage ../development/libraries/haskell/hspec-meta {
+    QuickCheck = self.QuickCheck_2_7_1;
+    quickcheckIo = self.quickcheckIo.override { QuickCheck = self.QuickCheck_2_7_1; };
+  };
 
   hstatsd = callPackage ../development/libraries/haskell/hstatsd {};
 
@@ -1588,6 +1608,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   lenses = callPackage ../development/libraries/haskell/lenses {};
 
+  leveldbHaskell = callPackage ../development/libraries/haskell/leveldb-haskell {};
+
   libffi = callPackage ../development/libraries/haskell/libffi {
     libffi = pkgs.libffi;
   };
@@ -1598,6 +1620,10 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   liblastfm = callPackage ../development/libraries/haskell/liblastfm {};
 
+  libsystemdJournal = callPackage ../development/libraries/haskell/libsystemd-journal {
+    systemd-journal = pkgs.systemd;
+  };
+
   libxmlSax = callPackage ../development/libraries/haskell/libxml-sax {};
 
   liftedAsync = callPackage ../development/libraries/haskell/lifted-async {};
@@ -1619,14 +1645,14 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
     llvmConfig = pkgs.llvm_33;
     llvmGeneralPure = self.llvmGeneralPure_3_3_8_2;
   };
-  llvmGeneral_3_4_1_0 = callPackage ../development/libraries/haskell/llvm-general/3.4.1.0.nix {
+  llvmGeneral_3_4_2_2 = callPackage ../development/libraries/haskell/llvm-general/3.4.2.2.nix {
     llvmConfig = pkgs.llvm;
   };
-  llvmGeneral = self.llvmGeneral_3_4_1_0;
+  llvmGeneral = self.llvmGeneral_3_4_2_2;
 
   llvmGeneralPure_3_3_8_2 = callPackage ../development/libraries/haskell/llvm-general-pure/3.3.8.2.nix { };
-  llvmGeneralPure_3_4_1_0 = callPackage ../development/libraries/haskell/llvm-general-pure/3.4.1.0.nix {};
-  llvmGeneralPure = self.llvmGeneralPure_3_4_1_0;
+  llvmGeneralPure_3_4_2_2 = callPackage ../development/libraries/haskell/llvm-general-pure/3.4.2.2.nix {};
+  llvmGeneralPure = self.llvmGeneralPure_3_4_2_2;
 
   lrucache = callPackage ../development/libraries/haskell/lrucache {};
 
@@ -1640,6 +1666,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   lushtags = callPackage ../development/libraries/haskell/lushtags {};
 
+  lzmaEnumerator = callPackage ../development/libraries/haskell/lzma-enumerator {};
+
   maccatcher = callPackage ../development/libraries/haskell/maccatcher {};
 
   markdownUnlit = callPackage ../development/libraries/haskell/markdown-unlit {};
@@ -1849,6 +1877,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   operational = callPackage ../development/libraries/haskell/operational {};
 
+  options = callPackage ../development/libraries/haskell/options {};
+
   optparseApplicative = callPackage ../development/libraries/haskell/optparse-applicative {};
 
   pathPieces = callPackage ../development/libraries/haskell/path-pieces {};
@@ -1895,6 +1925,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   pathtype = callPackage ../development/libraries/haskell/pathtype {};
 
+  pbkdf = callPackage ../development/libraries/haskell/pbkdf {};
+
   pcap = callPackage ../development/libraries/haskell/pcap {};
 
   pcapEnumerator = callPackage ../development/libraries/haskell/pcap-enumerator {};
@@ -2026,6 +2058,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
   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 {};
+  QuickCheck_2_7_1 = callPackage ../development/libraries/haskell/QuickCheck/2.7.1.nix {};
   QuickCheck1 = self.QuickCheck_1_2_0_1;
   QuickCheck2 = self.QuickCheck_2_6;
   QuickCheck  = self.QuickCheck2;
@@ -2145,6 +2178,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   scottyHastache = callPackage ../development/libraries/haskell/scotty-hastache {};
 
+  scrypt = callPackage ../development/libraries/haskell/scrypt {};
+
   securemem = callPackage ../development/libraries/haskell/securemem {};
 
   sendfile = callPackage ../development/libraries/haskell/sendfile {};
@@ -2189,6 +2224,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   snapServer = callPackage ../development/libraries/haskell/snap/server.nix {};
 
+  snowball = callPackage ../development/libraries/haskell/snowball {};
+
   socks = callPackage ../development/libraries/haskell/socks {};
 
   sparse = callPackage ../development/libraries/haskell/sparse {};
@@ -2335,6 +2372,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   tagged = callPackage ../development/libraries/haskell/tagged {};
 
+  tagshare = callPackage ../development/libraries/haskell/tagshare {};
+
   tagsoup = callPackage ../development/libraries/haskell/tagsoup {};
 
   tagstreamConduit = callPackage ../development/libraries/haskell/tagstream-conduit {};
@@ -2349,7 +2388,9 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   tastyHunit = callPackage ../development/libraries/haskell/tasty-hunit {};
 
-  tastyQuickcheck = callPackage ../development/libraries/haskell/tasty-quickcheck {};
+  tastyQuickcheck = callPackage ../development/libraries/haskell/tasty-quickcheck {
+    QuickCheck = self.QuickCheck_2_7_1;
+  };
 
   tastyRerun = callPackage ../development/libraries/haskell/tasty-rerun {};
 
@@ -2365,6 +2406,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   terminalProgressBar = callPackage ../development/libraries/haskell/terminal-progress-bar {};
 
+  terminalSize = callPackage ../development/libraries/haskell/terminal-size {};
+
   terminfo_0_3_2_6 = callPackage ../development/libraries/haskell/terminfo/0.3.2.6.nix { inherit (pkgs) ncurses; };
   terminfo_0_4_0_0 = callPackage ../development/libraries/haskell/terminfo/0.4.0.0.nix { inherit (pkgs) ncurses; };
   terminfo = self.terminfo_0_4_0_0;
@@ -2383,6 +2426,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   testFrameworkThPrime = callPackage ../development/libraries/haskell/test-framework-th-prime {};
 
+  testingFeat = callPackage ../development/libraries/haskell/testing-feat {};
+
   texmath = callPackage ../development/libraries/haskell/texmath {};
 
   text_0_11_0_5 = callPackage ../development/libraries/haskell/text/0.11.0.5.nix {};
@@ -2401,6 +2446,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   textStreamDecode = callPackage ../development/libraries/haskell/text-stream-decode {};
 
+  tfRandom = callPackage ../development/libraries/haskell/tf-random {};
+
   thespian = callPackage ../development/libraries/haskell/thespian {};
 
   thDesugar = callPackage ../development/libraries/haskell/th-desugar {};
@@ -2432,8 +2479,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
   timeCompat = callPackage ../development/libraries/haskell/time-compat {};
 
   tls_1_1_5 = callPackage ../development/libraries/haskell/tls/1.1.5.nix {};
-  tls_1_2_2 = callPackage ../development/libraries/haskell/tls/1.2.2.nix {};
-  tls = self.tls_1_2_2;
+  tls_1_2_3 = callPackage ../development/libraries/haskell/tls/1.2.3.nix {};
+  tls = self.tls_1_2_3;
 
   tlsExtra = callPackage ../development/libraries/haskell/tls-extra {
     tls = self.tls_1_1_5;
@@ -2566,6 +2613,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   waiTest = callPackage ../development/libraries/haskell/wai-test {};
 
+  waiWebsockets = callPackage ../development/libraries/haskell/wai-websockets {};
+
   warp = callPackage ../development/libraries/haskell/warp {};
 
   warpTls = callPackage ../development/libraries/haskell/warp-tls {};
@@ -2861,7 +2910,9 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
   };
   cabalInstall = self.cabalInstall_1_18_0_3;
 
-  gitAnnex = callPackage ../applications/version-management/git-and-tools/git-annex {};
+  gitAnnex = callPackage ../applications/version-management/git-and-tools/git-annex {
+    hS3 = self.hS3.override { Crypto = self.Crypto.override { QuickCheck = self.QuickCheck_2_7_1; }; };
+  };
 
   githubBackup = callPackage ../applications/version-management/git-and-tools/github-backup {};
 
diff --git a/pkgs/top-level/python-packages-generated.nix b/pkgs/top-level/python-packages-generated.nix
index 29a9bc91a1ea..193928513cb4 100644
--- a/pkgs/top-level/python-packages-generated.nix
+++ b/pkgs/top-level/python-packages-generated.nix
@@ -5370,5 +5370,27 @@ in
     };
   };
 
+
+  "suds" = self."suds-0.4";
+
+  "suds-0.4" = self.buildPythonPackage {
+    name = "suds-0.4";
+    src = fetchurl {
+        url = "https://pypi.python.org/packages/source/s/suds/suds-0.4.tar.gz";
+        md5 = "b7502de662341ed7275b673e6bd73191";
+    };
+    doCheck = false;
+    buildInputs = [  ];
+    propagatedBuildInputs = [  ];
+    installCommand = ''easy_install --always-unzip --prefix="$out" .'';
+    meta = {
+      description = ''
+        Lightweight SOAP client
+        '';
+      homepage = "https://fedorahosted.org/suds";
+      license = "UNKNOWN";
+    };
+  };
+
 }
 
diff --git a/pkgs/top-level/python-packages.json b/pkgs/top-level/python-packages.json
index b5b7afab85b1..b8ddcee3a47f 100644
--- a/pkgs/top-level/python-packages.json
+++ b/pkgs/top-level/python-packages.json
@@ -137,5 +137,8 @@
   },
   { "name": "xlrd",
     "doCheck": false
+  },
+  { "name": "suds",
+    "doCheck": false
   }
 ]
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 2ec6d251cf42..ab605199e7f9 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2395,7 +2395,7 @@ rec {
     };
 
     propagatedBuildInputs = with pkgs; [
-      pyGtkGlade libtorrentRasterbar twisted Mako chardet pyxdg pyopenssl
+      pyGtkGlade libtorrentRasterbar twisted Mako chardet pyxdg pyopenssl modules.curses
     ];
 
     postInstall = ''
@@ -3212,12 +3212,12 @@ rec {
 
   hetzner = buildPythonPackage rec {
     name = "hetzner-${version}";
-    version = "0.6.0";
+    version = "0.7.0";
 
     src = fetchurl {
       url = "https://github.com/RedMoonStudios/hetzner/archive/"
           + "v${version}.tar.gz";
-      sha256 = "1cgi77f453ahw3ad6hvqwbyp6fwnh90rlzfgl9cp79wg58wyar4w";
+      sha256 = "1ldbhwy6yk18frv6n9znvdsrqfnpch4mfvc70jrpq3f9fw236src";
     };
 
     # not there yet, but coming soon.
@@ -5652,11 +5652,11 @@ rec {
 
 
   pyserial = buildPythonPackage rec {
-    name = "pyserial-2.6";
+    name = "pyserial-2.7";
 
     src = fetchurl {
       url = "http://pypi.python.org/packages/source/p/pyserial/${name}.tar.gz";
-      md5 = "cde799970b7c1ce1f7d6e9ceebe64c98";
+      sha256 = "3542ec0838793e61d6224e27ff05e8ce4ba5a5c5cc4ec5c6a3e8d49247985477";
     };
 
     doCheck = false;