summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2017-05-24 03:20:17 +0200
committerVladimír Čunát <vcunat@gmail.com>2017-05-24 03:24:06 +0200
commit8004e794153b34507f81a26f88174bdfee975aa8 (patch)
tree874e59b6b33bc0fdce26a6dc4a116b8b36b43205 /pkgs
parent1267b155c4a5afc6bda0a27b458c649a420dce2b (diff)
parent39e042fd64f41aa8610f35dcf4c4e9447ed59b3a (diff)
downloadnixlib-8004e794153b34507f81a26f88174bdfee975aa8.tar
nixlib-8004e794153b34507f81a26f88174bdfee975aa8.tar.gz
nixlib-8004e794153b34507f81a26f88174bdfee975aa8.tar.bz2
nixlib-8004e794153b34507f81a26f88174bdfee975aa8.tar.lz
nixlib-8004e794153b34507f81a26f88174bdfee975aa8.tar.xz
nixlib-8004e794153b34507f81a26f88174bdfee975aa8.tar.zst
nixlib-8004e794153b34507f81a26f88174bdfee975aa8.zip
Merge branch 'master' into staging
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/audio/aeolus/default.nix14
-rw-r--r--pkgs/applications/audio/aj-snapshot/default.nix4
-rw-r--r--pkgs/applications/audio/spotify/default.nix4
-rw-r--r--pkgs/applications/misc/hugo/default.nix4
-rw-r--r--pkgs/applications/misc/hugo/deps.nix96
-rw-r--r--pkgs/applications/networking/c14/default.nix10
-rw-r--r--pkgs/applications/networking/c14/deps.nix66
-rw-r--r--pkgs/applications/networking/cluster/kops/default.nix23
-rw-r--r--pkgs/applications/networking/instant-messengers/jackline/default.nix8
-rw-r--r--pkgs/applications/networking/instant-messengers/jackline/uchar.patch302
-rw-r--r--pkgs/applications/networking/mailreaders/astroid/default.nix4
-rw-r--r--pkgs/applications/networking/sniffers/wireshark/default.nix4
-rw-r--r--pkgs/applications/science/logic/cryptominisat/default.nix31
-rw-r--r--pkgs/applications/science/logic/minisat/unstable.nix23
-rw-r--r--pkgs/applications/science/logic/stp/default.nix43
-rw-r--r--pkgs/applications/science/logic/stp/fixbuild.diff45
-rw-r--r--pkgs/applications/science/logic/stp/fixrefs.diff192
-rw-r--r--pkgs/applications/video/kodi/plugins.nix36
-rw-r--r--pkgs/applications/video/obs-studio/default.nix6
-rw-r--r--pkgs/applications/virtualization/virt-manager/qt.nix4
-rwxr-xr-xpkgs/build-support/rust/fetch-cargo-deps4
-rw-r--r--pkgs/data/misc/hackage/default.nix4
-rw-r--r--pkgs/development/compilers/gcc/4.8/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/4.9/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/5/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/snapshot/default.nix2
-rw-r--r--pkgs/development/compilers/llvm/3.4/fix-llvm-config.patch13
-rw-r--r--pkgs/development/compilers/llvm/3.4/llvm.nix10
-rw-r--r--pkgs/development/compilers/urweb/default.nix6
-rw-r--r--pkgs/development/libraries/aws-sdk-cpp/default.nix4
-rw-r--r--pkgs/development/libraries/ffmpeg-full/default.nix4
-rw-r--r--pkgs/development/libraries/ffmpeg/3.3.nix4
-rw-r--r--pkgs/development/libraries/libhdhomerun/default.nix34
-rw-r--r--pkgs/development/libraries/libopus/default.nix11
-rw-r--r--pkgs/development/python-modules/flake8/default.nix27
-rw-r--r--pkgs/development/python-modules/mccabe/default.nix21
-rw-r--r--pkgs/development/python-modules/pelican/default.nix53
-rw-r--r--pkgs/development/python-modules/pyflakes/default.nix23
-rw-r--r--pkgs/development/tools/ammonite/default.nix4
-rw-r--r--pkgs/development/tools/build-managers/pants/default.nix95
-rw-r--r--pkgs/development/tools/continuous-integration/jenkins/default.nix4
-rw-r--r--pkgs/development/tools/coursier/default.nix4
-rw-r--r--pkgs/development/tools/misc/gdb/default.nix64
-rw-r--r--pkgs/development/tools/wllvm/default.nix20
-rw-r--r--pkgs/games/eternity-engine/default.nix22
-rw-r--r--pkgs/games/freeciv/default.nix4
-rw-r--r--pkgs/games/gzdoom/default.nix9
-rw-r--r--pkgs/games/robotfindskitten/default.nix24
-rw-r--r--pkgs/games/vms-empire/default.nix42
-rw-r--r--pkgs/misc/emulators/wine/base.nix7
-rw-r--r--pkgs/misc/emulators/wine/default.nix3
-rw-r--r--pkgs/misc/emulators/wine/staging.nix2
-rw-r--r--pkgs/misc/vim-plugins/default.nix93
-rw-r--r--pkgs/misc/vim-plugins/vim-plugin-names1
-rw-r--r--pkgs/os-specific/darwin/cctools/port.nix8
-rw-r--r--pkgs/os-specific/linux/acpid/default.nix4
-rw-r--r--pkgs/os-specific/linux/iwd/default.nix36
-rw-r--r--pkgs/os-specific/linux/kernel/linux-testing.nix6
-rw-r--r--pkgs/servers/http/nginx/modules.nix4
-rw-r--r--pkgs/servers/http/nginx/stable.nix4
-rw-r--r--pkgs/servers/uwsgi/default.nix4
-rw-r--r--pkgs/shells/zsh-autosuggestions/default.nix6
-rw-r--r--pkgs/shells/zsh-completions/default.nix4
-rw-r--r--pkgs/shells/zsh-syntax-highlighting/default.nix24
-rw-r--r--pkgs/stdenv/darwin/default.nix11
-rw-r--r--pkgs/stdenv/freebsd/default.nix13
-rw-r--r--pkgs/stdenv/generic/default.nix68
-rw-r--r--pkgs/stdenv/linux/default.nix10
-rw-r--r--pkgs/stdenv/native/default.nix3
-rw-r--r--pkgs/stdenv/nix/default.nix4
-rw-r--r--pkgs/tools/archivers/zpaq/zpaqd.nix24
-rw-r--r--pkgs/tools/inputmethods/ibus/default.nix53
-rw-r--r--pkgs/tools/misc/aescrypt/default.nix4
-rw-r--r--pkgs/tools/misc/esptool-ck/default.nix28
-rw-r--r--pkgs/tools/misc/esptool/default.nix25
-rw-r--r--pkgs/tools/misc/grc/default.nix4
-rw-r--r--pkgs/tools/misc/tmux/default.nix4
-rw-r--r--pkgs/tools/misc/youtube-dl/default.nix4
-rw-r--r--pkgs/tools/package-management/nix/default.nix13
-rw-r--r--pkgs/tools/package-management/nixops/unstable.nix6
-rw-r--r--pkgs/tools/security/aide/default.nix11
-rw-r--r--pkgs/tools/security/sslscan/default.nix4
-rw-r--r--pkgs/tools/text/aha/default.nix4
-rw-r--r--pkgs/tools/virtualization/cloud-init/add-nixos-support.patch113
-rw-r--r--pkgs/tools/virtualization/cloud-init/default.nix16
-rw-r--r--pkgs/top-level/all-packages.nix93
-rw-r--r--pkgs/top-level/python-packages.nix224
-rw-r--r--pkgs/top-level/release-cross.nix6
89 files changed, 1164 insertions, 1226 deletions
diff --git a/pkgs/applications/audio/aeolus/default.nix b/pkgs/applications/audio/aeolus/default.nix
index 9fe781f17697..7ac1025c5027 100644
--- a/pkgs/applications/audio/aeolus/default.nix
+++ b/pkgs/applications/audio/aeolus/default.nix
@@ -1,16 +1,20 @@
 { stdenv, fetchurl, libclthreads, zita-alsa-pcmi, alsaLib, libjack2
-, libclxclient, libX11, libXft, readline}:
+, libclxclient, libX11, libXft, readline
+}:
 
 stdenv.mkDerivation rec {
   name = "aeolus-${version}";
-  version = "0.9.0";
+  version = "0.9.5";
+
   src = fetchurl {
     url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
-    sha256 = "0dkkibza25a6z9446njqlaynx8gfk5wb828pl9v1snmi5390iggp";
+    sha256 = "0wfp8ihldyq2dhdyy7ld7z0zzfvnwam1dvbxnpd9d6xgc4k3j4nv";
   };
 
-  buildInputs = [ libclthreads zita-alsa-pcmi alsaLib libjack2 libclxclient
-    libX11 libXft readline ];
+  buildInputs = [
+    libclthreads zita-alsa-pcmi alsaLib libjack2 libclxclient
+    libX11 libXft readline
+  ];
 
   patchPhase = ''sed "s@ldconfig.*@@" -i source/Makefile'';
 
diff --git a/pkgs/applications/audio/aj-snapshot/default.nix b/pkgs/applications/audio/aj-snapshot/default.nix
index c70a1b4aa9bc..06e143704224 100644
--- a/pkgs/applications/audio/aj-snapshot/default.nix
+++ b/pkgs/applications/audio/aj-snapshot/default.nix
@@ -3,11 +3,11 @@
 stdenv.mkDerivation rec {
   name =  packageName + "-" + version ;
   packageName = "aj-snapshot" ;
-  version = "0.9.6" ;
+  version = "0.9.7";
 
   src = fetchurl {
     url = "mirror://sourceforge/${packageName}/${name}.tar.bz2";
-    sha256 = "12n2h3609fbvsnnwrwma4m55iyv6lcv1v3q5pznz2w6f12wf0c9z";
+    sha256 = "0yxccgp9qw2cyqv719wlbq8wfsr5ga8czvwa7bmb8dh5s11n3rn8";
   };
 
   doCheck = false;
diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix
index 765f0e9e5a79..e5dbf0aab84d 100644
--- a/pkgs/applications/audio/spotify/default.nix
+++ b/pkgs/applications/audio/spotify/default.nix
@@ -8,7 +8,7 @@ let
   # Please update the stable branch!
   # Latest version number can be found at:
   # http://repository-origin.spotify.com/pool/non-free/s/spotify-client/
-  version = "1.0.53.758.gde3fc4b2-33";
+  version = "1.0.55.487.g256699aa-16";
 
   deps = [
     alsaLib
@@ -53,7 +53,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "https://repository-origin.spotify.com/pool/non-free/s/spotify-client/spotify-client_${version}_amd64.deb";
-    sha256 = "1sh6bv23yx0fcbmf60c2yyi6411ij85k4jalpjlck2w26nfj1b3g";
+    sha256 = "09rhm0jp5prcvyf8zpw4pl422yiy8nkazcjc3lv61ngpznk3n1r0";
   };
 
   buildInputs = [ dpkg makeWrapper ];
diff --git a/pkgs/applications/misc/hugo/default.nix b/pkgs/applications/misc/hugo/default.nix
index 11be3d733c41..ab844e8b5b83 100644
--- a/pkgs/applications/misc/hugo/default.nix
+++ b/pkgs/applications/misc/hugo/default.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   name = "hugo-${version}";
-  version = "0.20.6";
+  version = "0.21";
 
   goPackagePath = "github.com/spf13/hugo";
 
@@ -10,7 +10,7 @@ buildGoPackage rec {
     owner = "spf13";
     repo = "hugo";
     rev = "v${version}";
-    sha256 = "1r8sjx7rbrjk2a3x3x6cd987xykm2j06jbnwxxsn4rs6yym0yjl8";
+    sha256 = "1lv815dwj02gwp5jhs03yrcfilhg5afx476bv7hb9ipx4q3a8lqm";
   };
 
   goDeps = ./deps.nix;
diff --git a/pkgs/applications/misc/hugo/deps.nix b/pkgs/applications/misc/hugo/deps.nix
index e2e2d093dded..4b33a1ec0de0 100644
--- a/pkgs/applications/misc/hugo/deps.nix
+++ b/pkgs/applications/misc/hugo/deps.nix
@@ -4,8 +4,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/BurntSushi/toml";
-      rev = "99064174e013895bbd9b025c31100bd1d9b590ca";
-      sha256 = "058qrar8rvw3wb0ci1mf1axnqq2729cvv9zmdr4ms2nn9s97yiz9";
+      rev = "b26d9c308763d68093482582cea63d69be07a0f0";
+      sha256 = "0k7v2i1d2d6si8gswn83qb84czhhia53v2wdy33yz9ppdidxk0ry";
     };
   }
   {
@@ -13,8 +13,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/PuerkitoBio/purell";
-      rev = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4";
-      sha256 = "0vsxyn1fbm7g873b8kf3hcsgqgncb5nmfq3zfsc35a9yhzarka91";
+      rev = "b938d81255b5473c57635324295cb0fe398c7a58";
+      sha256 = "0d44lrg04g9nibhdlagwq9n8g5ka1784pm0jzyl6cfpq8nc1ppj8";
     };
   }
   {
@@ -22,8 +22,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/PuerkitoBio/urlesc";
-      rev = "5bd2802263f21d8788851d5305584c82a5c75d7e";
-      sha256 = "15y5r3asvm7196m3nza5xvdvlc2k11p6lfs6hi917hl7r9vgi6mp";
+      rev = "bbf7a2afc14f93e1e0a5c06df524fbd75e5031e5";
+      sha256 = "13r896yy71i6jj1cwv2pjp53wjfxkg7bh884fggv6y79ly0qr63j";
     };
   }
   {
@@ -76,8 +76,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/eknkc/amber";
-      rev = "9be5e8aae85904f63d505e0c00e5e0881d44ef4d";
-      sha256 = "1hmsqxwajgpmg1svzjqxf4n81qy7qs6m39cjv69jkhz9lpwc305j";
+      rev = "d15eb996544134263b00cce829b5bc4988fdb2df";
+      sha256 = "1izrfw8vp5m2x8bmjaz1psmyn9pqcmcdsr3adiv1kkkqr01r37bb";
     };
   }
   {
@@ -103,8 +103,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/gorilla/websocket";
-      rev = "adf16b31781325cbd41085c5be901d95b4d1f33d";
-      sha256 = "0f93k3igbqqwsl734lxnkbfajc4lcyzg4szg15vb26qn939b5ccx";
+      rev = "a91eba7f97777409bc2c443f5534d41dd20c5720";
+      sha256 = "13cg6wwkk2ddqbm0nh9fpx4mq7f6qym12ch4lvs53n028ycdgw87";
     };
   }
   {
@@ -112,8 +112,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/hashicorp/hcl";
-      rev = "80e628d796135357b3d2e33a985c666b9f35eee1";
-      sha256 = "0l85a7ir60hycb3mqsxmrz18f1kax03k55afsahr8xf46pjp5pyb";
+      rev = "630949a3c5fa3c613328e1b8256052cbc2327c9b";
+      sha256 = "00lalg0gz7218gnw6zgn28gfizpcl8zw8jpkghn681vj7lfah5dh";
     };
   }
   {
@@ -130,8 +130,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/kardianos/osext";
-      rev = "9b883c5eb462dd5cb1b0a7a104fe86bc6b9bd391";
-      sha256 = "0cyhbgsxwdfnwy57pdfivvjfy951gxbg9qlsjbwm6vs3gfws07mr";
+      rev = "9d302b58e975387d0b4d9be876622c86cefe64be";
+      sha256 = "0r6f727s16g4f66k8c2z1xh8ga1p53hg9g2v95pmhd1i60fhy47a";
     };
   }
   {
@@ -148,8 +148,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/kyokomi/emoji";
-      rev = "7e06b236c489543f53868841f188a294e3383eab";
-      sha256 = "1q2j0k5a8qqka1syc9zwmf1cvm6k628kf2g1nmghp2kdr7q1xmyb";
+      rev = "7ad0be7be9d4ee6ec2cf5df483dbec752626ac64";
+      sha256 = "1ck33c8xhdqdpmi5zjdk0f2qv2fda3wz88i22bxr10f9rmwkj004";
     };
   }
   {
@@ -157,8 +157,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/magiconair/properties";
-      rev = "9c47895dc1ce54302908ab8a43385d1f5df2c11c";
-      sha256 = "0497bacr3gc7352gcwb07wyw7vb9m04xfd82mw0hpnzzw3kfnav3";
+      rev = "51463bfca2576e06c62a8504b5c0f06d61312647";
+      sha256 = "0d7hr78y8gg2mrm5z4jjgm2w3awkznz383b7wvyzk3l33jw6i288";
     };
   }
   {
@@ -166,8 +166,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/miekg/mmark";
-      rev = "2d4f1dd6f87cad351b9323bbaa6f6c586f0c4bee";
-      sha256 = "1ak54nvmryx73g16q6qaac9x0klhbxxmk1j6zlnfvvibnkj2pa90";
+      rev = "8b498b013a3e10b12864c2023a59d490c9d4bf5b";
+      sha256 = "1v1q365d94hmpdip13a5435y6pfw3mq5isjj33q19by21zvb433v";
     };
   }
   {
@@ -175,8 +175,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/mitchellh/mapstructure";
-      rev = "bfdb1a85537d60bc7e954e600c250219ea497417";
-      sha256 = "141kkh801jyp1r6hba14krydqg1iivp13j12is70j0g05z9fbji8";
+      rev = "53818660ed4955e899c0bcafa97299a388bd7c8e";
+      sha256 = "10gdkk8gcjv0lg15ajy68dwgvfkjhawk08ccs9x9ym1adp6l2ycs";
     };
   }
   {
@@ -184,8 +184,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/nicksnyder/go-i18n";
-      rev = "4df9b06c0c1ffd8538a3cfa9d888f8f52985b302";
-      sha256 = "1cbbvq9l822p7vrscvaah3zybsj5yxcsq9fgvgsg062njbb0x41f";
+      rev = "f373441d6d54a32891b2d8b1dbf99bc518f3d60d";
+      sha256 = "094kcybx0vmdvi3n2y4krrirg79527cq8713kppd6b19jwrqwqf4";
     };
   }
   {
@@ -202,8 +202,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/pelletier/go-toml";
-      rev = "fee7787d3f811af92276f5ff10107092e95b7a1d";
-      sha256 = "0srx5hr35f9qzn5dnqqa0msyjknwn7vcq0jmlkvfxgaq0ygd6s3r";
+      rev = "fe206efb84b2bc8e8cfafe6b4c1826622be969e3";
+      sha256 = "1dlabfpnlzvwf4i86idy8ilqpjsl8yqfgdv0nv5cccm8gkcans5w";
     };
   }
   {
@@ -211,8 +211,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/pkg/errors";
-      rev = "248dadf4e9068a0b3e79f02ed0a610d935de5302";
-      sha256 = "03l80r0i9bxl0vz363w62k4a8apzglgbrz6viwym3044sxkl1qks";
+      rev = "ff09b135c25aae272398c51a07235b90a75aa4f0";
+      sha256 = "0pwl6v3hmc22zp32gkyqykl4kg69xk1mlp0vmhgd1f44difd5fvz";
     };
   }
   {
@@ -229,8 +229,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/russross/blackfriday";
-      rev = "5f33e7b7878355cd2b7e6b8eefc48a5472c69f70";
-      sha256 = "0d7faqxrxvh8hwc1r8gbasgmr8x5blxvzciwspir2yafjfbqy87k";
+      rev = "b253417e1cb644d645a0a3bb1fa5034c8030127c";
+      sha256 = "1knj8vabymhmkg12cj3hnpqf3b74wwrvqib12yczcvpi52xaqi20";
     };
   }
   {
@@ -256,8 +256,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/spf13/cast";
-      rev = "ce135a4ebeee6cfe9a26c93ee0d37825f26113c7";
-      sha256 = "1a2ahiyynn1kdjznqvzjfm5g5bc098gfw857bw9qikhdljvsnjiy";
+      rev = "acbeb36b902d72a7a4c18e8f3241075e7ab763e4";
+      sha256 = "0w25s6gjbbwv47b9208hysyqqphd6pib3d2phg24mjy4wigkm050";
     };
   }
   {
@@ -265,8 +265,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/spf13/cobra";
-      rev = "7be4beda01ec05d0b93d80b3facd2b6f44080d94";
-      sha256 = "0jd2ya8kn763z16c3q5jl1x6raw2f3xq3vbaf4ppiy70zqzscmyg";
+      rev = "3d7bff8a321b0a0f88b115558bb7e21bec9124ab";
+      sha256 = "07lxw8lnbpdqjvjlx732v9i04z8kgyvlp68d0fqdv6a16smf3nyz";
     };
   }
   {
@@ -301,8 +301,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/spf13/pflag";
-      rev = "9ff6c6923cfffbcd502984b8e0c80539a94968b7";
-      sha256 = "0mfrxzyl8x7araa126lh8l3sihbbgfbzgkrg3v3cx7y4n3wrsqvn";
+      rev = "f1d95a35e132e8a1868023a08932b14f0b8b8fcb";
+      sha256 = "0fwvkyq36jvy2gid81031ll7qaj8jxr5g36fff7hhkp3hh4kz6zh";
     };
   }
   {
@@ -310,8 +310,8 @@
     fetch = {
       type = "git";
       url = "https://github.com/spf13/viper";
-      rev = "7538d73b4eb9511d85a9f1dfef202eeb8ac260f4";
-      sha256 = "0i4q715bjp018zw1b52zgx79j4s7s8l26dyrw8cslshibkx0frnl";
+      rev = "5d46e70da8c0b6f812e0b170b7a985753b5c63cb";
+      sha256 = "1wvcb1n3y3b7ixlw9vcj4fss5r6vi35a89c42nfb1hqaaji3lypi";
     };
   }
   {
@@ -337,8 +337,8 @@
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/crypto";
-      rev = "453249f01cfeb54c3d549ddb75ff152ca243f9d8";
-      sha256 = "0akybbzgi3v507a39bgnkk79rfhj8gflr7538g5a0177z5i9ygwa";
+      rev = "cbc3d0884eac986df6e78a039b8792e869bff863";
+      sha256 = "1b82asfxajwjb9rindx85c39lll8ygsj9rxxjca9171yh6wi5xbb";
     };
   }
   {
@@ -346,8 +346,8 @@
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/net";
-      rev = "906cda9512f77671ab44f8c8563b13a8e707b230";
-      sha256 = "0aa33n5a2zzrm2pnjyc3xkdmf8hq2qpafgdp8v6fxfb0swqjl2n3";
+      rev = "5602c733f70afc6dcec6766be0d5034d4c4f14de";
+      sha256 = "0n7jv3sl2s5fzdvj9jv4dqsgsdgkw6m3azqhiwq8igi97rymchyd";
     };
   }
   {
@@ -355,8 +355,8 @@
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/sys";
-      rev = "075e574b89e4c2d22f2286a7e2b919519c6f3547";
-      sha256 = "1p38siwqcbd592lphaqpigl7scshkfy67k6jcwscbcsl6akw51km";
+      rev = "dbc2be9168a660ef302e04b6ff6406de6f967473";
+      sha256 = "1hz9d7wnxwlvhlgmqrxjdx9fihx30f9ww6ir2l74l8ping1g6w1j";
     };
   }
   {
@@ -364,8 +364,8 @@
     fetch = {
       type = "git";
       url = "https://go.googlesource.com/text";
-      rev = "0ad425fe45e885577bef05dc1c50f72e33188b16";
-      sha256 = "1jz0i8iagfd703flx5z006kisjixpm8iy4hiwywgbh31wypsxxyl";
+      rev = "f4b4367115ec2de254587813edaa901bc1c723a8";
+      sha256 = "1a5m97y7sdxks02p4swg8ffp8bgr95aaf5fhfw511p7h3xg1dm0d";
     };
   }
   {
@@ -373,8 +373,8 @@
     fetch = {
       type = "git";
       url = "https://gopkg.in/yaml.v2";
-      rev = "a3f3340b5840cee44f372bddb5880fcbc419b46a";
-      sha256 = "1djb53a8ikwgkfpf8namgf4d8pq1mq6q9q2c7q0z8x4dxf3whxj7";
+      rev = "cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b";
+      sha256 = "1hj2ag9knxflpjibck0n90jrhsrqz7qvad4qnif7jddyapi9bqzl";
     };
   }
 ]
diff --git a/pkgs/applications/networking/c14/default.nix b/pkgs/applications/networking/c14/default.nix
index 188ccdd71d4e..e7aa7bb67280 100644
--- a/pkgs/applications/networking/c14/default.nix
+++ b/pkgs/applications/networking/c14/default.nix
@@ -1,15 +1,17 @@
 { stdenv, buildGoPackage, fetchFromGitHub }:
 
 buildGoPackage rec {
-  name = "c14-cli-2016-09-09";
+  name = "c14-cli-unstable-${version}";
+  version = "2017-05-15";
+  rev = "97f437ef5133f73edd551c883db3076c76cb1f6b";
+
   goPackagePath = "github.com/online-net/c14-cli";
-  subPackages = [ "cmd/c14" ];
 
   src = fetchFromGitHub {
     owner = "online-net";
     repo = "c14-cli";
-    rev = "e7c7c3cb214fd06df63530a4e861210e7a0a1b6c";
-    sha256 = "1k53lii2c04j8cy1bnyfvckl9fglprxp75cmbg15lrp9iic2w22a";
+    inherit rev;
+    sha256 = "1b44bh0zhh6rhw4d3nprnnxhjgaskl9kzp2cvwwyli5svhjxrfdj";
   };
 
   goDeps = ./deps.nix;
diff --git a/pkgs/applications/networking/c14/deps.nix b/pkgs/applications/networking/c14/deps.nix
index 60b6b7384387..fe51488c7066 100644
--- a/pkgs/applications/networking/c14/deps.nix
+++ b/pkgs/applications/networking/c14/deps.nix
@@ -1,65 +1 @@
-[
-  {
-    goPackagePath = "github.com/davecgh/go-spew";
-    fetch = {
-      type = "git";
-      url = "https://github.com/davecgh/go-spew";
-      rev = "6d212800a42e8ab5c146b8ace3490ee17e5225f9";
-      sha256 = "01i0n1s4j7khb7n6mz2wymniz37q0vbzkgfv7rbi6p9hpg227q93";
-    };
-  }
-  {
-    goPackagePath = "github.com/fatih/color";
-    fetch = {
-      type = "git";
-      url = "https://github.com/fatih/color";
-      rev = "87d4004f2ab62d0d255e0a38f1680aa534549fe3";
-      sha256 = "0d51avdl4z38f7jd8qmzrzyh4gxkcjpxd0vvma9zfqhmqy15jqhb";
-    };
-  }
-  {
-    goPackagePath = "github.com/mattn/go-colorable";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mattn/go-colorable";
-      rev = "ed8eb9e318d7a84ce5915b495b7d35e0cfe7b5a8";
-      sha256 = "034fhyqmiqmn0v9gdbdmm0ca5d0pki2q1ch1rd34p9kh9574mjyq";
-    };
-  }
-  {
-    goPackagePath = "github.com/mattn/go-isatty";
-    fetch = {
-      type = "git";
-      url = "https://github.com/mattn/go-isatty";
-      rev = "66b8e73f3f5cda9f96b69efd03dd3d7fc4a5cdb8";
-      sha256 = "17lf13ndnai9a6dlmykqkdyzf1z04q7kffs0l7kvd78wpv3l6rm5";
-    };
-  }
-  {
-    goPackagePath = "github.com/online-net/c14-cli";
-    fetch = {
-      type = "git";
-      url = "https://github.com/online-net/c14-cli";
-      rev = "e7c7c3cb214fd06df63530a4e861210e7a0a1b6c";
-      sha256 = "1k53lii2c04j8cy1bnyfvckl9fglprxp75cmbg15lrp9iic2w22a";
-    };
-  }
-  {
-    goPackagePath = "github.com/pmezard/go-difflib";
-    fetch = {
-      type = "git";
-      url = "https://github.com/pmezard/go-difflib";
-      rev = "792786c7400a136282c1664665ae0a8db921c6c2";
-      sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
-    };
-  }
-  {
-    goPackagePath = "github.com/stretchr/testify";
-    fetch = {
-      type = "git";
-      url = "https://github.com/stretchr/testify";
-      rev = "d77da356e56a7428ad25149ca77381849a6a5232";
-      sha256 = "11id286pkzyswxcx2xz6185fzh0nz6yzkk055dd6z02gvinl6pqa";
-    };
-  }
-]
+[]
diff --git a/pkgs/applications/networking/cluster/kops/default.nix b/pkgs/applications/networking/cluster/kops/default.nix
index ea25fa6ccb57..d15655b89db9 100644
--- a/pkgs/applications/networking/cluster/kops/default.nix
+++ b/pkgs/applications/networking/cluster/kops/default.nix
@@ -2,24 +2,37 @@
 
 buildGoPackage rec {
   name = "kops-${version}";
-  version = "1.4.0";
-  rev = "v${version}";
+  version = "1.6.0";
 
   goPackagePath = "k8s.io/kops";
 
   src = fetchFromGitHub {
-    inherit rev;
+    rev = version;
     owner = "kubernetes";
     repo = "kops";
-    sha256 = "1jwgn7l8c639j5annwymqjdw5mcajwn58y21042jy5lhgdh8pdf5";
+    sha256 = "0varn38v2vybmahzpgbk73ma368bkdz09wmx2mmqikfppmzszkv3";
   };
 
   buildInputs = [go-bindata];
   subPackages = ["cmd/kops"];
 
+  buildFlagsArray = ''
+    -ldflags=
+        -X k8s.io/kops.Version=${version}
+        -X k8s.io/kops.GitVersion=${version}
+  '';
+
   preBuild = ''
     (cd go/src/k8s.io/kops
-     go-bindata -o upup/models/bindata.go -pkg models -prefix upup/models/ upup/models/...)
+     go-bindata -o upup/models/bindata.go -pkg models -prefix upup/models/ upup/models/...
+     go-bindata -o federation/model/bindata.go -pkg model -prefix federation/model federation/model/...)
+  '';
+
+  postInstall = ''
+    mkdir -p $bin/share/bash-completion/completions
+    mkdir -p $bin/share/zsh/site-functions
+    $bin/bin/kops completion bash > $bin/share/bash-completion/completions/kops
+    $bin/bin/kops completion zsh > $bin/share/zsh/site-functions/_kops
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/instant-messengers/jackline/default.nix b/pkgs/applications/networking/instant-messengers/jackline/default.nix
index 25d71fa88597..a9cb3f09bcee 100644
--- a/pkgs/applications/networking/instant-messengers/jackline/default.nix
+++ b/pkgs/applications/networking/instant-messengers/jackline/default.nix
@@ -3,18 +3,16 @@
 assert stdenv.lib.versionAtLeast ocamlPackages.ocaml.version "4.02.2";
 
 stdenv.mkDerivation rec {
-  version = "2016-11-18";
+  version = "2017-05-21";
   name = "jackline-${version}";
 
   src = fetchFromGitHub {
     owner  = "hannesm";
     repo   = "jackline";
-    rev    = "cab34acab004023911997ec9aee8b00a976af7e4";
-    sha256 = "0h7wdsic4v6ys130w61zvxm5s2vc7y574hn7zby12rq88lhhrjh7";
+    rev    = "0a1e4ea23245633fe23edf09b2309659a1bc3649";
+    sha256 = "1wnmwsp3a5nh3qs4h9grrdsvv0i3p419cfmhrrql3lj2x3ngdw82";
   };
 
-  patches = [ ./uchar.patch ];
-
   buildInputs = with ocamlPackages; [
                   ocaml ocamlbuild findlib topkg ppx_sexp_conv
                   erm_xmpp_0_3 tls nocrypto x509 ocaml_lwt otr astring
diff --git a/pkgs/applications/networking/instant-messengers/jackline/uchar.patch b/pkgs/applications/networking/instant-messengers/jackline/uchar.patch
deleted file mode 100644
index f861135090e5..000000000000
--- a/pkgs/applications/networking/instant-messengers/jackline/uchar.patch
+++ /dev/null
@@ -1,302 +0,0 @@
-diff --git a/_tags b/_tags
-index 88318d9..b433ee8 100644
---- a/_tags
-+++ b/_tags
-@@ -7,9 +7,11 @@ true : package(sexplib astring)
- 
- <src/xconfig.ml>: package(otr ppx_sexp_conv)
- <src/utils.ml>: package(uutf)
-+<src/muc.ml>: package(uchar)
-+<src/contact.mli>: package(uchar)
- <src/persistency.ml>: package(lwt nocrypto)
- <src/xjid.{ml,mli}>: package(ppx_sexp_conv erm_xmpp)
--<src/user.{ml,mli}>: package(ppx_sexp_conv otr hex ptime ptime.clock.os)
-+<src/user.{ml,mli}>: package(uchar ppx_sexp_conv otr hex ptime ptime.clock.os)
- <src/xmpp_callbacks.ml>: package(erm_xmpp lwt tls tls.lwt ptime)
- <src/xmpp_connection.ml>: package(erm_xmpp lwt tls tls.lwt)
- 
-@@ -18,6 +20,6 @@ true : package(sexplib astring)
- <cli/cli_input.ml>: package(notty lwt erm_xmpp otr)
- <cli/cli_commands.ml>: package(lwt otr erm_xmpp)
- <cli/cli_config.ml>: package(lwt nocrypto otr notty tls.lwt x509)
--<cli/cli_state.ml>: package(hex lwt nocrypto erm_xmpp tls.lwt x509)
-+<cli/cli_state.ml>: package(uchar hex lwt nocrypto erm_xmpp tls.lwt x509)
- 
- <bin/jackline.{ml,byte,native}>: package(erm_xmpp hex lwt notty notty.lwt nocrypto otr sexplib tls tls.lwt ptime ptime.clock.os)
-diff --git a/cli/cli_config.ml b/cli/cli_config.ml
-index 618d655..dac6e68 100644
---- a/cli/cli_config.ml
-+++ b/cli/cli_config.ml
-@@ -34,7 +34,7 @@ let rewrap term above below (prefix, inp, inp2) (width, _) =
-     let height = if col mod width = 0 then succ h else h in
-     (succ (col mod width), height)
-   in
--  Notty_lwt.Term.cursor term (Some (col, row))
-+  Notty_lwt.Term.cursor term (Some (col - 1, row - 1))
- 
- let read_line ?(above = []) ?(prefix = "") ?default ?(below = []) term =
-   let rec go (pre, post) =
-@@ -56,8 +56,8 @@ let read_line ?(above = []) ?(prefix = "") ?default ?(below = []) term =
-       | `Unhandled k ->
-         match k with
-         | `Key (`Enter, []) -> Lwt.return (char_list_to_str (pre @ post))
--        | `Key (`Uchar 0x43, [`Ctrl]) -> Lwt.fail (Invalid_argument "Ctrl-c")
--        | `Key (`Uchar 0x44, [`Ctrl]) -> Lwt.fail (Invalid_argument "Ctrl-d")
-+        | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x43 -> Lwt.fail (Invalid_argument "Ctrl-c")
-+        | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x44 -> Lwt.fail (Invalid_argument "Ctrl-d")
-         | _ -> go (pre, post)
-   in
-   let pre = Utils.option [] str_to_char_list default in
-@@ -180,7 +180,7 @@ let configure term () =
-     let pw = "Password: " in
-     let chars = match password with
-       | None -> I.string A.empty "will be asked at startup"
--      | Some _ -> I.uchar A.empty 0x2605 5 1
-+      | Some _ -> I.uchar A.empty (Uchar.of_int 0x2605) 5 1
-     in
-     above @ [I.(string A.empty pw <|> chars)]
-   in
-diff --git a/cli/cli_input.ml b/cli/cli_input.ml
-index 34b4288..07488f2 100644
---- a/cli/cli_input.ml
-+++ b/cli/cli_input.ml
-@@ -314,19 +314,19 @@ let read_terminal term mvar input_mvar () =
-           | `Key (`Arrow `Up, []) -> p (fun s -> ok (history s Up)) >>= fun () -> loop ()
-           | `Key (`Arrow `Down, []) -> p (fun s -> ok (history s Down)) >>= fun () -> loop ()
- 
--          | `Key (`Uchar 0x44, [`Ctrl]) (* C-d *) -> p (fun s -> Lwt.return (`Quit s))
-+          | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x44 (* C-d *) -> p (fun s -> Lwt.return (`Quit s))
- 
-           (* UI navigation and toggles *)
-           | `Key (`Page `Up, []) -> p (fun s -> ok (navigate_buddy_list s Up)) >>= fun () -> loop ()
-           | `Key (`Page `Down, []) -> p (fun s -> ok (navigate_buddy_list s Down)) >>= fun () -> loop ()
- 
-           | `Key (`Page `Up, [`Ctrl]) -> p (fun s -> ok (navigate_message_buffer s Up)) >>= fun () -> loop ()
--          | `Key (`Uchar 0x50, [`Ctrl]) (* C-p *) -> p (fun s -> ok (navigate_message_buffer s Up)) >>= fun () -> loop ()
-+          | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x50 (* C-p *) -> p (fun s -> ok (navigate_message_buffer s Up)) >>= fun () -> loop ()
-           | `Key (`Page `Down, [`Ctrl]) -> p (fun s -> ok (navigate_message_buffer s Down)) >>= fun () -> loop ()
--          | `Key (`Uchar 0x4E, [`Ctrl]) (* C-n *) -> p (fun s -> ok (navigate_message_buffer s Down)) >>= fun () -> loop ()
-+          | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x4E (* C-n *) -> p (fun s -> ok (navigate_message_buffer s Down)) >>= fun () -> loop ()
- 
--          | `Key (`Uchar 0x58, [`Ctrl]) (* C-x *) -> p (fun s -> ok (activate_contact s s.last_active_contact)) >>= fun () -> loop ()
--          | `Key (`Uchar 0x51, [`Ctrl]) (* C-q *) ->
-+          | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x58 (* C-x *) -> p (fun s -> ok (activate_contact s s.last_active_contact)) >>= fun () -> loop ()
-+          | `Key (`Uchar u, [`Ctrl]) when Uchar.to_int u = 0x51 (* C-q *) ->
-             let handle s =
-               let s = match List.rev s.notifications with
-                 | x::_ -> activate_contact s x
-diff --git a/cli/cli_state.ml b/cli/cli_state.ml
-index 5603cfe..ee320ce 100644
---- a/cli/cli_state.ml
-+++ b/cli/cli_state.ml
-@@ -24,7 +24,7 @@ type connect_v =
-   | Reconnect
-   | Presence of (User.presence * string option * int option)
- 
--type input = int list * int list
-+type input = Uchar.t list * Uchar.t list
- 
- type state = {
-   (* set only initially *)
-diff --git a/cli/cli_support.ml b/cli/cli_support.ml
-index 1c54df6..8275c38 100644
---- a/cli/cli_support.ml
-+++ b/cli/cli_support.ml
-@@ -4,17 +4,17 @@ open Notty
- module Char = struct
-   let hdash a w =
-     if !Utils.unicode then
--      I.uchar a 0x2500 w 1
-+      I.uchar a (Uchar.of_int 0x2500) w 1
-     else
-       I.char a '-' w 1
-   and vdash a h =
-     if !Utils.unicode then
--      I.uchar a 0x2502 1 h
-+      I.uchar a (Uchar.of_int 0x2502) 1 h
-     else
-       I.char a '|' 1 h
-   and star a w =
-     if !Utils.unicode then
--      I.uchar a 0x2605 w 1
-+      I.uchar a (Uchar.of_int 0x2605) w 1
-     else
-       I.char a '*' w 1
- end
-@@ -186,8 +186,8 @@ let v_center left right width =
-   and rw = I.width right
-   in
-   match rw, lw >= width with
--  | 0, true -> (I.hcrop (lw - width + 1) 0 left, width)
--  | 0, false -> (left, succ lw)
-+  | 0, true -> (I.hcrop (lw - width + 1) 0 left, width - 1)
-+  | 0, false -> (left, lw)
-   | _, _ ->
-     if lw + rw >= width then
-       let leftw = min (max (width - rw) (width / 2)) lw in
-@@ -195,11 +195,11 @@ let v_center left right width =
-       let l = I.hcrop (lw - leftw) 0 left
-       and r = I.hcrop 0 (rw - rightw) right
-       in
--      (I.(l <|> r), succ leftw)
-+      (I.(l <|> r), leftw)
-     else
--      (I.(left <|> right), succ lw)
-+      (I.(left <|> right), lw)
- 
--let str_to_char_list str : int list =
-+let str_to_char_list str : Uchar.t list =
-   let open Uutf in
-   List.rev (String.fold_utf_8 (fun acc _ -> function `Uchar i -> i :: acc | `Malformed _ -> acc) [] str)
- 
-@@ -236,22 +236,26 @@ let readline_input = function
-   | k -> `Unhandled k
- 
- let emacs_bindings = function
--  | `Key (`Uchar 0x41, [`Ctrl]) (* C-a *) -> `Ok (fun (pre, post) -> ([], pre @ post))
--  | `Key (`Uchar 0x45, [`Ctrl]) (* C-e *) -> `Ok (fun (pre, post) -> (pre @ post, []))
-+  | `Key (`Uchar u, [`Ctrl]) as k ->
-+    begin match Uchar.to_int u with
-+    | 0x41 (* C-a *) -> `Ok (fun (pre, post) -> ([], pre @ post))
-+    | 0x45 (* C-e *) -> `Ok (fun (pre, post) -> (pre @ post, []))
- 
--  | `Key (`Uchar 0x4b, [`Ctrl]) (* C-k *) -> `Ok (fun (pre, _) -> (pre, []))
--  | `Key (`Uchar 0x55, [`Ctrl]) (* C-u *) -> `Ok (fun (_, post) -> ([], post))
-+    | 0x4b (* C-k *) -> `Ok (fun (pre, _) -> (pre, []))
-+    | 0x55 (* C-u *) -> `Ok (fun (_, post) -> ([], post))
- 
--  | `Key (`Uchar 0x46, [`Ctrl]) (* C-f *) ->
-+    | 0x46 (* C-f *) ->
-     `Ok (fun (pre, post) ->
-         match post with
-         | [] -> (pre, post)
-         | hd::tl -> (pre @ [hd], tl))
--  | `Key (`Uchar 0x42, [`Ctrl]) (* C-b *) ->
-+    | 0x42 (* C-b *) ->
-     `Ok (fun (pre, post) ->
-         match List.rev pre with
-         | [] -> ([], post)
-         | hd::tl -> (List.rev tl, hd :: post))
-+    | _ -> `Unhandled k
-+    end
- 
-   | `Key (`Arrow `Left, [`Ctrl]) ->
-     `Ok (fun (pre, post) ->
-diff --git a/src/contact.mli b/src/contact.mli
-index 6926296..d6c795b 100644
---- a/src/contact.mli
-+++ b/src/contact.mli
-@@ -8,7 +8,7 @@ val bare : contact -> Xjid.bare_jid
- val preserve_messages : contact -> bool
- val expanded : contact -> bool
- val messages : contact -> User.message list
--val input_buffer : contact -> (int list * int list)
-+val input_buffer : contact -> (Uchar.t list * Uchar.t list)
- 
- val readline_history : contact -> string list
- val add_readline_history : contact -> string -> contact
-@@ -18,7 +18,7 @@ val set_history_position : contact -> int -> contact
- val received : contact -> string -> contact
- 
- val expand : contact -> contact
--val set_input_buffer : contact -> (int list * int list) -> contact
-+val set_input_buffer : contact -> (Uchar.t list * Uchar.t list) -> contact
- val set_preserve_messages : contact -> bool -> contact
- 
- val reset : contact -> contact
-diff --git a/src/muc.ml b/src/muc.ml
-index 1c98037..3293541 100644
---- a/src/muc.ml
-+++ b/src/muc.ml
-@@ -132,7 +132,7 @@ type groupchat = {
-   expand : bool ;
-   preserve_messages : bool ;
-   message_history : User.message list ; (* persistent if preserve_messages *)
--  input_buffer : (int list * int list) ;
-+  input_buffer : (Uchar.t list * Uchar.t list) ;
-   readline_history : string list ;
-   history_position : int ;
-   autojoin : bool ;
-diff --git a/src/user.ml b/src/user.ml
-index d039278..42a8c47 100644
---- a/src/user.ml
-+++ b/src/user.ml
-@@ -229,7 +229,7 @@ type user = {
-   properties        : property list ;
-   preserve_messages : bool ;
-   message_history   : message list ; (* persistent if preserve_messages is true *)
--  input_buffer: (int list * int list) ; (* not persistent *)
-+  input_buffer: (Uchar.t list * Uchar.t list) ; (* not persistent *)
-   readline_history  : string list ; (* not persistent *)
-   history_position  : int ; (* not persistent *)
-   otr_fingerprints  : fingerprint list ;
-diff --git a/src/user.mli b/src/user.mli
-index 52b503d..5ce41be 100644
---- a/src/user.mli
-+++ b/src/user.mli
-@@ -118,7 +118,7 @@ type user = {
-   properties        : property list ;
-   preserve_messages : bool ;
-   message_history   : message list ; (* persistent if preserve_messages is true *)
--  input_buffer: (int list * int list) ; (* not persistent *)
-+  input_buffer: (Uchar.t list * Uchar.t list) ; (* not persistent *)
-   readline_history  : string list ; (* not persistent *)
-   history_position  : int ;
-   otr_fingerprints  : fingerprint list ;
-diff --git a/src/utils.ml b/src/utils.ml
-index 0b4a3a7..cd9cb10 100644
---- a/src/utils.ml
-+++ b/src/utils.ml
-@@ -30,31 +30,33 @@ let validate_utf8 txt =
-   let rec loop d buf = match Uutf.decode d with
-     | `Await -> Buffer.contents buf
-     | `End -> Buffer.contents buf
--    | `Malformed _ -> if !unicode then Uutf.Buffer.add_utf_8 buf 0xFFFD; loop d buf
--    | `Uchar 0x000A -> (* newline *) Uutf.Buffer.add_utf_8 buf 0x000A ; loop d buf
--    | `Uchar 0x0009 -> (* tab -> 4 spaces *) Uutf.Buffer.add_utf_8 buf 0x0020 ; Uutf.Buffer.add_utf_8 buf 0x0020 ; Uutf.Buffer.add_utf_8 buf 0x0020 ; Uutf.Buffer.add_utf_8 buf 0x0020 ; loop d buf
--    | `Uchar 0x007F (* DEL *)
-+    | `Malformed _ -> if !unicode then Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0xFFFD); loop d buf
-+    | `Uchar u ->
-+      match Uchar.to_int u with
-+      | 0x000A -> (* newline *) Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0x000A) ; loop d buf
-+      | 0x0009 -> (* tab -> 4 spaces *) Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0x0020) ; Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0x0020) ; Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0x0020) ; Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0x0020) ; loop d buf
-+      | 0x007F (* DEL *)
-     (* See https://en.wikipedia.org/wiki/Unicode_control_characters / https://en.wikipedia.org/wiki/Bi-directional_text *)
--    | `Uchar 0x200E | `Uchar 0x200F (* left-to-right / right-to-left *)
--    | `Uchar 0x202A | `Uchar 0x202D (* left-to-right embedding / override *)
--    | `Uchar 0x202B | `Uchar 0x202E (* right-to-left embedding / override *)
--    | `Uchar 0x202C  (* pop directional format *)
--    | `Uchar 0x2066 | `Uchar 0x2067 (* l-t-r isolate r-t-l isolate *)
--    | `Uchar 0x2068 | `Uchar 0x2069 (* first strong isolate / pop directional isolate *)
--    | `Uchar 0x2028 | `Uchar 0x2029 (* line separator / page separator *) ->
--      if !unicode then Uutf.Buffer.add_utf_8 buf 0xFFFD ; loop d buf
--    | `Uchar x when x < 0x20 ->
-+      | 0x200E | 0x200F (* left-to-right / right-to-left *)
-+      | 0x202A | 0x202D (* left-to-right embedding / override *)
-+      | 0x202B | 0x202E (* right-to-left embedding / override *)
-+      | 0x202C  (* pop directional format *)
-+      | 0x2066 | 0x2067 (* l-t-r isolate r-t-l isolate *)
-+      | 0x2068 | 0x2069 (* first strong isolate / pop directional isolate *)
-+      | 0x2028 | 0x2029 (* line separator / page separator *) ->
-+      if !unicode then Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0xFFFD) ; loop d buf
-+      | x when x < 0x20 ->
-       (* other control characters *)
--      if !unicode then Uutf.Buffer.add_utf_8 buf 0xFFFD ; loop d buf
--    | `Uchar x when x >= 0x0080 && x <= 0x009F ->
-+      if !unicode then Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0xFFFD) ; loop d buf
-+      | x when x >= 0x0080 && x <= 0x009F ->
-       (* ctrl chars used in conjunction with ISO 8859 character sets (C0/C1) *)
--      if !unicode then Uutf.Buffer.add_utf_8 buf 0xFFFD ; loop d buf
-+      if !unicode then Uutf.Buffer.add_utf_8 buf (Uchar.of_int 0xFFFD) ; loop d buf
- 
--    | `Uchar x ->
-+      | x ->
-       let c = if !unicode then x else if x > 0xff then 0x3f else x in
--      Uutf.Buffer.add_utf_8 buf c ; loop d buf
-+      Uutf.Buffer.add_utf_8 buf (Uchar.of_int c) ; loop d buf
-   in
--  let nln = `Readline 0x000A in
-+  let nln = `Readline (Uchar.of_int 0x000A) in
-   loop (Uutf.decoder ~nln ~encoding:`UTF_8 (`String txt)) (Buffer.create (String.length txt))
- 
- let version = "%%VERSION_NUM%%"
diff --git a/pkgs/applications/networking/mailreaders/astroid/default.nix b/pkgs/applications/networking/mailreaders/astroid/default.nix
index 668044f5efb8..2f2ce79bcb18 100644
--- a/pkgs/applications/networking/mailreaders/astroid/default.nix
+++ b/pkgs/applications/networking/mailreaders/astroid/default.nix
@@ -3,13 +3,13 @@
 
 stdenv.mkDerivation rec {
   name = "astroid-${version}";
-  version = "0.8";
+  version = "0.9.1";
 
   src = fetchFromGitHub {
     owner = "astroidmail";
     repo = "astroid";
     rev = "v${version}";
-    sha256 = "1gjrdls1mz8y8bca7s8l965l0m7s2sb6g7a90gy848admjsyav7h";
+    sha256 = "0ha2jd3fvc54amh0x8f58s9ac4r8xgyhvkwd4jvs0h4mfh6cg496";
   };
 
   nativeBuildInputs = [ scons pkgconfig wrapGAppsHook ];
diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix
index c8880e630a6d..4e5d9893c2c9 100644
--- a/pkgs/applications/networking/sniffers/wireshark/default.nix
+++ b/pkgs/applications/networking/sniffers/wireshark/default.nix
@@ -12,7 +12,7 @@ assert withQt  -> !withGtk && qt5  != null;
 with stdenv.lib;
 
 let
-  version = "2.2.5";
+  version = "2.2.6";
   variant = if withGtk then "gtk" else if withQt then "qt" else "cli";
 
 in stdenv.mkDerivation {
@@ -20,7 +20,7 @@ in stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://www.wireshark.org/download/src/all-versions/wireshark-${version}.tar.bz2";
-    sha256 = "1j4sc3pmy8l6k41007spglcqiabjlzc7f85pn3jmjr9ksv9qipbm";
+    sha256 = "0jd89i9si43lyv3hsl6p1lkjmz4zagvc37wcbigsxxc5v8gda9zn";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/applications/science/logic/cryptominisat/default.nix b/pkgs/applications/science/logic/cryptominisat/default.nix
new file mode 100644
index 000000000000..26efbc5fe723
--- /dev/null
+++ b/pkgs/applications/science/logic/cryptominisat/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, fetchpatch, cmake, python, vim }:
+
+stdenv.mkDerivation rec {
+  name = "cryptominisat-${version}";
+  version = "5.0.1";
+
+  src = fetchFromGitHub {
+    owner = "msoos";
+    repo = "cryptominisat";
+    rev = version;
+    sha256 = "0cpw5d9vplxvv3aaplhnga55gz1hy29p7s4pkw1306knkbhlzvkb";
+  };
+
+  # vim for xxd binary
+  buildInputs = [ python vim ];
+  nativeBuildInputs = [ cmake ];
+
+  patches = [(fetchpatch rec {
+    name = "fix-exported-library-name.patch";
+    url = "https://github.com/msoos/cryptominisat/commit/7a47795cbe5ad5a899731102d297f234bcade077.patch";
+    sha256 = "11hf3cfqs4cykn7rlgjglq29lzqfxvlm0f20qasi0kdrz01cr30f";
+  })];
+
+  meta = with stdenv.lib; {
+    description = "An advanced SAT Solver";
+    maintainers = with maintainers; [ mic92 ];
+    platforms = platforms.unix;
+    license = licenses.mit;
+    homepage = https://github.com/msoos/cryptominisat;
+  };
+}
diff --git a/pkgs/applications/science/logic/minisat/unstable.nix b/pkgs/applications/science/logic/minisat/unstable.nix
new file mode 100644
index 000000000000..9d63f32c5449
--- /dev/null
+++ b/pkgs/applications/science/logic/minisat/unstable.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub, zlib, cmake }:
+
+stdenv.mkDerivation rec {
+  name = "minisat-unstable-2013-09-25";
+
+  src = fetchFromGitHub {
+    owner = "niklasso";
+    repo = "minisat";
+    rev = "37dc6c67e2af26379d88ce349eb9c4c6160e8543";
+    sha256 = "091hf3qkm197s5r7xcr3m07xsdwyz2rqk1hc9kj0hn13imz09irq";
+  };
+
+  buildInputs = [ zlib ];
+  nativeBuildInputs =  [ cmake ];
+
+  meta = with stdenv.lib; {
+    description = "Compact and readable SAT solver";
+    maintainers = with maintainers; [ mic92 ];
+    platforms = platforms.unix;
+    license = licenses.mit;
+    homepage = "http://minisat.se/";
+  };
+}
diff --git a/pkgs/applications/science/logic/stp/default.nix b/pkgs/applications/science/logic/stp/default.nix
index 444bb06c4a00..8c0b82cc549c 100644
--- a/pkgs/applications/science/logic/stp/default.nix
+++ b/pkgs/applications/science/logic/stp/default.nix
@@ -1,23 +1,32 @@
-{stdenv, cmake, boost, bison, flex, fetchgit, perl, zlib}: 
+{ stdenv, cmake, boost, bison, flex, fetchFromGitHub, perl, python3, python3Packages, zlib, minisatUnstable, cryptominisat }:
+
 stdenv.mkDerivation rec {
-  version = "2014.01.07";
+  version = "2.2.0";
   name = "stp-${version}";
-  src = fetchgit {
-    url    = "git://github.com/stp/stp";
-    rev    = "3aa11620a823d617fc033d26aedae91853d18635";
-    sha256 = "832520787f57f63cf47364d080f30ad10d6d6e00f166790c19b125be3d6dd45c";
+
+  src = fetchFromGitHub {
+    owner = "stp";
+    repo = "stp";
+    rev    = "stp-${version}";
+    sha256 = "1jh23wjm62nnqfx447g2y53bbangq04hjrvqc35v9xxpcjgj3i49";
   };
-  buildInputs = [ cmake boost bison flex perl zlib ];
-  cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
-  patchPhase = ''
-      sed -e 's,^export(PACKAGE.*,,' -i CMakeLists.txt
-      patch -p1 < ${./fixbuild.diff}
-      patch -p1 < ${./fixrefs.diff}
+
+  buildInputs = [ boost zlib minisatUnstable cryptominisat python3 ];
+  nativeBuildInputs = [ cmake bison flex perl ];
+  preConfigure = ''
+    python_install_dir=$out/${python3Packages.python.sitePackages}
+    mkdir -p $python_install_dir
+    cmakeFlagsArray=(
+      $cmakeFlagsArray
+      "-DBUILD_SHARED_LIBS=ON"
+      "-DPYTHON_LIB_INSTALL_DIR=$python_install_dir"
+    )
   '';
-  meta = {
-    description = ''Simple Theorem Prover'';
-    maintainers = with stdenv.lib.maintainers; [mornfall];
-    platforms = with stdenv.lib.platforms; linux;
-    license = stdenv.lib.licenses.mit;
+
+  meta = with stdenv.lib; {
+    description = "Simple Theorem Prover";
+    maintainers = with maintainers; [ mornfall ];
+    platforms = platforms.linux;
+    license = licenses.mit;
   };
 }
diff --git a/pkgs/applications/science/logic/stp/fixbuild.diff b/pkgs/applications/science/logic/stp/fixbuild.diff
deleted file mode 100644
index 01782cb4f40b..000000000000
--- a/pkgs/applications/science/logic/stp/fixbuild.diff
+++ /dev/null
@@ -1,45 +0,0 @@
-diff --git a/src/libstp/CMakeLists.txt b/src/libstp/CMakeLists.txt
-index 83bd03a..9c0304b 100644
---- a/src/libstp/CMakeLists.txt
-+++ b/src/libstp/CMakeLists.txt
-@@ -23,6 +23,15 @@ set(stp_lib_targets
-     printer
- )
- 
-+include_directories(${CMAKE_SOURCE_DIR}/src/AST/)
-+include_directories(${CMAKE_BINARY_DIR}/src/AST/)
-+
-+add_library(globalstp OBJECT
-+    ../main/Globals.cpp
-+    ${CMAKE_CURRENT_BINARY_DIR}/../main/GitSHA1.cpp
-+)
-+add_dependencies(globalstp ASTKind_header)
-+
- # Create list of objects and gather list of
- # associated public headers.
- set(stp_lib_objects "")
-@@ -31,6 +40,7 @@ foreach(target ${stp_lib_targets})
-     list(APPEND stp_lib_objects $<TARGET_OBJECTS:${target}>)
- 
-     get_target_property(TARGETS_PUBLIC_HEADERS ${target} PUBLIC_HEADER)
-+    set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)
-     if (EXISTS "${TARGETS_PUBLIC_HEADERS}")
-         list(APPEND stp_public_headers "${TARGETS_PUBLIC_HEADERS}")
-         message("Adding public header(s) ${TARGETS_PUBLIC_HEADERS} to target libstp")
-diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt
-index 0735137..73039f5 100644
---- a/src/main/CMakeLists.txt
-+++ b/src/main/CMakeLists.txt
-@@ -3,12 +3,6 @@ include_directories(${CMAKE_BINARY_DIR}/src/AST/)
- 
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/GitSHA1.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp" @ONLY)
- 
--add_library(globalstp OBJECT
--    Globals.cpp
--    ${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp
--)
--add_dependencies(globalstp ASTKind_header)
--
- # -----------------------------------------------------------------------------
- # Create binary
- # -----------------------------------------------------------------------------
diff --git a/pkgs/applications/science/logic/stp/fixrefs.diff b/pkgs/applications/science/logic/stp/fixrefs.diff
deleted file mode 100644
index 60ad4949f076..000000000000
--- a/pkgs/applications/science/logic/stp/fixrefs.diff
+++ /dev/null
@@ -1,192 +0,0 @@
-commit 53b6043e25b2eba264faab845077fbf6736cf22f
-Author: Petr Rockai <me@mornfall.net>
-Date:   Tue Jan 7 13:30:07 2014 +0100
-
-    aig: Comment out unused functions with undefined references in them.
-
-diff --git a/src/extlib-abc/aig/aig/aigPart.c b/src/extlib-abc/aig/aig/aigPart.c
-index a4cc116..5bd5f08 100644
---- a/src/extlib-abc/aig/aig/aigPart.c
-+++ b/src/extlib-abc/aig/aig/aigPart.c
-@@ -869,6 +869,7 @@ Vec_Ptr_t * Aig_ManMiterPartitioned( Aig_Man_t * p1, Aig_Man_t * p2, int nPartSi
-   SeeAlso     []

- 

- ***********************************************************************/

-+#if 0

- Aig_Man_t * Aig_ManChoicePartitioned( Vec_Ptr_t * vAigs, int nPartSize )

- {

-     extern int Cmd_CommandExecute( void * pAbc, char * sCommand );

-@@ -981,6 +982,7 @@ Aig_Man_t * Aig_ManChoicePartitioned( Vec_Ptr_t * vAigs, int nPartSize )
-     Aig_ManMarkValidChoices( pAig );

-     return pAig;

- }

-+#endif

- 

- 

- ////////////////////////////////////////////////////////////////////////

-diff --git a/src/extlib-abc/aig/aig/aigShow.c b/src/extlib-abc/aig/aig/aigShow.c
-index ae8fa8b..f04eedc 100644
---- a/src/extlib-abc/aig/aig/aigShow.c
-+++ b/src/extlib-abc/aig/aig/aigShow.c
-@@ -326,6 +326,7 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t *
-   SeeAlso     []

- 

- ***********************************************************************/

-+#if 0

- void Aig_ManShow( Aig_Man_t * pMan, int fHaig, Vec_Ptr_t * vBold )

- {

-     extern void Abc_ShowFile( char * FileNameDot );

-@@ -347,7 +348,7 @@ void Aig_ManShow( Aig_Man_t * pMan, int fHaig, Vec_Ptr_t * vBold )
-     // visualize the file 

-     Abc_ShowFile( FileNameDot );

- }

--

-+#endif

- 

- ////////////////////////////////////////////////////////////////////////

- ///                       END OF FILE                                ///

-diff --git a/src/extlib-abc/aig/dar/darRefact.c b/src/extlib-abc/aig/dar/darRefact.c
-index d744b4f..23fc3d5 100644
---- a/src/extlib-abc/aig/dar/darRefact.c
-+++ b/src/extlib-abc/aig/dar/darRefact.c
-@@ -340,6 +340,7 @@ printf( "\n" );
-   SeeAlso     []

- 

- ***********************************************************************/

-+#if 0

- int Dar_ManRefactorTryCuts( Ref_Man_t * p, Aig_Obj_t * pObj, int nNodesSaved, int Required )

- {

-     Vec_Ptr_t * vCut;

-@@ -428,6 +429,7 @@ int Dar_ManRefactorTryCuts( Ref_Man_t * p, Aig_Obj_t * pObj, int nNodesSaved, in
-     }

-     return p->GainBest;

- }

-+#endif

- 

- /**Function*************************************************************

- 

-@@ -461,6 +463,7 @@ int Dar_ObjCutLevelAchieved( Vec_Ptr_t * vCut, int nLevelMin )
-   SeeAlso     []

-  

- ***********************************************************************/

-+#if 0

- int Dar_ManRefactor( Aig_Man_t * pAig, Dar_RefPar_t * pPars )

- {

- //    Bar_Progress_t * pProgress;

-@@ -583,6 +586,7 @@ p->timeOther = p->timeTotal - p->timeCuts - p->timeEval;
-     return 1;

- 

- }

-+#endif

- 

- ////////////////////////////////////////////////////////////////////////

- ///                       END OF FILE                                ///

-diff --git a/src/extlib-abc/aig/dar/darScript.c b/src/extlib-abc/aig/dar/darScript.c
-index e60df00..1b9c24f 100644
---- a/src/extlib-abc/aig/dar/darScript.c
-+++ b/src/extlib-abc/aig/dar/darScript.c
-@@ -64,6 +64,7 @@ Aig_Man_t * Dar_ManRewriteDefault( Aig_Man_t * pAig )
-   SeeAlso     []

- 

- ***********************************************************************/

-+#if 0

- Aig_Man_t * Dar_ManRwsat( Aig_Man_t * pAig, int fBalance, int fVerbose )

- //alias rwsat       "st; rw -l; b -l; rw -l; rf -l"

- {

-@@ -108,7 +109,7 @@ Aig_Man_t * Dar_ManRwsat( Aig_Man_t * pAig, int fBalance, int fVerbose )
- 

-     return pAig;

- }

--

-+#endif

- 

- /**Function*************************************************************

- 

-@@ -121,6 +122,7 @@ Aig_Man_t * Dar_ManRwsat( Aig_Man_t * pAig, int fBalance, int fVerbose )
-   SeeAlso     []

- 

- ***********************************************************************/

-+#if 0

- Aig_Man_t * Dar_ManCompress( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fVerbose )

- //alias compress2   "b -l; rw -l; rwz -l; b -l; rwz -l; b -l"

- {

-@@ -180,6 +182,7 @@ Aig_Man_t * Dar_ManCompress( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, i
- 

-     return pAig;

- }

-+#endif

- 

- /**Function*************************************************************

- 

-@@ -192,6 +195,7 @@ Aig_Man_t * Dar_ManCompress( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, i
-   SeeAlso     []

- 

- ***********************************************************************/

-+#if 0

- Aig_Man_t * Dar_ManCompress2( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fVerbose )

- //alias compress2   "b -l; rw -l; rf -l; b -l; rw -l; rwz -l; b -l; rfz -l; rwz -l; b -l"

- {

-@@ -285,6 +289,7 @@ Aig_Man_t * Dar_ManCompress2( Aig_Man_t * pAig, int fBalance, int fUpdateLevel,
-     }

-     return pAig;

- }

-+#endif

- 

- /**Function*************************************************************

- 

-@@ -297,6 +302,7 @@ Aig_Man_t * Dar_ManCompress2( Aig_Man_t * pAig, int fBalance, int fUpdateLevel,
-   SeeAlso     []

- 

- ***********************************************************************/

-+#if 0

- Vec_Ptr_t * Dar_ManChoiceSynthesis( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fVerbose )

- //alias resyn    "b; rw; rwz; b; rwz; b"

- //alias resyn2   "b; rw; rf; b; rw; rwz; b; rfz; rwz; b"

-@@ -311,6 +317,7 @@ Vec_Ptr_t * Dar_ManChoiceSynthesis( Aig_Man_t * pAig, int fBalance, int fUpdateL
-     Vec_PtrPush( vAigs, pAig );

-     return vAigs;

- }

-+#endif

- 

- /**Function*************************************************************

- 

-diff --git a/src/extlib-abc/aig/kit/kitAig.c b/src/extlib-abc/aig/kit/kitAig.c
-index de301f2..7e5df0f 100644
---- a/src/extlib-abc/aig/kit/kitAig.c
-+++ b/src/extlib-abc/aig/kit/kitAig.c
-@@ -95,6 +95,7 @@ Aig_Obj_t * Kit_GraphToAig( Aig_Man_t * pMan, Aig_Obj_t ** pFanins, Kit_Graph_t
-   SeeAlso     []

- 

- ***********************************************************************/

-+#if 0

- Aig_Obj_t * Kit_TruthToAig( Aig_Man_t * pMan, Aig_Obj_t ** pFanins, unsigned * pTruth, int nVars, Vec_Int_t * vMemory )

- {

-     Aig_Obj_t * pObj;

-@@ -113,6 +114,7 @@ Aig_Obj_t * Kit_TruthToAig( Aig_Man_t * pMan, Aig_Obj_t ** pFanins, unsigned * p
-     Kit_GraphFree( pGraph );

-     return pObj;

- }

-+#endif

- 

- ////////////////////////////////////////////////////////////////////////

- ///                       END OF FILE                                ///

-diff --git a/src/extlib-abc/aig/kit/kitGraph.c b/src/extlib-abc/aig/kit/kitGraph.c
-index 39ef587..0485c66 100644
---- a/src/extlib-abc/aig/kit/kitGraph.c
-+++ b/src/extlib-abc/aig/kit/kitGraph.c
-@@ -349,6 +349,7 @@ unsigned Kit_GraphToTruth( Kit_Graph_t * pGraph )
-   SeeAlso     []

- 

- ***********************************************************************/

-+#if 0

- Kit_Graph_t * Kit_TruthToGraph( unsigned * pTruth, int nVars, Vec_Int_t * vMemory )

- {

-     Kit_Graph_t * pGraph;

-@@ -365,6 +366,7 @@ Kit_Graph_t * Kit_TruthToGraph( unsigned * pTruth, int nVars, Vec_Int_t * vMemor
-     pGraph = Kit_SopFactor( vMemory, RetValue, nVars, vMemory );

-     return pGraph;

- }

-+#endif

- 

- /**Function*************************************************************

- 

diff --git a/pkgs/applications/video/kodi/plugins.nix b/pkgs/applications/video/kodi/plugins.nix
index 41298269a184..8228c2c6cd92 100644
--- a/pkgs/applications/video/kodi/plugins.nix
+++ b/pkgs/applications/video/kodi/plugins.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchurl, fetchFromGitHub, fetchpatch, lib
-, unzip, cmake, kodi, steam, libcec_platform, tinyxml }:
+, unzip, cmake, kodi, steam, libcec_platform, tinyxml
+, jsoncpp, libhdhomerun }:
 
 let
 
@@ -265,4 +266,37 @@ in
       ln -s $out/lib/addons/pvr.hts/pvr.hts.so* $out/share/kodi/addons/pvr.hts
     '';
   };
+
+  pvr-hdhomerun = (mkKodiPlugin rec {
+    plugin = "pvr-hdhomerun";
+    namespace = "pvr.hdhomerun";
+    version = "2.4.7";
+
+    src = fetchFromGitHub {
+      owner = "kodi-pvr";
+      repo = "pvr.hdhomerun";
+      rev = "60d89d16dd953d38947e8a6da2f8bb84a0f764ef";
+      sha256 = "0dvdv0vk2q12nj0i5h51iaypy3i7jfsxjyxwwpxfy82y8260ragy";
+    };
+
+    meta = with stdenv.lib; {
+      homepage = https://github.com/kodi-pvr/pvr.hdhomerun;
+      description = "Kodi's HDHomeRun PVR client addon";
+      platforms = platforms.all;
+      maintainers = with maintainers; [ titanous ];
+    };
+  }).override {
+    buildInputs = [ cmake jsoncpp libhdhomerun kodi libcec_platform kodi-platform ];
+
+    # disables check ensuring install prefix is that of kodi
+    cmakeFlags = [ "-DOVERRIDE_PATHS=1" ];
+
+    # kodi checks for plugin .so libs existance in the addon folder (share/...)
+    # and the non-wrapped kodi lib/... folder before even trying to dlopen
+    # them. Symlinking .so, as setting LD_LIBRARY_PATH is of no use
+    installPhase = ''
+      make install
+      ln -s $out/lib/addons/pvr.hdhomerun/pvr.hdhomerun.so* $out/share/kodi/addons/pvr.hdhomerun
+    '';
+  };
 }
diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix
index fb3434e74587..f7037ee668c7 100644
--- a/pkgs/applications/video/obs-studio/default.nix
+++ b/pkgs/applications/video/obs-studio/default.nix
@@ -26,13 +26,13 @@ let
   optional = stdenv.lib.optional;
 in stdenv.mkDerivation rec {
   name = "obs-studio-${version}";
-  version = "18.0.2";
+  version = "19.0.2";
 
   src = fetchFromGitHub {
     owner = "jp9000";
     repo = "obs-studio";
-    rev = "2bf9d548";
-    sha256 = "036l29m3dlqadvaazj0nmgi2lcji8zckdvx3gjrx1kp96yd5myqd";
+    rev = "${version}";
+    sha256 = "0sawpk2yr52frdm4pkvahc11i1s1jlm7i07crhkxa8342sdc70ab";
   };
 
   patches = [ ./find-xcb.patch ];
diff --git a/pkgs/applications/virtualization/virt-manager/qt.nix b/pkgs/applications/virtualization/virt-manager/qt.nix
index 25a70ee9bce3..7e05324a046b 100644
--- a/pkgs/applications/virtualization/virt-manager/qt.nix
+++ b/pkgs/applications/virtualization/virt-manager/qt.nix
@@ -5,13 +5,13 @@
 
 stdenv.mkDerivation rec {
   name = "virt-manager-qt-${version}";
-  version = "0.43.70";
+  version = "0.43.70.2";
 
   src = fetchFromGitHub {
     owner  = "F1ash";
     repo   = "qt-virt-manager";
     rev    = "${version}";
-    sha256 = "0d8g0pg15cyi450qgkgi7fh83wkxcqfpphgsh5q10r6jjl87166x";
+    sha256 = "06123bywzgs5y2yskqm8qypj9diym5xip2bdlghfhw30957pcxxg";
   };
 
   cmakeFlags = [
diff --git a/pkgs/build-support/rust/fetch-cargo-deps b/pkgs/build-support/rust/fetch-cargo-deps
index 76661a4f9ecc..3c7e034364f4 100755
--- a/pkgs/build-support/rust/fetch-cargo-deps
+++ b/pkgs/build-support/rust/fetch-cargo-deps
@@ -148,7 +148,7 @@ EOF
 
             cd "$out/git/checkouts/$name/$branch"
             rev="$(git rev-parse HEAD)"
-            revs="$revs $rev"
+            revs="$rev $revs"
         done < <(find . -type d -name .git -print)
 
         echo "List of revs to keep for git db $name: $revs"
@@ -179,7 +179,7 @@ EOF
             done
 
             # Create ad-hoc branches for the revs we need
-            echo "$revs" | tr " " "\n" | while read -d " " rev; do
+            echo "$revs" | while read -d " " rev; do
                 echo "Creating git branch b_$rev $rev"
                 git branch b_$rev $rev
             done
diff --git a/pkgs/data/misc/hackage/default.nix b/pkgs/data/misc/hackage/default.nix
index fd8b50e4c0bd..5b54ea2178c7 100644
--- a/pkgs/data/misc/hackage/default.nix
+++ b/pkgs/data/misc/hackage/default.nix
@@ -6,6 +6,6 @@
 fetchFromGitHub {
   owner = "commercialhaskell";
   repo = "all-cabal-hashes";
-  rev = "53fcf983669a3f0cdfd795fec28ecb40740a64ca";
-  sha256 = "0jfrr6mjb3x1ybgrsinhm0nl3jmdjyf9mghpgsm75lgr83cm12a5";
+  rev = "60443435510c1523ae4596f20595a274531dd485";
+  sha256 = "1k3c0ix5rax92ywrpjxd7cmbzwsgrv03s6dvq6wjm8vljchqg4li";
 }
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix
index 2d615e3b8e8b..ee013809faf8 100644
--- a/pkgs/development/compilers/gcc/4.8/default.nix
+++ b/pkgs/development/compilers/gcc/4.8/default.nix
@@ -226,7 +226,7 @@ stdenv.mkDerivation ({
   libc_dev = stdenv.cc.libc_dev;
 
   postPatch =
-    if (stdenv.isGNU
+    if (stdenv.isHurd
         || (libcCross != null                  # e.g., building `gcc.crossDrv'
             && libcCross ? crossConfig
             && libcCross.crossConfig == "i586-pc-gnu")
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix
index 93f46fdd0f6d..872f78fcf37a 100644
--- a/pkgs/development/compilers/gcc/4.9/default.nix
+++ b/pkgs/development/compilers/gcc/4.9/default.nix
@@ -230,7 +230,7 @@ stdenv.mkDerivation ({
   libc_dev = stdenv.cc.libc_dev;
 
   postPatch =
-    if (stdenv.isGNU
+    if (stdenv.isHurd
         || (libcCross != null                  # e.g., building `gcc.crossDrv'
             && libcCross ? crossConfig
             && libcCross.crossConfig == "i586-pc-gnu")
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix
index 296b899830b3..70cd08383902 100644
--- a/pkgs/development/compilers/gcc/5/default.nix
+++ b/pkgs/development/compilers/gcc/5/default.nix
@@ -247,7 +247,7 @@ stdenv.mkDerivation ({
   '';
 
   postPatch =
-    if (stdenv.isGNU
+    if (stdenv.isHurd
         || (libcCross != null                  # e.g., building `gcc.crossDrv'
             && libcCross ? crossConfig
             && libcCross.crossConfig == "i586-pc-gnu")
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index c23968d21265..1a95f476adaf 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -229,7 +229,7 @@ stdenv.mkDerivation ({
   hardeningDisable = [ "format" ];
 
   postPatch =
-    if (stdenv.isGNU
+    if (stdenv.isHurd
         || (libcCross != null                  # e.g., building `gcc.crossDrv'
             && libcCross ? crossConfig
             && libcCross.crossConfig == "i586-pc-gnu")
diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix
index 9c3b7a4e7df5..cbb373eb3eda 100644
--- a/pkgs/development/compilers/gcc/snapshot/default.nix
+++ b/pkgs/development/compilers/gcc/snapshot/default.nix
@@ -230,7 +230,7 @@ stdenv.mkDerivation ({
   hardeningDisable = [ "format" ];
 
   postPatch =
-    if (stdenv.isGNU
+    if (stdenv.isHurd
         || (libcCross != null                  # e.g., building `gcc.crossDrv'
             && libcCross ? crossConfig
             && libcCross.crossConfig == "i586-pc-gnu")
diff --git a/pkgs/development/compilers/llvm/3.4/fix-llvm-config.patch b/pkgs/development/compilers/llvm/3.4/fix-llvm-config.patch
new file mode 100644
index 000000000000..772c49609275
--- /dev/null
+++ b/pkgs/development/compilers/llvm/3.4/fix-llvm-config.patch
@@ -0,0 +1,13 @@
+diff --git a/utils/llvm-build/llvmbuild/main.py b/utils/llvm-build/llvmbuild/main.py
+index eacefdf60bf..40d25f5cef8 100644
+--- a/utils/llvm-build/llvmbuild/main.py
++++ b/utils/llvm-build/llvmbuild/main.py
+@@ -412,7 +412,7 @@ subdirectories = %s
+             if library_name is None:
+                 library_name_as_cstr = '0'
+             else:
+-                library_name_as_cstr = '"lib%s.a"' % library_name
++                library_name_as_cstr = '"lib%s.so"' % library_name
+             f.write('  { "%s", %s, %d, { %s } },\n' % (
+                 name, library_name_as_cstr, is_installed,
+                 ', '.join('"%s"' % dep
diff --git a/pkgs/development/compilers/llvm/3.4/llvm.nix b/pkgs/development/compilers/llvm/3.4/llvm.nix
index 0a18f7e01cf6..73469fa122a9 100644
--- a/pkgs/development/compilers/llvm/3.4/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.4/llvm.nix
@@ -29,12 +29,16 @@ in stdenv.mkDerivation rec {
   '';
 
   buildInputs =
-    [ perl groff cmake libxml2 libffi ]
-    ++ stdenv.lib.optional (!stdenv.isDarwin) python2 /*
+    [ perl groff cmake libxml2 libffi python2 ] /*
     ++ stdenv.lib.optional stdenv.isLinux valgrind */;
 
   propagatedBuildInputs = [ ncurses zlib ];
 
+  patches = stdenv.lib.optionals (!stdenv.isDarwin) [
+    # llvm-config --libfiles returns (non-existing) static libs
+    ./fix-llvm-config.patch
+  ];
+
   # hacky fix: created binaries need to be run before installation
   preBuild = ''
     mkdir -p $out/
@@ -48,7 +52,7 @@ in stdenv.mkDerivation rec {
     "-DLLVM_REQUIRES_RTTI=1"
     "-DLLVM_BINUTILS_INCDIR=${binutils.dev or binutils}/include"
     "-DCMAKE_CXX_FLAGS=-std=c++11"
-  ] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
+  ] ++ stdenv.lib.optional (!stdenv.isDarwin) "-DBUILD_SHARED_LIBS=ON";
 
   postBuild = ''
     rm -fR $out
diff --git a/pkgs/development/compilers/urweb/default.nix b/pkgs/development/compilers/urweb/default.nix
index 638b10f76d5d..c1e1e2ece7a8 100644
--- a/pkgs/development/compilers/urweb/default.nix
+++ b/pkgs/development/compilers/urweb/default.nix
@@ -4,11 +4,11 @@
 
 stdenv.mkDerivation rec {
   name = "urweb-${version}";
-  version = "20160621";
+  version = "20170105";
 
   src = fetchurl {
     url = "http://www.impredicative.com/ur/${name}.tgz";
-    sha256 = "08km96hli5yp754nsxxjzih2la0m89j5wc2cq12rkas43nqqgr65";
+    sha256 = "2ad3aea2c4851c9b18f752d38c7127af8293fbbbbdb3dd06b73a4603fe399b67";
   };
 
   buildInputs = [ openssl mlton mysql.client postgresql sqlite ];
@@ -38,6 +38,6 @@ stdenv.mkDerivation rec {
     homepage    = "http://www.impredicative.com/ur/";
     license     = stdenv.lib.licenses.bsd3;
     platforms   = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice stdenv.lib.maintainers.sheganinans ];
   };
 }
diff --git a/pkgs/development/libraries/aws-sdk-cpp/default.nix b/pkgs/development/libraries/aws-sdk-cpp/default.nix
index a47e740be95b..c80abd5f3a07 100644
--- a/pkgs/development/libraries/aws-sdk-cpp/default.nix
+++ b/pkgs/development/libraries/aws-sdk-cpp/default.nix
@@ -14,13 +14,13 @@ let
         else throw "Unsupported system!";
 in stdenv.mkDerivation rec {
   name = "aws-sdk-cpp-${version}";
-  version = "1.0.60";
+  version = "1.0.127";
 
   src = fetchFromGitHub {
     owner = "awslabs";
     repo = "aws-sdk-cpp";
     rev = version;
-    sha256 = "0k6jv70l4xhkf2rna6zaxkxgd7xh7cc1ghzska637h5d2v6h8nzk";
+    sha256 = "1p06rkvi6mm4jylk5j7gji2c52qbls3i0yqg3hgs9iys4nd1p14r";
   };
 
   # FIXME: might be nice to put different APIs in different outputs
diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix
index bdd3b5cea501..848cae09ed47 100644
--- a/pkgs/development/libraries/ffmpeg-full/default.nix
+++ b/pkgs/development/libraries/ffmpeg-full/default.nix
@@ -230,11 +230,11 @@ assert nvenc -> nvidia-video-sdk != null && nonfreeLicensing;
 
 stdenv.mkDerivation rec {
   name = "ffmpeg-full-${version}";
-  version = "3.3";
+  version = "3.3.1";
 
   src = fetchurl {
     url = "https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz";
-    sha256 = "17anx7rnbi63if1ndr61836lf76dpn47n0y424hc48bj05y7z7jr";
+    sha256 = "0bwgm6z6k3khb91qh9xv15inykkfchpkm0lcdckkxhkacpyaf0mp";
   };
 
   patchPhase = ''patchShebangs .
diff --git a/pkgs/development/libraries/ffmpeg/3.3.nix b/pkgs/development/libraries/ffmpeg/3.3.nix
index 03bb9d44dda9..0227d7489ba9 100644
--- a/pkgs/development/libraries/ffmpeg/3.3.nix
+++ b/pkgs/development/libraries/ffmpeg/3.3.nix
@@ -6,7 +6,7 @@
 
 callPackage ./generic.nix (args // rec {
   version = "${branch}";
-  branch = "3.3";
-  sha256 = "1p3brx0qa3i3569zlmcmpbxf17q73nrmbx2vp39s8h77r53qdq11";
+  branch = "3.3.1";
+  sha256 = "0bwgm6z6k3khb91qh9xv15inykkfchpkm0lcdckkxhkacpyaf0mp";
   darwinFrameworks = [ Cocoa CoreMedia ];
 })
diff --git a/pkgs/development/libraries/libhdhomerun/default.nix b/pkgs/development/libraries/libhdhomerun/default.nix
new file mode 100644
index 000000000000..08563ed53dd5
--- /dev/null
+++ b/pkgs/development/libraries/libhdhomerun/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchgit }:
+
+stdenv.mkDerivation {
+  name = "libhdhomerun-1efbcb";
+
+  src = fetchgit {
+    url = "git://github.com/Silicondust/libhdhomerun.git";
+    rev = "1efbcb2b87b17a82f2b3d873d1c9cc1c6a3a9b77";
+    sha256 = "11iyrfs98xb50n9iqnwfphmmnn5w3mq2l9cjjpf8qp29cvs33cgy";
+  };
+
+  patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace Makefile --replace "gcc" "cc"
+    substituteInPlace Makefile --replace "-arch i386" ""
+  '';
+
+  installPhase = let
+    libSuff = if stdenv.isDarwin then "dylib" else "so";
+  in ''
+    mkdir -p $out/{bin,lib,include/hdhomerun}
+    install -Dm444 libhdhomerun.${libSuff} $out/lib
+    install -Dm555 hdhomerun_config $out/bin
+    cp *.h $out/include/hdhomerun
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Implements the libhdhomerun protocol for use with Silicondust HDHomeRun TV tuners";
+    homepage = "https://github.com/Silicondust/libhdhomerun";
+    repositories.git = "https://github.com/Silicondust/libhdhomerun.git";
+    license = stdenv.lib.licenses.lgpl2;
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = [ maintainers.titanous ];
+  };
+}
diff --git a/pkgs/development/libraries/libopus/default.nix b/pkgs/development/libraries/libopus/default.nix
index 559caf8928b8..7bcfcef5788d 100644
--- a/pkgs/development/libraries/libopus/default.nix
+++ b/pkgs/development/libraries/libopus/default.nix
@@ -2,23 +2,16 @@
 , fixedPoint ? false, withCustomModes ? true }:
 
 let
-  version = "1.1.3";
+  version = "1.1.4";
 in
 stdenv.mkDerivation rec {
   name = "libopus-${version}";
 
   src = fetchurl {
     url = "http://downloads.xiph.org/releases/opus/opus-${version}.tar.gz";
-    sha256 = "0cxnd7pjxbgh6l3cbzsw29phpr5cq28fikfhjlp1hc3y5s0gxdjq";
+    sha256 = "14l6kpapmcnvl7p9hrmbqcnzj13zfzyppyc9a5kd4788h2rvc8li";
   };
 
-  patches = [
-    (fetchpatch { # CVE-2017-0381
-      url = "https://github.com/xiph/opus/commit/79e8f527b0344b0897a65be35e77f7885bd99409.patch";
-      sha256 = "0clm4ixqkaj0a6i5rhaqfv3nnxyk33b2b8xlm7vyfd0y8kbh996q";
-    })
-  ];
-
   outputs = [ "out" "dev" ];
 
   configureFlags = stdenv.lib.optional fixedPoint "--enable-fixed-point"
diff --git a/pkgs/development/python-modules/flake8/default.nix b/pkgs/development/python-modules/flake8/default.nix
new file mode 100644
index 000000000000..aec715328f9b
--- /dev/null
+++ b/pkgs/development/python-modules/flake8/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, buildPythonPackage, fetchPypi, pythonOlder
+, mock, pytest, pytestrunner
+, configparser, enum34, mccabe, pycodestyle, pyflakes
+}:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "flake8";
+  version = "3.3.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "04izn1q1lgbr408l9b3vkxqmpi6mq47bxwc0iwypb02mrxns41xr";
+  };
+
+  buildInputs = [ pytest mock pytestrunner ];
+  propagatedBuildInputs = [ pyflakes pycodestyle mccabe ]
+    ++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ]
+    ++ stdenv.lib.optionals (pythonOlder "3.2") [ configparser ];
+
+  meta = with stdenv.lib; {
+    description = "Code checking using pep8 and pyflakes";
+    homepage = http://pypi.python.org/pypi/flake8;
+    license = licenses.mit;
+    maintainers = with maintainers; [ garbas ];
+  };
+}
diff --git a/pkgs/development/python-modules/mccabe/default.nix b/pkgs/development/python-modules/mccabe/default.nix
new file mode 100644
index 000000000000..472bba26eb65
--- /dev/null
+++ b/pkgs/development/python-modules/mccabe/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, buildPythonPackage, fetchPypi, pytest, pytestrunner }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "mccabe";
+  version = "0.6.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx";
+  };
+
+  buildInputs = [ pytest pytestrunner ];
+
+  meta = with stdenv.lib; {
+    description = "McCabe checker, plugin for flake8";
+    homepage = "https://github.com/flintwork/mccabe";
+    license = licenses.mit;
+    maintainers = with maintainers; [ garbas ];
+  };
+}
diff --git a/pkgs/development/python-modules/pelican/default.nix b/pkgs/development/python-modules/pelican/default.nix
new file mode 100644
index 000000000000..72901881b039
--- /dev/null
+++ b/pkgs/development/python-modules/pelican/default.nix
@@ -0,0 +1,53 @@
+{ stdenv, buildPythonPackage, fetchFromGitHub, isPy26
+, glibcLocales, pandoc, git
+, mock, nose, markdown, lxml, typogrify
+, jinja2, pygments, docutils, pytz, unidecode, six, dateutil, feedgenerator
+, blinker, pillow, beautifulsoup4, markupsafe }:
+
+buildPythonPackage rec {
+  name = "pelican-${version}";
+  version = "3.7.1";
+  disabled = isPy26;
+
+  src = fetchFromGitHub {
+    owner = "getpelican";
+    repo = "pelican";
+    rev = version;
+    sha256 = "0nkxrb77k2bra7bqckg7f5k73wk98hcbz7rimxl8sw05b2bvd62g";
+  };
+
+  doCheck = true;
+
+  checkPhase = ''
+    python -Wd -m unittest discover
+  '';
+
+  buildInputs = [
+    glibcLocales
+    pandoc
+    git
+    mock
+    nose
+    markdown
+    typogrify
+  ];
+
+  propagatedBuildInputs = [
+    jinja2 pygments docutils pytz unidecode six dateutil feedgenerator
+    blinker pillow beautifulsoup4 markupsafe lxml
+  ];
+
+  postPatch= ''
+    substituteInPlace pelican/tests/test_pelican.py \
+      --replace "'git'" "'${git}/bin/git'"
+  '';
+
+  LC_ALL="en_US.UTF-8";
+
+  meta = with stdenv.lib; {
+    description = "A tool to generate a static blog from reStructuredText or Markdown input files";
+    homepage = "http://getpelican.com/";
+    license = licenses.agpl3;
+    maintainers = with maintainers; [ offline prikhi garbas ];
+  };
+}
diff --git a/pkgs/development/python-modules/pyflakes/default.nix b/pkgs/development/python-modules/pyflakes/default.nix
new file mode 100644
index 000000000000..fbb0de6f0ced
--- /dev/null
+++ b/pkgs/development/python-modules/pyflakes/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, buildPythonPackage, fetchPypi, isPyPy, unittest2 }:
+
+buildPythonPackage rec {
+  pname = "pyflakes";
+  version = "1.5.0";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da";
+  };
+
+  buildInputs = [ unittest2 ];
+
+  doCheck = !isPyPy;
+
+  meta = with stdenv.lib; {
+    homepage = https://launchpad.net/pyflakes;
+    description = "A simple program which checks Python source files for errors";
+    license = licenses.mit;
+    maintainers = with maintainers; [ garbas ];
+  };
+}
diff --git a/pkgs/development/tools/ammonite/default.nix b/pkgs/development/tools/ammonite/default.nix
index 58788a9290bd..e0deecac7084 100644
--- a/pkgs/development/tools/ammonite/default.nix
+++ b/pkgs/development/tools/ammonite/default.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   name = "ammonite-${version}";
-  version = "0.9.0";
+  version = "0.9.1";
   scalaVersion = "2.12";
 
   src = fetchurl {
     url = "https://github.com/lihaoyi/Ammonite/releases/download/${version}/${scalaVersion}-${version}";
-    sha256 = "12kmsj1phbbma9mfl0saa0hhjm702hccbb6mqpawmqwhkwz48iak";
+    sha256 = "0mc59hfic3211v4ai5zhis56hck9cpalf29pz0kl75wd7g9ymidv";
   };
 
   propagatedBuildInputs = [ jre ] ;
diff --git a/pkgs/development/tools/build-managers/pants/default.nix b/pkgs/development/tools/build-managers/pants/default.nix
new file mode 100644
index 000000000000..624e273cc905
--- /dev/null
+++ b/pkgs/development/tools/build-managers/pants/default.nix
@@ -0,0 +1,95 @@
+{ stdenv, pythonPackages }:
+
+with stdenv.lib;
+with pythonPackages;
+
+let
+  # Get rid of this when pants 1.3.0 is released and make 0.5 the default
+  pathspec_0_3_4 = buildPythonApplication rec {
+    pname   = "pathspec";
+    version = "0.3.4";
+    name    = "${pname}-${version}";
+
+    src = fetchPypi {
+      inherit pname version;
+      sha256 = "0a37yrr2jhlg8aiynxivh2xqani7l9j725qxzrm7cm7m4rfcl1bn";
+    };
+
+    meta = {
+      description = "Utility library for gitignore-style pattern matching of file paths";
+      homepage = "https://github.com/cpburnz/python-path-specification";
+      license = licenses.mpl20;
+     maintainers = with maintainers; [ copumpkin ];
+    };
+  };
+in {
+  pants =
+    pythonPackages.buildPythonPackage rec {
+    pname   = "pantsbuild.pants";
+    version = "1.2.1";
+    name    = "${pname}-${version}";
+
+    src = fetchPypi {
+      inherit pname version;
+      sha256 = "1bnzhhd2acwk7ckv56xzg2d9vxacl3k5bh13bsjxymnq3spm962w";
+    };
+
+    prePatch = ''
+      sed -E -i "s/'([[:alnum:].-]+)[=><][^']*'/'\\1'/g" setup.py
+    '';
+
+    # Unnecessary, and causes some really weird behavior around .class files, which
+    # this package bundles. See https://github.com/NixOS/nixpkgs/issues/22520.
+    dontStrip = true;
+
+    propagatedBuildInputs = [
+      ansicolors beautifulsoup4 cffi coverage docutils fasteners futures
+      isort lmdb markdown mock packaging pathspec_0_3_4 pep8 pex psutil pyflakes
+      pygments pystache pytestcov pytest pywatchman requests scandir
+      setproctitle setuptools six thrift wheel twitter-common-dirutil
+      twitter-common-confluence twitter-common-collections
+    ];
+
+    meta = {
+      description = "A build system for software projects in a variety of languages";
+      homepage    = "http://www.pantsbuild.org/";
+      license     = licenses.asl20;
+      maintainers = with maintainers; [ copumpkin ];
+      platforms   = platforms.unix;
+    };
+  };
+
+  pants13-pre = buildPythonApplication rec {
+    pname   = "pantsbuild.pants";
+    version = "1.3.0rc2";
+    name    = "${pname}-${version}";
+
+    src = fetchPypi {
+      inherit pname version;
+      sha256 = "1d3i0jwhn94b96b3lwwxd10007hnxw6dw1azmwv3hhwq713gwnpi";
+    };
+
+    prePatch = ''
+      sed -E -i "s/'([[:alnum:].-]+)[=><][[:digit:]=><.,]*'/'\\1'/g" setup.py
+    '';
+
+    # Unnecessary, and causes some really weird behavior around .class files, which
+    # this package bundles. See https://github.com/NixOS/nixpkgs/issues/22520.
+    dontStrip = true;
+
+    propagatedBuildInputs = [
+      twitter-common-collections setproctitle setuptools six ansicolors
+      packaging pathspec scandir twitter-common-dirutil psutil requests
+      pystache pex docutils markdown pygments twitter-common-confluence
+      fasteners coverage pywatchman futures cffi
+    ];
+
+    meta = {
+      description = "A build system for software projects in a variety of languages";
+      homepage    = "http://www.pantsbuild.org/";
+      license     = licenses.asl20;
+      maintainers = with maintainers; [ copumpkin ];
+      platforms   = platforms.unix;
+    };
+  };
+}
diff --git a/pkgs/development/tools/continuous-integration/jenkins/default.nix b/pkgs/development/tools/continuous-integration/jenkins/default.nix
index a520db2c3645..2c1a81350124 100644
--- a/pkgs/development/tools/continuous-integration/jenkins/default.nix
+++ b/pkgs/development/tools/continuous-integration/jenkins/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "jenkins-${version}";
-  version = "2.61";
+  version = "2.62";
 
   src = fetchurl {
     url = "http://mirrors.jenkins-ci.org/war/${version}/jenkins.war";
-    sha256 = "1h5im8158h403n5sj1xyhmq40pdq2pmbh7gqv3sv74mc3rjaffj5";
+    sha256 = "1dqmvbl5sa82zsc03ns5i7ppjmdlg3pyk676xjxyr0p5ccbqlxxh";
   };
 
   buildCommand = ''
diff --git a/pkgs/development/tools/coursier/default.nix b/pkgs/development/tools/coursier/default.nix
index 355dad4c03e2..2764c81d6d86 100644
--- a/pkgs/development/tools/coursier/default.nix
+++ b/pkgs/development/tools/coursier/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "coursier-${version}";
-  version = "1.0.0-RC2";
+  version = "1.0.0-RC3";
 
   src = fetchurl {
     url = "https://github.com/coursier/coursier/raw/v${version}/coursier";
-    sha256 = "0w97s1dzfl3gyqa293k8n4hpsrqc10va1lc7jhb05208rsz1hf2m";
+    sha256 = "0iiv79ig8p9pm7fklxskxn6bx1m4xqgdfdk6bvqq81gl8b101z5w";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix
index f39d15bc7be6..725fb86914be 100644
--- a/pkgs/development/tools/misc/gdb/default.nix
+++ b/pkgs/development/tools/misc/gdb/default.nix
@@ -1,33 +1,31 @@
 { fetchurl, stdenv, ncurses, readline, gmp, mpfr, expat, texinfo, zlib
 , dejagnu, perl, pkgconfig
-, python ? null
+
+, buildPlatform, hostPlatform, targetPlatform
+
+, pythonSupport ? hostPlatform == buildPlatform && !hostPlatform.isCygwin, python ? null
 , guile ? null
-, target ? null
+
 # Support all known targets in one gdb binary.
 , multitarget ? false
+
 # Additional dependencies for GNU/Hurd.
 , mig ? null, hurd ? null
-
 }:
 
 let
-
-  basename = "gdb-7.12.1";
-
-  # Whether (cross-)building for GNU/Hurd.  This is an approximation since
-  # having `stdenv ? cross' doesn't tell us if we're building `crossDrv' and
-  # `nativeDrv'.
-  isGNU =
-      stdenv.system == "i686-gnu"
-      || (stdenv ? cross && stdenv.cross.config == "i586-pc-gnu");
-
+  basename = "gdb-${version}";
+  version = "7.12.1";
 in
 
-assert isGNU -> mig != null && hurd != null;
+assert targetPlatform.isHurd -> mig != null && hurd != null;
+assert pythonSupport -> python != null;
 
 stdenv.mkDerivation rec {
-  name = basename + stdenv.lib.optionalString (target != null)
-      ("-" + target.config);
+  name =
+    stdenv.lib.optionalString (targetPlatform != hostPlatform)
+                              (targetPlatform.config + "-")
+    + basename;
 
   src = fetchurl {
     url = "mirror://gnu/gdb/${basename}.tar.xz";
@@ -35,10 +33,12 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkgconfig texinfo perl ]
-    ++ stdenv.lib.optional isGNU mig;
+    # TODO(@Ericson2314) not sure if should be host or target
+    ++ stdenv.lib.optional targetPlatform.isHurd mig;
 
-  buildInputs = [ ncurses readline gmp mpfr expat zlib python guile ]
-    ++ stdenv.lib.optional isGNU hurd
+  buildInputs = [ ncurses readline gmp mpfr expat zlib guile ]
+    ++ stdenv.lib.optional pythonSupport python
+    ++ stdenv.lib.optional targetPlatform.isHurd hurd
     ++ stdenv.lib.optional doCheck dejagnu;
 
   enableParallelBuilding = true;
@@ -46,24 +46,16 @@ stdenv.mkDerivation rec {
   # darwin build fails with format hardening since v7.12
   hardeningDisable = stdenv.lib.optionals stdenv.isDarwin [ "format" ];
 
-  configureFlags = with stdenv.lib;
-    [ "--with-gmp=${gmp.dev}" "--with-mpfr=${mpfr.dev}" "--with-system-readline"
-      "--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat.dev}"
+  configureFlags = with stdenv.lib; [
+    "--with-gmp=${gmp.dev}" "--with-mpfr=${mpfr.dev}" "--with-system-readline"
+    "--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat.dev}"
+  ] ++ stdenv.lib.optional hostPlatform.isLinux
+      # TODO(@Ericson2314): make this conditional on whether host platform is NixOS
       "--with-separate-debug-dir=/run/current-system/sw/lib/debug"
-    ]
-    ++ optional (target != null) "--target=${target.config}"
-    ++ optional multitarget "--enable-targets=all"
-    ++ optional (elem stdenv.system platforms.cygwin) "--without-python";
-
-  crossAttrs = {
-    # Do not add --with-python here to avoid cross building it.
-    configureFlags = with stdenv.lib;
-      [ "--with-gmp=${gmp.crossDrv}" "--with-mpfr=${mpfr.crossDrv}" "--with-system-readline"
-        "--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat.crossDrv}" "--without-python"
-      ]
-      ++ optional (target != null) "--target=${target.config}"
-      ++ optional multitarget "--enable-targets=all";
-  };
+    ++ stdenv.lib.optional (!pythonSupport) "--without-python"
+    # TODO(@Ericson2314): This should be done in stdenv, not per-package
+    ++ stdenv.lib.optional (targetPlatform != hostPlatform) "--target=${targetPlatform.config}"
+    ++ stdenv.lib.optional multitarget "--enable-targets=all";
 
   postInstall =
     '' # Remove Info files already provided by Binutils and other packages.
diff --git a/pkgs/development/tools/wllvm/default.nix b/pkgs/development/tools/wllvm/default.nix
new file mode 100644
index 000000000000..19bdb1cd9ef7
--- /dev/null
+++ b/pkgs/development/tools/wllvm/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+  version = "1.1.3";
+  pname = "wllvm";
+  name = "${pname}-${version}";
+
+  src = python3Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "1scv9bwr888x2km8njg0000xkj8pz73c0gjbphhqaj8vy87y25cb";
+  };
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/travitch/whole-program-llvm;
+    description = "A wrapper script to build whole-program LLVM bitcode files";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mic92 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/games/eternity-engine/default.nix b/pkgs/games/eternity-engine/default.nix
index 7091b900b7e6..453afe9e985b 100644
--- a/pkgs/games/eternity-engine/default.nix
+++ b/pkgs/games/eternity-engine/default.nix
@@ -1,19 +1,25 @@
-{ stdenv, cmake, mesa, SDL, SDL_mixer, SDL_net, fetchurl }:
+{ stdenv, cmake, mesa_noglu, SDL, SDL_mixer, SDL_net, fetchFromGitHub, makeWrapper }:
 
 stdenv.mkDerivation rec {
-  name = "eternity-engine-3.40.46";
-  src = fetchurl {
-    url = https://github.com/team-eternity/eternity/archive/3.40.46.tar.gz;
-    sha256 = "0jq8q0agw7lgab9q2h8wcaakvg913l9j3a6ss0hn9661plkw2yb4";
+  name = "eternity-engine-${version}";
+  version = "3.42.02";
+  src = fetchFromGitHub {
+    owner = "team-eternity";
+    repo = "eternity";
+    rev = "${version}";
+    sha256 = "00kpq4k23hjmzjaymw3sdda7mqk8fjq6dzf7fmdal9fm7lfmj41k";
   };
 
-  buildInputs = [ stdenv cmake mesa SDL SDL_mixer SDL_net ];
+  nativeBuildInputs = [ cmake makeWrapper ];
+  buildInputs = [ mesa_noglu SDL SDL_mixer SDL_net ];
 
   enableParallelBuilding = true;
 
   installPhase = ''
-  mkdir -p $out/bin
-  cp source/eternity $out/bin
+    install -Dm755 source/eternity $out/lib/eternity/eternity
+    cp -r $src/base $out/lib/eternity/base
+    mkdir $out/bin
+    makeWrapper $out/lib/eternity/eternity $out/bin/eternity
   '';
 
   meta = {
diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix
index 608b1a011200..a6f1c305c4e7 100644
--- a/pkgs/games/freeciv/default.nix
+++ b/pkgs/games/freeciv/default.nix
@@ -12,7 +12,7 @@ let
   gtkName = if gtkClient then "-gtk" else "";
 
   name = "freeciv";
-  version = "2.5.6";
+  version = "2.5.7";
 in
 stdenv.mkDerivation {
   name = "${name}${sdlName}${gtkName}-${version}";
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "mirror://sourceforge/freeciv/${name}-${version}.tar.bz2";
-    sha256 = "16wrnsx5rmbz6rjs03bhy0vn20i6n6g73lx7fjpai98ixhzc5bfg";
+    sha256 = "1lmydnnqraa947l7gdz6xgm0bgks1ywsivp9h4v8jr3avcv6gqzz";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/games/gzdoom/default.nix b/pkgs/games/gzdoom/default.nix
index b485c8063527..6e1a98bf258a 100644
--- a/pkgs/games/gzdoom/default.nix
+++ b/pkgs/games/gzdoom/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   name = "gzdoom-${version}";
-  version = "2.3.2";
+  version = "3.0.1";
 
   src = fetchFromGitHub {
     owner = "coelckers";
     repo = "gzdoom";
     rev = "g${version}";
-    sha256 = "1ys7wl4ygvm2lm49qjpql6c5i8gydmbg4f436bcpkywf5srr6xrd";
+    sha256 = "0s0hl7pa2gr3cm884q7np5naybhv4hqhbfd3s45a8hdf72n6c9cm";
   };
 
   nativeBuildInputs = [ cmake makeWrapper ];
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
     sed -i \
       -e "s@/usr/share/sounds/sf2/@${soundfont-fluid}/share/soundfonts/@g" \
       -e "s@FluidR3_GM.sf2@FluidR3_GM2-2.sf2@g" \
-      src/sound/music_fluidsynth_mididevice.cpp
+      src/sound/mididevices/music_fluidsynth_mididevice.cpp
   '';
 
   installPhase = ''
@@ -42,8 +42,7 @@ stdenv.mkDerivation rec {
   meta = with stdenv.lib; {
     homepage = "https://github.com/coelckers/gzdoom";
     description = "A Doom source port based on ZDoom. It features an OpenGL renderer and lots of new features";
-    # Doom source license, MAME license
-    license = licenses.unfreeRedistributable;
+    license = licenses.gpl3;
     platforms = platforms.linux;
     maintainers = with maintainers; [ lassulus ];
   };
diff --git a/pkgs/games/robotfindskitten/default.nix b/pkgs/games/robotfindskitten/default.nix
new file mode 100644
index 000000000000..14af1e3c7886
--- /dev/null
+++ b/pkgs/games/robotfindskitten/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, pkgconfig, ncurses }:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+
+  name = "robotfindskitten-${version}";
+  version = "2.7182818.701";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/rfk/robotfindskitten-POSIX/mayan_apocalypse_edition/${name}.tar.gz";
+    sha256 = "06fp6b4li50mzw83j3pkzqspm6dpgxgxw03b60xkxlkgg5qa6jbp";
+  };
+
+  buildInputs = 
+  [ pkgconfig ncurses ];
+
+  meta = {
+    description = "Yet another zen simulation; A simple find-the-kitten game";
+    homepage = http://robotfindskitten.org/;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/games/vms-empire/default.nix b/pkgs/games/vms-empire/default.nix
new file mode 100644
index 000000000000..91f77277d9ec
--- /dev/null
+++ b/pkgs/games/vms-empire/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchurl, ncurses, xmlto }:
+
+with stdenv.lib;
+stdenv.mkDerivation rec{
+
+  name = "vms-empire-${version}";
+  version = "1.14";
+
+  src = fetchurl{
+    url = "http://www.catb.org/~esr/vms-empire/${name}.tar.gz";
+    sha256 = "0cymzhivvaahgqz0p11w25a710ls4w0jhyqj789jas5s07nvd890";
+  };
+
+  buildInputs =
+  [ ncurses xmlto ];
+
+  patchPhase = ''
+    sed -i -e 's|^install: empire\.6 uninstall|install: empire.6|' -e 's|usr/||g' Makefile
+  '';
+
+  hardeningDisable = [ "format" ];
+
+  makeFlags = [ "DESTDIR=$(out)" ];
+
+  meta = {
+    description = "The ancestor of all expand/explore/exploit/exterminate games";
+    longDescription = ''
+      Empire is a simulation of a full-scale war between two emperors, the
+      computer and you. Naturally, there is only room for one, so the object of
+      the game is to destroy the other. The computer plays by the same rules
+      that you do. This game was ancestral to all later
+      expand/explore/exploit/exterminate games, including Civilization and
+      Master of Orion.
+    '';
+    homepage = http://catb.org/~esr/vms-empire/;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
+
+
diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix
index 19026274d56b..80070dec2d91 100644
--- a/pkgs/misc/emulators/wine/base.nix
+++ b/pkgs/misc/emulators/wine/base.nix
@@ -35,7 +35,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
   ++ lib.optional odbcSupport            pkgs.unixODBC
   ++ lib.optional netapiSupport          pkgs.samba3_light
   ++ lib.optional cursesSupport          pkgs.ncurses
-  ++ lib.optional vaSupport              pkgs.libva
+  ++ lib.optional vaSupport              pkgs.libva-full
   ++ lib.optional pcapSupport            pkgs.libpcap
   ++ lib.optional v4lSupport             pkgs.libv4l
   ++ lib.optional saneSupport            pkgs.saneBackends
@@ -46,7 +46,8 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
   ++ lib.optional alsaSupport            pkgs.alsaLib
   ++ lib.optional pulseaudioSupport      pkgs.libpulseaudio
   ++ lib.optional xineramaSupport        pkgs.xorg.libXinerama
-  ++ lib.optionals gstreamerSupport      (with pkgs.gst_all; [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-ffmpeg ])
+  ++ lib.optional udevSupport            pkgs.udev
+  ++ lib.optionals gstreamerSupport      (with pkgs.gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav ])
   ++ lib.optionals gtkSupport    [ pkgs.gtk3 pkgs.glib ]
   ++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.ocl-icd ]
   ++ lib.optionals xmlSupport    [ pkgs.libxml2 pkgs.libxslt ]
@@ -92,7 +93,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
   '' + lib.optionalString supportFlags.gstreamerSupport ''
     wrapProgram "$out/bin/wine" \
       --argv0 "" \
-      --prefix GST_PLUGIN_SYSTEM_PATH ":" "$GST_PLUGIN_SYSTEM_PATH"
+      --prefix GST_PLUGIN_SYSTEM_PATH_1_0 ":" "$GST_PLUGIN_SYSTEM_PATH_1_0"
   '';
   
   enableParallelBuilding = true;
diff --git a/pkgs/misc/emulators/wine/default.nix b/pkgs/misc/emulators/wine/default.nix
index deeff3c73437..91fb0da82d8a 100644
--- a/pkgs/misc/emulators/wine/default.nix
+++ b/pkgs/misc/emulators/wine/default.nix
@@ -38,6 +38,7 @@
   gphoto2Support ? false,
   ldapSupport ? false,
   pulseaudioSupport ? false,
+  udevSupport ? false,
   xineramaSupport ? false,
   xmlSupport ? false }:
 
@@ -50,7 +51,7 @@ let wine-build = build: release:
                   netapiSupport cursesSupport vaSupport pcapSupport v4lSupport saneSupport
                   gsmSupport gphoto2Support ldapSupport fontconfigSupport alsaSupport
                   pulseaudioSupport xineramaSupport gtkSupport openclSupport xmlSupport tlsSupport
-                  openglSupport gstreamerSupport;
+                  openglSupport gstreamerSupport udevSupport;
         };
       });
 
diff --git a/pkgs/misc/emulators/wine/staging.nix b/pkgs/misc/emulators/wine/staging.nix
index 51af13b8a157..4a7fe0ff55b6 100644
--- a/pkgs/misc/emulators/wine/staging.nix
+++ b/pkgs/misc/emulators/wine/staging.nix
@@ -18,7 +18,7 @@ stdenv.lib.overrideDerivation wineUnstable (self: {
     chmod +w patches
     cd patches
     patchShebangs gitapply.sh
-    ./patchinstall.sh DESTDIR="$TMP/$sourceRoot" --all
+    ./patchinstall.sh DESTDIR="$PWD/.." --all
     cd ..
   '';
 })
diff --git a/pkgs/misc/vim-plugins/default.nix b/pkgs/misc/vim-plugins/default.nix
index 324928b4d8b5..09e4d365f171 100644
--- a/pkgs/misc/vim-plugins/default.nix
+++ b/pkgs/misc/vim-plugins/default.nix
@@ -16,7 +16,7 @@ in
 
 # TL;DR
 # Add your plugin to ./vim-plugin-names
-# Regenerate via `nix-build -Q -A vimPlugins.pluginnames2nix; ./result/bin/vim-plugin-names-to-nix`
+# Regenerate via `nix-shell -p vimPlugins.pluginnames2nix --command "vim-plugin-names-to-nix"`
 # Copy the generated expression(s) into this file.
 # If plugin is complicated then make changes to ./vim2nix/additional-nix-code
 
@@ -114,6 +114,7 @@ rec {
   # --- generated packages bellow this line ---
 
 
+
   CSApprox = buildVimPluginFrom2Nix { # created by nix#NixDerivation
     name = "CSApprox-2013-07-26";
     src = fetchgit {
@@ -357,6 +358,17 @@ rec {
 
   };
 
+  forms = buildVimPluginFrom2Nix { # created by nix#NixDerivation
+    name = "forms-2012-11-28";
+    src = fetchgit {
+      url = "git://github.com/megaannum/forms";
+      rev = "b601e03fe0a3b8a43766231f4a6217e4492b4f75";
+      sha256 = "19kp1i5c6jmnpbsap9giayqbzlv7vh02mp4mjvicqj9n0nfyay74";
+    };
+    dependencies = ["self"];
+
+  };
+
   fugitive = buildVimPluginFrom2Nix { # created by nix#NixDerivation
     name = "fugitive-2017-05-19";
     src = fetchgit {
@@ -482,11 +494,11 @@ rec {
   };
 
   neomake = buildVimPluginFrom2Nix { # created by nix#NixDerivation
-    name = "neomake-2017-05-21";
+    name = "neomake-2017-05-22";
     src = fetchgit {
       url = "https://github.com/benekastah/neomake";
-      rev = "ec599098f76032a9a4d7d504afa2fefb722857ef";
-      sha256 = "184y5l13gb3ax2bpsnwyyy4m3np4w6v886cvx7lpzlihk2w97dp6";
+      rev = "4979ef24fdc061a550b013daab5ef779517e29ce";
+      sha256 = "0q81ig92kd3xrlh8l2gnx26s84cnb221jcqjl0fyvi09d99mfil1";
     };
     dependencies = [];
 
@@ -603,11 +615,11 @@ rec {
   };
 
   vim = buildVimPluginFrom2Nix { # created by nix#NixDerivation
-    name = "vim-2017-05-17";
+    name = "vim-2017-05-21";
     src = fetchgit {
       url = "https://github.com/dracula/vim";
-      rev = "b7e11c087fe2a9e3023cdccf17985704e27b125d";
-      sha256 = "0480bs0df6jkfsi20mksbf5pix9js4mb0dfwwzbfj1c9xk7cn0z2";
+      rev = "7a4798a6d049905a71d9cb82aaf0db5d2e116f7d";
+      sha256 = "1h5r85pv7mcyhczc6ijbfv46xjzxrw3lbbfsxlycx0hx8b8jfpql";
     };
     dependencies = [];
 
@@ -713,11 +725,11 @@ rec {
   };
 
   vim-go = buildVimPluginFrom2Nix { # created by nix#NixDerivation
-    name = "vim-go-2017-05-08";
+    name = "vim-go-2017-05-22";
     src = fetchgit {
       url = "https://github.com/fatih/vim-go";
-      rev = "7fb96896f3a1a41dfb5185336a057341eb7ad151";
-      sha256 = "0g9l68p1xsai2mlgy3lyvilz2s9lsjlgj0jjdinq4fky051fq8d9";
+      rev = "05efdfe80f433538932af82c1f168b1af4d30b7f";
+      sha256 = "19nyclwigrcxs4hzjkyj971ifm8r0q9991vcs0a4n860c66l9xhs";
     };
     dependencies = [];
 
@@ -746,11 +758,11 @@ rec {
   };
 
   psc-ide-vim = buildVimPluginFrom2Nix { # created by nix#NixDerivation
-    name = "psc-ide-vim-2017-04-17";
+    name = "psc-ide-vim-2017-05-22";
     src = fetchgit {
       url = "https://github.com/frigoeu/psc-ide-vim";
-      rev = "deec92002a5a187ff8be3ae6060e202aa859d4cb";
-      sha256 = "0yjlp3rnlai2633slrhxr2g9sqqp1j9pqcm7h03gfgw6rh4kai9k";
+      rev = "b97523df5e31d1a86cb52fb0188b87a72aa7633d";
+      sha256 = "09ibx86wq24vyk8cpzlfqbwcygnr3y4qvscfjyrj8pzg4mlfpw0j";
     };
     dependencies = [];
 
@@ -944,11 +956,11 @@ rec {
   };
 
   fzf-vim = buildVimPluginFrom2Nix { # created by nix#NixDerivation
-    name = "fzf-vim-2017-05-20";
+    name = "fzf-vim-2017-05-22";
     src = fetchgit {
       url = "https://github.com/junegunn/fzf.vim";
-      rev = "536b6ace35a16174fa35ea6ae5b27dc5c02469f6";
-      sha256 = "15wcjfla5r18d93vf5mhl6dwglj4a49c0jc0ijh2v8j3ilbjm29y";
+      rev = "990834ab6cb86961e61c55a8e012eb542ceff10e";
+      sha256 = "17f4vlahap3bycgl3b78drq58rdlwi8kkl3z7l9jhsxvzvdvccl1";
     };
     dependencies = [];
 
@@ -1021,11 +1033,11 @@ rec {
   };
 
   vimtex = buildVimPluginFrom2Nix { # created by nix#NixDerivation
-    name = "vimtex-2017-05-21";
+    name = "vimtex-2017-05-22";
     src = fetchgit {
       url = "https://github.com/lervag/vimtex";
-      rev = "286036f92ef972f6e5adb1b9865a60d0bed8cf9c";
-      sha256 = "0a2bnnilvkicr67an4rrd1zxhgf497z12r1xfqd65c80j2g63ls2";
+      rev = "11bcdc95ba4f201f93f9857362cfea0d99e0a0db";
+      sha256 = "0qszla7x1zxm1v6l3iz14cvw5hcmb8yja6d01dr9fhlpx968xgwr";
     };
     dependencies = [];
 
@@ -1112,6 +1124,17 @@ rec {
 
   };
 
+  ack-vim = buildVimPluginFrom2Nix { # created by nix#NixDerivation
+    name = "ack-vim-2017-05-07";
+    src = fetchgit {
+      url = "https://github.com/mileszs/ack.vim";
+      rev = "a16a9b63eb85cc0960a7f25c54647ac1f99f3360";
+      sha256 = "09bwawm2csliancl281y6wgalrrmaqq7d0baz4dq1cw18x657mk7";
+    };
+    dependencies = [];
+
+  };
+
   lushtags = buildVimPluginFrom2Nix { # created by nix#NixDerivation
     name = "lushtags-2017-04-19";
     src = fetchgit {
@@ -1355,11 +1378,11 @@ rec {
   };
 
   unite-vim = buildVimPluginFrom2Nix { # created by nix#NixDerivation
-    name = "unite-vim-2017-05-17";
+    name = "unite-vim-2017-05-22";
     src = fetchgit {
       url = "https://github.com/shougo/unite.vim";
-      rev = "e9650b32f3803aaa6ea2635137991c86782d63ac";
-      sha256 = "0k5xpp9kfyqbmcckb4l47qglmvcjsmmlhpcq2v543831z1ibcx6l";
+      rev = "39dbd776f304d3a5f20483298be80991ed8fbd09";
+      sha256 = "0snrg3nbr25qkk3nskygzy68qwgf9si1llryxpi6h28ixkn8n3n0";
     };
     dependencies = [];
 
@@ -1775,7 +1798,7 @@ rec {
       sha256 = "0ybd9sg4x8pczvl0hz5azzs2sn4nyc7la9890xh373dv3lyb6gk7";
     };
     dependencies = [];
-    buildInputs = [ python3 ]; 
+    buildInputs = [ python3 ];
     buildPhase = ''
       pushd ./rplugin/python3/deoplete/ujson
       python3 setup.py build --build-base=$PWD/build --build-lib=$PWD/build
@@ -1840,11 +1863,11 @@ rec {
   };
 
   pathogen = buildVimPluginFrom2Nix { # created by nix#NixDerivation
-    name = "pathogen-2017-05-03";
+    name = "pathogen-2017-05-22";
     src = fetchgit {
       url = "git://github.com/tpope/vim-pathogen";
-      rev = "0f4710063ecc98d77dc03698c4a917a3215bdf09";
-      sha256 = "1fk9fgprz9nhgz9hk5zjzw5m0sz40fgh74jg19wyp3yrwryhy5dp";
+      rev = "379b8f70822c4a89370575c3967f33cb116087ea";
+      sha256 = "0j7cixmqllp3wwhsmwfcjj6rslx90lwrssi64mk3whm303x1qxvq";
     };
     dependencies = [];
 
@@ -1872,6 +1895,17 @@ rec {
 
   };
 
+  self = buildVimPluginFrom2Nix { # created by nix#NixDerivation
+    name = "self-2014-05-28";
+    src = fetchgit {
+      url = "git://github.com/megaannum/self";
+      rev = "2ed666b547eddee6ae1fcc63babca4ba0b66a59f";
+      sha256 = "1gcwn6i5i3msg7hrlzsnv1bs6pm4jz9cff8ppaz2xdj8xv9qy6fn";
+    };
+    dependencies = [];
+
+  };
+
   sensible = buildVimPluginFrom2Nix { # created by nix#NixDerivation
     name = "sensible-2017-05-09";
     src = fetchgit {
@@ -2267,6 +2301,7 @@ rec {
 
   };
 
+
   vim-multiple-cursors = buildVimPluginFrom2Nix { # created by nix#NixDerivation
     name = "vim-multiple-cursors-2017-04-29";
     src = fetchgit {
@@ -2301,11 +2336,11 @@ rec {
   };
 
   vim-snippets = buildVimPluginFrom2Nix { # created by nix#NixDerivation
-    name = "vim-snippets-2017-05-19";
+    name = "vim-snippets-2017-05-22";
     src = fetchgit {
       url = "git://github.com/honza/vim-snippets";
-      rev = "3cb0d29cf55d3d93e0a330819770b4f60e66e39f";
-      sha256 = "112747rfikyixv9m3nfdnwm31bv9v0x4s7fp0j8zkvg9sbcf15nf";
+      rev = "8a0f865950d70d6de1e39cec20ad4d52b611bd8f";
+      sha256 = "1czs9zqjdb86fdb6lldzv4fjyc8yw2adhhbdzzj631hfcvi1a2r3";
     };
     dependencies = [];
 
diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names
index a92533cb60f0..b83660b220b5 100644
--- a/pkgs/misc/vim-plugins/vim-plugin-names
+++ b/pkgs/misc/vim-plugins/vim-plugin-names
@@ -85,6 +85,7 @@
 "github:machakann/vim-highlightedyank"
 "github:mhinz/vim-startify"
 "github:michaeljsmith/vim-indent-object"
+"github:mileszs/ack.vim"
 "github:mkasa/lushtags"
 "github:mpickering/hlint-refactor-vim"
 "github:nathanaelkane/vim-indent-guides"
diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix
index 14c4c6e99739..222c51603fdd 100644
--- a/pkgs/os-specific/darwin/cctools/port.nix
+++ b/pkgs/os-specific/darwin/cctools/port.nix
@@ -5,17 +5,15 @@
 }:
 
 let
-  inherit (stdenv.lib.systems.parse) isDarwin;
-
   prefix = stdenv.lib.optionalString
     (targetPlatform != hostPlatform)
     "${targetPlatform.config}-";
 in
 
-assert isDarwin targetPlatform.parsed;
+assert targetPlatform.isDarwin;
 
 # Non-Darwin alternatives
-assert (!isDarwin hostPlatform.parsed) -> (maloader != null && xctoolchain != null);
+assert (!hostPlatform.isDarwin) -> (maloader != null && xctoolchain != null);
 
 let
   baseParams = rec {
@@ -91,7 +89,7 @@ let
     '';
 
     postInstall =
-      if isDarwin hostPlatform.parsed
+      if hostPlatform.isDarwin
       then ''
         cat >$out/bin/dsymutil << EOF
         #!${stdenv.shell}
diff --git a/pkgs/os-specific/linux/acpid/default.nix b/pkgs/os-specific/linux/acpid/default.nix
index aa8b25560e6a..95efbab5be4f 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.27";
+  name = "acpid-2.0.28";
 
   src = fetchurl {
     url = "mirror://sourceforge/acpid2/${name}.tar.xz";
-    sha256 = "05m6scbdzi2fb8zzi01c11a10pr0qb1gzccz4bbxj4fcacz24342";
+    sha256 = "043igasvp1l6nv5rzh4sksmymay2qn20anl4zm4zvwnkn1a3l34q";
   };
 
   meta = with stdenv.lib; {
diff --git a/pkgs/os-specific/linux/iwd/default.nix b/pkgs/os-specific/linux/iwd/default.nix
new file mode 100644
index 000000000000..028ce53275cc
--- /dev/null
+++ b/pkgs/os-specific/linux/iwd/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchgit, autoreconfHook, readline }:
+
+let
+  ell = fetchgit {
+     url = https://git.kernel.org/pub/scm/libs/ell/ell.git;
+     rev = "58e873d7463f3a7f91e02260585bfa50cbc77668";
+     sha256 = "12k1f1iarm29j8k16mhw83xx7r3bama4lp0fchhnj7iwxrpgs4gh";
+  };
+in stdenv.mkDerivation rec {
+  name = "iwd-unstable-2017-04-21";
+
+  src = fetchgit {
+    url = https://git.kernel.org/pub/scm/network/wireless/iwd.git;
+    rev = "f64dea81b8490e5e09888be645a4325419bb269c";
+    sha256 = "0maqhx5264ykgmwaf90s2806i1kx2028if34ph2axlirxrhdd3lg";
+  };
+
+  configureFlags = [
+    "--with-dbusconfdir=$(out)/etc/"
+  ];
+
+  postUnpack = ''
+    ln -s ${ell} ell
+  '';
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ readline ];
+
+  meta = with stdenv.lib; {
+    homepage = https://git.kernel.org/pub/scm/network/wireless/iwd.git;
+    description = "Wireless daemon for Linux";
+    platforms = platforms.linux;
+    maintainers = [ maintainers.mic92 ];
+  };
+}
diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix
index 2321187c96be..f783828f0319 100644
--- a/pkgs/os-specific/linux/kernel/linux-testing.nix
+++ b/pkgs/os-specific/linux/kernel/linux-testing.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, perl, buildLinux, ... } @ args:
 
 import ./generic.nix (args // rec {
-  version = "4.12-rc1";
-  modDirVersion = "4.12.0-rc1";
+  version = "4.12-rc2";
+  modDirVersion = "4.12.0-rc2";
   extraMeta.branch = "4.12";
 
   src = fetchurl {
     url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
-    sha256 = "13xyiqn7xv8ryqrfsx8b18qm1zj0qkfz92mdh611nqhhdlw7gcpk";
+    sha256 = "18p68ig9irblbxbg68jz766158bxr81824q91mnf372i5z9irj9w";
   };
 
   features.iwlwifi = true;
diff --git a/pkgs/servers/http/nginx/modules.nix b/pkgs/servers/http/nginx/modules.nix
index 02786cd19d10..ea819c7ec835 100644
--- a/pkgs/servers/http/nginx/modules.nix
+++ b/pkgs/servers/http/nginx/modules.nix
@@ -15,8 +15,8 @@
     src = fetchFromGitHub {
       owner = "arut";
       repo = "nginx-rtmp-module";
-      rev = "v1.1.9";
-      sha256 = "19vqw1ba01m2wlncpycw9vj5n8741pv36hd3dy9jjdxwlzdjzyi5";
+      rev = "v1.1.11";
+      sha256 = "09zrnf8lk179mpqnx92zm24xl7m3bq4ca84wc2zwi5hc8kxjbwxc";
     };
   };
 
diff --git a/pkgs/servers/http/nginx/stable.nix b/pkgs/servers/http/nginx/stable.nix
index efbcada62309..bc8b831eec72 100644
--- a/pkgs/servers/http/nginx/stable.nix
+++ b/pkgs/servers/http/nginx/stable.nix
@@ -1,6 +1,6 @@
 { callPackage, ... } @ args:
 
 callPackage ./generic.nix (args // {
-  version = "1.10.3";
-  sha256 = "146xd566l1wkhzxqhmd01vj7c0yhsap1qkiwfg5mki6ach9hy0km";
+  version = "1.12.0";
+  sha256 = "0c2vg6530qplwk8rhldww5r3cwcbw1avka53qg9sh85nzlk2w8ml";
 })
diff --git a/pkgs/servers/uwsgi/default.nix b/pkgs/servers/uwsgi/default.nix
index 6d29c7456974..36d6fc3a62d4 100644
--- a/pkgs/servers/uwsgi/default.nix
+++ b/pkgs/servers/uwsgi/default.nix
@@ -49,11 +49,11 @@ in
 
 stdenv.mkDerivation rec {
   name = "uwsgi-${version}";
-  version = "2.0.14";
+  version = "2.0.15";
 
   src = fetchurl {
     url = "http://projects.unbit.it/downloads/${name}.tar.gz";
-    sha256 = "11r829j4fyk7y068arqmwbc9dj6lc0n3l6bn6pr5z0vdjbpx3cr1";
+    sha256 = "1zvj28wp3c1hacpd4c6ra5ilwvvfq3l8y6gn8i7mnncpddlzjbjp";
   };
 
   nativeBuildInputs = [ python3 pkgconfig ];
diff --git a/pkgs/shells/zsh-autosuggestions/default.nix b/pkgs/shells/zsh-autosuggestions/default.nix
index 4071d7bd0f21..fe7ed752f5e9 100644
--- a/pkgs/shells/zsh-autosuggestions/default.nix
+++ b/pkgs/shells/zsh-autosuggestions/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   name = "zsh-autosuggestions-${version}";
-  version = "0.3.3";
+  version = "0.4.0";
 
   src = fetchFromGitHub {
-    repo = "zsh-autosuggestions";
     owner = "zsh-users";
+    repo = "zsh-autosuggestions";
     rev = "v${version}";
-    sha256 = "0mnwyz4byvckrslzqfng5c0cx8ka0y12zcy52kb7amg3l07jrls4";
+    sha256 = "0z6i9wjjklb4lvr7zjhbphibsyx51psv50gm07mbb0kj9058j6kc";
   };
 
   buildInputs = [ zsh ];
diff --git a/pkgs/shells/zsh-completions/default.nix b/pkgs/shells/zsh-completions/default.nix
index dc62460441d1..a1f708227250 100644
--- a/pkgs/shells/zsh-completions/default.nix
+++ b/pkgs/shells/zsh-completions/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "zsh-completions-${version}";
-  version = "0.18.0";
+  version = "0.25.0";
 
   src = fetchFromGitHub {
     owner = "zsh-users";
     repo = "zsh-completions";
     rev = "${version}";
-    sha256 = "0iwb1kaidjxaz66kbbdzbydbdlfc6dk21sflzar0zy25jgx1p4xs";
+    sha256 = "0hc56y0fvshzs05acbzxf4q37vqsk4q3zp4c7smh175v56wigy94";
   };
 
   installPhase= ''
diff --git a/pkgs/shells/zsh-syntax-highlighting/default.nix b/pkgs/shells/zsh-syntax-highlighting/default.nix
index 792a8875db4d..21911c8800cb 100644
--- a/pkgs/shells/zsh-syntax-highlighting/default.nix
+++ b/pkgs/shells/zsh-syntax-highlighting/default.nix
@@ -1,25 +1,21 @@
-{ stdenv, fetchurl, zsh }:
+{ stdenv, fetchFromGitHub, zsh }:
 
 # To make use of this derivation, use the `programs.zsh.enableSyntaxHighlighting` option
 
-let
-
-  pkgName = "zsh-syntax-highlighting";
-  version = "0.4.1";
-
-in
-
 stdenv.mkDerivation rec {
-  name = "${pkgName}-${version}";
-
-  src = fetchurl {
-    url = "https://github.com/zsh-users/${pkgName}/archive/${version}.tar.gz";
-    sha256 = "15sih7blqz11d8wdybx38d91vgcq9jg3q0205r26138si0g9q6wp";
+  version = "0.5.0";
+  name = "zsh-syntax-highlighting-${version}";
+
+  src = fetchFromGitHub {
+    owner = "zsh-users";
+    repo = "zsh-syntax-highlighting";
+    rev = version;
+    sha256 = "0k0m5aw67lhi4z143sdawx93y1892scvvdfdnjvljb4hf0vzs2ww";
   };
 
   buildInputs = [ zsh ];
 
-  installFlags="PREFIX=$(out)";
+  installFlags = "PREFIX=$(out)";
 
   meta = with stdenv.lib; {
     description = "Fish shell like syntax highlighting for Zsh";
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix
index 8a517fddad8a..37587e3800d6 100644
--- a/pkgs/stdenv/darwin/default.nix
+++ b/pkgs/stdenv/darwin/default.nix
@@ -61,7 +61,7 @@ in rec {
                           allowedRequisites ? null}:
     let
       thisStdenv = import ../generic {
-        inherit system config shell extraBuildInputs allowedRequisites;
+        inherit config shell extraBuildInputs allowedRequisites;
 
         name = "stdenv-darwin-boot-${toString step}";
 
@@ -87,6 +87,10 @@ in rec {
           ${extraPreHook}
         '';
         initialPath  = [ bootstrapTools ];
+
+        hostPlatform = localSystem;
+        targetPlatform = localSystem;
+
         fetchurlBoot = import ../../build-support/fetchurl {
           stdenv = stage0.stdenv;
           curl   = bootstrapTools;
@@ -268,7 +272,7 @@ in rec {
   };
 
   stdenvDarwin = prevStage: let pkgs = prevStage; in import ../generic rec {
-    inherit system config;
+    inherit config;
     inherit (pkgs.stdenv) fetchurlBoot;
 
     name = "stdenv-darwin";
@@ -280,6 +284,9 @@ in rec {
     stdenvSandboxProfile = binShClosure + libSystemProfile;
     extraSandboxProfile  = binShClosure + libSystemProfile;
 
+    hostPlatform = localSystem;
+    targetPlatform = localSystem;
+
     initialPath = import ../common-path.nix { inherit pkgs; };
     shell       = "${pkgs.bash}/bin/bash";
 
diff --git a/pkgs/stdenv/freebsd/default.nix b/pkgs/stdenv/freebsd/default.nix
index b926c6bdd901..474a467e90c3 100644
--- a/pkgs/stdenv/freebsd/default.nix
+++ b/pkgs/stdenv/freebsd/default.nix
@@ -35,8 +35,10 @@ let inherit (localSystem) system; in
 
     stdenv = import ../generic {
       name = "stdenv-freebsd-boot-1";
-      inherit system config;
+      inherit config;
       initialPath = [ "/" "/usr" ];
+      hostPlatform = localSystem;
+      targetPlatform = localSystem;
       shell = "${bootstrapTools}/bin/bash";
       fetchurlBoot = null;
       cc = null;
@@ -50,9 +52,10 @@ let inherit (localSystem) system; in
 
     stdenv = import ../generic {
       name = "stdenv-freebsd-boot-0";
-      inherit system config;
+      inherit config;
       initialPath = [ prevStage.bootstrapTools ];
-      inherit (prevStage.stdenv) shell;
+      inherit (prevStage.stdenv)
+        hostPlatform targetPlatform shell;
       fetchurlBoot = prevStage.fetchurl;
       cc = null;
     };
@@ -65,10 +68,10 @@ let inherit (localSystem) system; in
     inherit config overlays;
     stdenv = import ../generic {
       name = "stdenv-freebsd-boot-3";
-      inherit system config;
+      inherit config;
 
       inherit (prevStage.stdenv)
-        initialPath shell fetchurlBoot;
+        hostPlatform targetPlatform initialPath shell fetchurlBoot;
 
       cc = import ../../build-support/cc-wrapper {
         nativeTools  = true;
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index 2fd477ca8533..8b85c5372fdb 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -1,6 +1,6 @@
 let lib = import ../../../lib; in lib.makeOverridable (
 
-{ system, name ? "stdenv", preHook ? "", initialPath, cc, shell
+{ name ? "stdenv", preHook ? "", initialPath, cc, shell
 , allowedRequisites ? null, extraAttrs ? {}, overrides ? (self: super: {}), config
 
 , # The `fetchurl' to use for downloading curl and its dependencies
@@ -14,9 +14,18 @@ let lib = import ../../../lib; in lib.makeOverridable (
 , __extraImpureHostDeps ? []
 , stdenvSandboxProfile ? ""
 , extraSandboxProfile ? ""
+
+, # The platforms here do *not* correspond to the stage the stdenv is
+  # used in, but rather the previous one, in which it was built. We
+  # use the latter two platforms, like a cross compiler, because the
+  # stand environment is a build tool if you squint at it, and because
+  # neither of these are used when building stdenv so we know the
+  # build platform is irrelevant.
+  hostPlatform, targetPlatform
 }:
 
 let
+  inherit (targetPlatform) system;
 
   # See discussion at https://github.com/NixOS/nixpkgs/pull/25304#issuecomment-298385426
   # for why this defaults to false, but I (@copumpkin) want to default it to true soon.
@@ -270,7 +279,7 @@ let
 
       outputs' =
         outputs ++
-        (if separateDebugInfo then assert result.isLinux; [ "debug" ] else []);
+        (if separateDebugInfo then assert targetPlatform.isLinux; [ "debug" ] else []);
 
       buildInputs' = lib.chooseDevOutputs buildInputs ++
         (if separateDebugInfo then [ ../../build-support/setup-hooks/separate-debug-info.sh ] else []);
@@ -316,7 +325,7 @@ let
           # Inputs built by the usual native compiler.
           nativeBuildInputs = nativeBuildInputs'
             ++ lib.optional
-                (result.isCygwin
+                (hostPlatform.isCygwin
                   || (crossConfig != null && lib.hasSuffix "mingw32" crossConfig))
                 ../../build-support/setup-hooks/win-dll-link.sh
             ;
@@ -397,54 +406,11 @@ let
       };
 
       # Utility flags to test the type of platform.
-      isDarwin = system == "x86_64-darwin";
-      isLinux = system == "i686-linux"
-             || system == "x86_64-linux"
-             || system == "powerpc-linux"
-             || system == "armv5tel-linux"
-             || system == "armv6l-linux"
-             || system == "armv7l-linux"
-             || system == "aarch64-linux"
-             || system == "mips64el-linux";
-      isGNU = system == "i686-gnu"; # GNU/Hurd
-      isGlibc = isGNU # useful for `stdenvNative'
-             || isLinux
-             || system == "x86_64-kfreebsd-gnu";
-      isSunOS = system == "i686-solaris"
-             || system == "x86_64-solaris";
-      isCygwin = system == "i686-cygwin"
-              || system == "x86_64-cygwin";
-      isFreeBSD = system == "i686-freebsd"
-               || system == "x86_64-freebsd";
-      isOpenBSD = system == "i686-openbsd"
-               || system == "x86_64-openbsd";
-      isi686 = system == "i686-linux"
-            || system == "i686-gnu"
-            || system == "i686-freebsd"
-            || system == "i686-openbsd"
-            || system == "i686-cygwin"
-            || system == "i386-sunos";
-      isx86_64 = system == "x86_64-linux"
-              || system == "x86_64-darwin"
-              || system == "x86_64-freebsd"
-              || system == "x86_64-openbsd"
-              || system == "x86_64-cygwin"
-              || system == "x86_64-solaris";
-      is64bit = system == "x86_64-linux"
-             || system == "x86_64-darwin"
-             || system == "x86_64-freebsd"
-             || system == "x86_64-openbsd"
-             || system == "x86_64-cygwin"
-             || system == "x86_64-solaris"
-             || system == "aarch64-linux"
-             || system == "mips64el-linux";
-      isMips = system == "mips-linux"
-            || system == "mips64el-linux";
-      isArm = system == "armv5tel-linux"
-           || system == "armv6l-linux"
-           || system == "armv7l-linux";
-      isAarch64 = system == "aarch64-linux";
-      isBigEndian = system == "powerpc-linux";
+      inherit (hostPlatform)
+        isDarwin isLinux isSunOS isHurd isCygwin isFreeBSD isOpenBSD
+        isi686 isx86_64 is64bit isMips isBigEndian;
+      isArm = hostPlatform.isArm32;
+      isAarch64 = hostPlatform.isArm64;
 
       # Whether we should run paxctl to pax-mark binaries.
       needsPax = isLinux;
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index 3a244675b3a4..b3399cc29b34 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -52,7 +52,7 @@ let
     let
 
       thisStdenv = import ../generic {
-        inherit system config extraBuildInputs;
+        inherit config extraBuildInputs;
         name = "stdenv-linux-boot";
         preHook =
           ''
@@ -64,6 +64,9 @@ let
         shell = "${bootstrapTools}/bin/bash";
         initialPath = [bootstrapTools];
 
+        hostPlatform = localSystem;
+        targetPlatform = localSystem;
+
         fetchurlBoot = import ../../build-support/fetchurl/boot.nix {
           inherit system;
         };
@@ -261,7 +264,7 @@ in
     targetPlatform = localSystem;
     inherit config overlays;
     stdenv = import ../generic rec {
-      inherit system config;
+      inherit config;
 
       preHook = ''
         # Make "strip" produce deterministic output, by setting
@@ -273,6 +276,9 @@ in
       initialPath =
         ((import ../common-path.nix) {pkgs = prevStage;});
 
+      hostPlatform = localSystem;
+      targetPlatform = localSystem;
+
       extraBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
         # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
         lib.optional (system == "aarch64-linux") prevStage.updateAutotoolsGnuConfigScriptsHook;
diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix
index f5c0976bf931..77c868a02f88 100644
--- a/pkgs/stdenv/native/default.nix
+++ b/pkgs/stdenv/native/default.nix
@@ -81,6 +81,9 @@ let
     { cc, fetchurl, extraPath ? [], overrides ? (self: super: { }) }:
 
     import ../generic {
+      hostPlatform = localSystem;
+      targetPlatform = localSystem;
+
       preHook =
         if system == "i686-freebsd" then prehookFreeBSD else
         if system == "x86_64-freebsd" then prehookFreeBSD else
diff --git a/pkgs/stdenv/nix/default.nix b/pkgs/stdenv/nix/default.nix
index 9aece3ce829d..ef088ecbf644 100644
--- a/pkgs/stdenv/nix/default.nix
+++ b/pkgs/stdenv/nix/default.nix
@@ -24,11 +24,11 @@ bootStages ++ [
 
       initialPath = (import ../common-path.nix) { pkgs = prevStage; };
 
-      system = stdenv.system;
+      inherit (prevStage.stdenv) hostPlatform targetPlatform;
 
       cc = import ../../build-support/cc-wrapper {
         nativeTools = false;
-        nativePrefix = stdenv.lib.optionalString stdenv.isSunOS "/usr";
+        nativePrefix = stdenv.lib.optionalString hostPlatform.isSunOS "/usr";
         nativeLibc = true;
         inherit stdenv;
         inherit (prevStage) binutils coreutils gnugrep;
diff --git a/pkgs/tools/archivers/zpaq/zpaqd.nix b/pkgs/tools/archivers/zpaq/zpaqd.nix
index 499bccaa425b..5e63c7cfaabf 100644
--- a/pkgs/tools/archivers/zpaq/zpaqd.nix
+++ b/pkgs/tools/archivers/zpaq/zpaqd.nix
@@ -1,7 +1,10 @@
-{ stdenv, fetchurl, unzip }:
+{ stdenv, fetchurl, unzip
+, buildPlatform, hostPlatform
+}:
+
 let
-  s = # Generated upstream information
-  rec {
+  # Generated upstream information
+  s = rec {
     baseName="zpaqd";
     version="715";
     name="${baseName}-${version}";
@@ -9,15 +12,12 @@ let
     url="http://mattmahoney.net/dc/zpaqd715.zip";
     sha256="0868lynb45lm79yvx5f10lj5h6bfv0yck8whcls2j080vmk3n7rk";
   };
-  isUnix = with stdenv; isLinux || isGNU || isDarwin || isFreeBSD || isOpenBSD;
-  isx86 = stdenv.isi686 || stdenv.isx86_64;
-  compileFlags = with stdenv; ""
-    + (lib.optionalString (isUnix) " -Dunix -pthread")
-    + (lib.optionalString (isi686) " -march=i686")
-    + (lib.optionalString (isx86_64) " -march=nocona")
-    + (lib.optionalString (!isx86) " -DNOJIT")
-    + " -O3 -mtune=generic -DNDEBUG"
-    ;
+
+  compileFlags = stdenv.lib.concatStringsSep " " ([ "-O3" "-mtune=generic" "-DNDEBUG" ]
+    ++ stdenv.lib.optional (hostPlatform.isUnix) "-Dunix -pthread"
+    ++ stdenv.lib.optional (hostPlatform.isi686) "-march=i686"
+    ++ stdenv.lib.optional (hostPlatform.isx86_64) "-march=nocona"
+    ++ stdenv.lib.optional (!hostPlatform.isx86) "-DNOJIT");
 in
 stdenv.mkDerivation {
   inherit (s) name version;
diff --git a/pkgs/tools/inputmethods/ibus/default.nix b/pkgs/tools/inputmethods/ibus/default.nix
index 1654f57c8ed5..d392777dfd44 100644
--- a/pkgs/tools/inputmethods/ibus/default.nix
+++ b/pkgs/tools/inputmethods/ibus/default.nix
@@ -3,16 +3,58 @@
 , python3
 , gtk2, gtk3, atk, dconf, glib, json_glib
 , dbus, libnotify, gobjectIntrospection, wayland
-, nodePackages
 }:
 
-stdenv.mkDerivation rec {
+let
+  emojiData = let
+    srcs = {
+      data = fetchurl {
+        url = "http://unicode.org/Public/emoji/5.0/emoji-data.txt";
+        sha256 = "0zfn3z61xy76yah3d24dd745qjssrib009m4nvqpnx4sf1r13i2x";
+      };
+      sequences = fetchurl {
+        url = "http://unicode.org/Public/emoji/5.0/emoji-sequences.txt";
+        sha256 = "0xzk7hi2a8macx9s5gj2pb36d38y8fa9001sj71g6kw25c2h94cn";
+      };
+      variation-sequences = fetchurl {
+        url = "http://unicode.org/Public/emoji/5.0/emoji-variation-sequences.txt";
+        sha256 = "1wlg4gbq7spmpppjfy5zdl82sj0hc836p8gljgfrjmwsjgybq286";
+      };
+      zwj-sequences = fetchurl {
+        url = "http://unicode.org/Public/emoji/5.0/emoji-zwj-sequences.txt";
+        sha256 = "0rrnk94mhm3k9vs74pvyvs4ir7f31f1libx7c196fmdqvp1qfafw";
+      };
+      test = fetchurl {
+        url = "http://unicode.org/Public/emoji/5.0/emoji-test.txt";
+        sha256 = "1dvxw5xp1xiy13c1p1c7l2xc9q8f8znk47kb7q8g7bbgbi21cq5m";
+      };
+    };
+  in stdenv.mkDerivation {
+    name = "emoji-data-5.0";
+    unpackPhase = ":";
+    dontBuild = true;
+    installPhase = with stdenv.lib; ''
+      mkdir $out
+      ${builtins.toString (flip mapAttrsToList srcs (k: v: ''
+        cp ${v} $out/emoji-${k}.txt
+      ''))}
+    '';
+  };
+  cldrEmojiAnnotation = stdenv.mkDerivation rec {
+    name = "cldr-emoji-annotation-${version}";
+    version = "31.0.1_1";
+    src = fetchurl {
+      url = "https://github.com/fujiwarat/cldr-emoji-annotation/releases/download/${version}/${name}.tar.gz";
+      sha256 = "1a3qzsab7vzjqpdialp1g8ppr21x05v0ph8ngyq9pyjkx4vzcdi7";
+    };
+  };
+in stdenv.mkDerivation rec {
   name = "ibus-${version}";
-  version = "1.5.14";
+  version = "1.5.16";
 
   src = fetchurl {
     url = "https://github.com/ibus/ibus/releases/download/${version}/${name}.tar.gz";
-    sha256 = "0g4x02d7j5w1lfn4zvmzsq93h17lajgn9d7hlvr6pws28vz40ax4";
+    sha256 = "07py16jb81kd7vkqhcia9cb2avsbg5jswp2kzf0k4bprwkxppd9n";
   };
 
   postPatch = ''
@@ -30,7 +72,8 @@ stdenv.mkDerivation rec {
     "--disable-memconf"
     "--enable-ui"
     "--enable-python-library"
-    "--with-emoji-json-file=${nodePackages.emojione}/lib/node_modules/emojione/emoji.json"
+    "--with-unicode-emoji-dir=${emojiData}"
+    "--with-emoji-annotation-dir=${cldrEmojiAnnotation}/share/unicode/cldr/common/annotations"
   ];
 
   buildInputs = [
diff --git a/pkgs/tools/misc/aescrypt/default.nix b/pkgs/tools/misc/aescrypt/default.nix
index 819728032bb6..53aec187bb76 100644
--- a/pkgs/tools/misc/aescrypt/default.nix
+++ b/pkgs/tools/misc/aescrypt/default.nix
@@ -1,12 +1,12 @@
 { stdenv, fetchurl, libiconv }:
 
 stdenv.mkDerivation rec {
-  version = "3.0.9";
+  version = "3.13";
   name = "aescrypt-${version}";
 
   src = fetchurl {
     url = "http://www.aescrypt.com/download/v3/linux/${name}.tgz";
-    sha256 = "3f3590f9b7e50039611ba9c0cf1cae1b188a44bd39cfc41553db7ec5709c0882";
+    sha256 = "1a1rs7xmbxh355qg3v02rln3gshvy3j6wkx4g9ir72l22mp6zkc7";
   };
 
   preBuild = ''
diff --git a/pkgs/tools/misc/esptool-ck/default.nix b/pkgs/tools/misc/esptool-ck/default.nix
new file mode 100644
index 000000000000..c1678f3907fb
--- /dev/null
+++ b/pkgs/tools/misc/esptool-ck/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  name = "esptool-ck-${version}";
+  version = "0.4.11";
+
+  src = fetchFromGitHub {
+    owner = "igrr";
+    repo = "esptool-ck";
+    rev = "0.4.11";
+    sha256 = "086x68jza24xkaap8nici18kj78id2p2lzbasin98wilvpjc8d7f";
+  };
+
+  makeFlags = [ "VERSION=${version}" ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp esptool $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "ESP8266/ESP32 build helper tool";
+    homepage = https://github.com/igrr/esptool-ck;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.dezgeg ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/tools/misc/esptool/default.nix b/pkgs/tools/misc/esptool/default.nix
new file mode 100644
index 000000000000..04ba5788cd91
--- /dev/null
+++ b/pkgs/tools/misc/esptool/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, python3 }:
+
+python3.pkgs.buildPythonApplication rec {
+  name = "esptool-${version}";
+  version = "1.3";
+
+  src = fetchFromGitHub {
+    owner = "espressif";
+    repo = "esptool";
+    rev = "v${version}";
+    sha256 = "0112fybkz4259gyvhcs18wa6938jp6w7clk66kpd0d1dg70lz1h6";
+  };
+
+  propagatedBuildInputs = with python3.pkgs; [ pyserial ];
+
+  doCheck = false; # FIXME: requires packaging some new deps
+
+  meta = with stdenv.lib; {
+    description = "ESP8266 and ESP32 serial bootloader utility";
+    homepage = https://github.com/espressif/esptool;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.dezgeg ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/tools/misc/grc/default.nix b/pkgs/tools/misc/grc/default.nix
index aafb865cfac8..c554c13bb4ab 100644
--- a/pkgs/tools/misc/grc/default.nix
+++ b/pkgs/tools/misc/grc/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name    = "grc-${version}";
-  version = "1.11";
+  version = "1.11.1";
 
   src = fetchFromGitHub {
     owner  = "garabik";
     repo   = "grc";
     rev    = "v${version}";
-    sha256 = "0slxkjg8xf5rg5pqgh4g2p1qxr5m9f6ds7zg7vh2xqzkmwqv18kp";
+    sha256 = "10h65qmv2cymixzfsckfcn6f01xsjzfq1x303rv01nibniwbq5z9";
   };
 
   buildInputs = with python3Packages; [ wrapPython makeWrapper ];
diff --git a/pkgs/tools/misc/tmux/default.nix b/pkgs/tools/misc/tmux/default.nix
index 95d1a7275d9b..ac564de0ea6d 100644
--- a/pkgs/tools/misc/tmux/default.nix
+++ b/pkgs/tools/misc/tmux/default.nix
@@ -13,7 +13,7 @@ in
 
 stdenv.mkDerivation rec {
   name = "tmux-${version}";
-  version = "2.3";
+  version = "2.5";
 
   outputs = [ "out" "man" ];
 
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
     owner = "tmux";
     repo = "tmux";
     rev = version;
-    sha256 = "14c6iw0p3adz7w8jm42w9f3s1zph9is10cbwdjgh5bvifrhxrary";
+    sha256 = "0h0c6rwp4bjifqx9wpx7y0bmayvrvvgh9211rdk4nsf81j17n6vx";
   };
 
   nativeBuildInputs = [ pkgconfig autoreconfHook ];
diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix
index 88750f6e0e10..1acf0e65dea6 100644
--- a/pkgs/tools/misc/youtube-dl/default.nix
+++ b/pkgs/tools/misc/youtube-dl/default.nix
@@ -14,11 +14,11 @@ with stdenv.lib;
 buildPythonApplication rec {
 
   name = "youtube-dl-${version}";
-  version = "2017.04.28";
+  version = "2017.05.23";
 
   src = fetchurl {
     url = "https://yt-dl.org/downloads/${version}/${name}.tar.gz";
-    sha256 = "0d3mgf8qxb07b7bjf79ppaxhcl4f47q0zjpshp6y2q0lalfskh3j";
+    sha256 = "1na2ccja8p18i3ypf7vjrxlh653906746l966fwm06b5q6867iwd";
   };
 
   nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix
index 536b9a07a4f8..d623881cfbad 100644
--- a/pkgs/tools/package-management/nix/default.nix
+++ b/pkgs/tools/package-management/nix/default.nix
@@ -8,8 +8,8 @@
 
 let
 
-  common = { name, suffix ? "", src, patchPhase ? "", fromGit ? false }: stdenv.mkDerivation rec {
-    inherit name src patchPhase;
+  common = { name, suffix ? "", src, fromGit ? false }: stdenv.mkDerivation rec {
+    inherit name src;
     version = lib.getVersion name;
 
     VERSION_SUFFIX = lib.optionalString fromGit suffix;
@@ -134,15 +134,6 @@ in rec {
       url = "http://nixos.org/releases/nix/${name}/${name}.tar.xz";
       sha256 = "0e943e277f37843f9196b0293cc31d828613ad7a328ee77cd5be01935dc6e7e1";
     };
-
-    # Until 1.11.9 is released, we do this :)
-    patchPhase = ''
-      substituteInPlace src/libexpr/json-to-value.cc \
-        --replace 'std::less<Symbol>, gc_allocator<Value *>' \
-                  'std::less<Symbol>, gc_allocator<std::pair<const Symbol, Value *> >'
-
-      sed -i '/if (settings.readOnlyMode) {/a curSchema = getSchema();' src/libstore/local-store.cc
-    '';
   }) // { perl-bindings = nixStable; };
 
   nixUnstable = (lib.lowPrio (common rec {
diff --git a/pkgs/tools/package-management/nixops/unstable.nix b/pkgs/tools/package-management/nixops/unstable.nix
index d951b2ba0a5e..681cc3d883c8 100644
--- a/pkgs/tools/package-management/nixops/unstable.nix
+++ b/pkgs/tools/package-management/nixops/unstable.nix
@@ -1,10 +1,10 @@
 { callPackage, fetchurl }:
 
 callPackage ./generic.nix (rec {
-  version = "2017-05-15";
+  version = "2017-05-22";
   src = fetchurl {
     # Sadly hydra doesn't offer download links
-    url = "https://static.domenkozar.com/nixops-tarball-1.5.1pre2165_b2fdc43.tar.bz2";
-    sha256 = "1x8jiskxynx0rzw356sz406bi2vl0vjs7747sbacq0bp1jlnpb2n";
+    url = "https://static.domenkozar.com/nixops-1.5.1pre2169_8f4a67c.tar.bz2";
+    sha256 = "0rma5npgkhlknmvm8z0ps54dsr07za1f32p6d6na3nis784h0slw";
   };
 })
diff --git a/pkgs/tools/security/aide/default.nix b/pkgs/tools/security/aide/default.nix
index d190dff842ba..5779faec6b9d 100644
--- a/pkgs/tools/security/aide/default.nix
+++ b/pkgs/tools/security/aide/default.nix
@@ -1,14 +1,15 @@
-{ stdenv, fetchurl, flex, bison, libmhash, zlib, acl, attr, libselinux }:
+{ stdenv, fetchurl, flex, bison, libmhash, zlib, acl, attr, libselinux, pcre }:
+
 stdenv.mkDerivation rec {
   name = "aide-${version}";
-  version = "0.16a2";
+  version = "0.16";
 
   src = fetchurl {
-    url = "mirror://sourceforge/aide/devel/0.16a2/aide-${version}.tar.gz";
-    sha256 = "11qvp6l2x4ajq9485lmg722gfdikh8r2wqfw17m0jm68df0m295m";
+    url = "mirror://sourceforge/aide/${version}/aide-${version}.tar.gz";
+    sha256 = "0ibkv4z2gk14fn014kq13rp2ysiq6nn2cflv2q5i7zf466hm6758";
   };
 
-  buildInputs = [ flex bison libmhash zlib acl attr libselinux ];
+  buildInputs = [ flex bison libmhash zlib acl attr libselinux pcre ];
 
 
   configureFlags = [
diff --git a/pkgs/tools/security/sslscan/default.nix b/pkgs/tools/security/sslscan/default.nix
index 90034b641a05..87fda1467f0d 100644
--- a/pkgs/tools/security/sslscan/default.nix
+++ b/pkgs/tools/security/sslscan/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "sslscan-${version}";
-  version = "1.11.8";
+  version = "1.11.10";
 
   src = fetchFromGitHub {
     owner = "rbsec";
     repo = "sslscan";
     rev = "${version}-rbsec";
-    sha256 = "0vm9r0hmpb6ifix2biqbr7za1rld9yx8hi8vf7j69vcm647z7aas";
+    sha256 = "1bxr7p7nhg4b8wkcm7j2xk10gf370sqcvl06vbgnqd3azp55fhpf";
   };
 
   buildInputs = [ openssl ];
diff --git a/pkgs/tools/text/aha/default.nix b/pkgs/tools/text/aha/default.nix
index 9851f9596c36..7382078f114f 100644
--- a/pkgs/tools/text/aha/default.nix
+++ b/pkgs/tools/text/aha/default.nix
@@ -2,10 +2,10 @@
 
 stdenv.mkDerivation rec {
   name = "aha-${version}";
-  version = "0.4.10.2";
+  version = "0.4.10.6";
 
   src = fetchFromGitHub {
-    sha256 = "14n0py8dzlvirawb8brq143nq0sy9s2z6in5589krrya0frlrlkj";
+    sha256 = "18mz3f5aqw4vbdrxf8wblqm6nca73ppq9hb2z2ppw6k0557i71kz";
     rev = version;
     repo = "aha";
     owner = "theZiz";
diff --git a/pkgs/tools/virtualization/cloud-init/add-nixos-support.patch b/pkgs/tools/virtualization/cloud-init/add-nixos-support.patch
new file mode 100644
index 000000000000..00cb7d070c64
--- /dev/null
+++ b/pkgs/tools/virtualization/cloud-init/add-nixos-support.patch
@@ -0,0 +1,113 @@
+diff -ruN cloud-init-0.7.6.orig/cloudinit/distros/__init__.py cloud-init-0.7.6/cloudinit/distros/__init__.py
+--- cloud-init-0.7.6.orig/cloudinit/distros/__init__.py	2014-10-10 15:26:25.000000000 +0000
++++ cloud-init-0.7.6/cloudinit/distros/__init__.py	2016-06-08 07:51:45.230357099 +0000
+@@ -43,6 +43,7 @@
+     'freebsd': ['freebsd'],
+     'suse': ['sles'],
+     'arch': ['arch'],
++    'nixos': ['nixos'],
+ }
+ 
+ LOG = logging.getLogger(__name__)
+diff -ruN cloud-init-0.7.6.orig/cloudinit/distros/nixos.py cloud-init-0.7.6/cloudinit/distros/nixos.py
+--- cloud-init-0.7.6.orig/cloudinit/distros/nixos.py	1970-01-01 00:00:00.000000000 +0000
++++ cloud-init-0.7.6/cloudinit/distros/nixos.py	2016-06-08 07:50:58.602616595 +0000
+@@ -0,0 +1,98 @@
++# vi: ts=4 expandtab
++#
++#    Copyright (C) 2012 Canonical Ltd.
++#    Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
++#    Copyright (C) 2012 Yahoo! Inc.
++#
++#    Author: Scott Moser <scott.moser@canonical.com>
++#    Author: Juerg Haefliger <juerg.haefliger@hp.com>
++#    Author: Joshua Harlow <harlowja@yahoo-inc.com>
++#
++#    This program is free software: you can redistribute it and/or modify
++#    it under the terms of the GNU General Public License version 3, as
++#    published by the Free Software Foundation.
++#
++#    This program is distributed in the hope that it will be useful,
++#    but WITHOUT ANY WARRANTY; without even the implied warranty of
++#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++#    GNU General Public License for more details.
++#
++#    You should have received a copy of the GNU General Public License
++#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++from cloudinit import distros
++from cloudinit import helpers
++from cloudinit import log as logging
++from cloudinit import util
++
++from cloudinit.distros.parsers.hostname import HostnameConf
++
++LOG = logging.getLogger(__name__)
++
++class Distro(distros.Distro):
++
++    def __init__(self, name, cfg, paths):
++        distros.Distro.__init__(self, name, cfg, paths)
++        # This will be used to restrict certain
++        # calls from repeatly happening (when they
++        # should only happen say once per instance...)
++        self._runner = helpers.Runners(paths)
++        self.osfamily = 'nixos'
++
++    def _select_hostname(self, hostname, fqdn):
++        # Prefer the short hostname over the long
++        # fully qualified domain name
++        if not hostname:
++            return fqdn
++        return hostname
++
++    def _write_hostname(self, your_hostname, out_fn):
++        conf = None
++        try:
++            # Try to update the previous one
++            # so lets see if we can read it first.
++            conf = self._read_hostname_conf(out_fn)
++        except IOError:
++            pass
++        if not conf:
++            conf = HostnameConf('')
++        conf.set_hostname(your_hostname)
++        util.write_file(out_fn, str(conf), 0644)
++
++    def _read_system_hostname(self):
++        sys_hostname = self._read_hostname(self.hostname_conf_fn)
++        return (self.hostname_conf_fn, sys_hostname)
++
++    def _read_hostname_conf(self, filename):
++        conf = HostnameConf(util.load_file(filename))
++        conf.parse()
++        return conf
++
++    def _read_hostname(self, filename, default=None):
++        hostname = None
++        try:
++            conf = self._read_hostname_conf(filename)
++            hostname = conf.hostname
++        except IOError:
++            pass
++        if not hostname:
++            return default
++        return hostname
++
++    def _write_network(self, settings):
++        raise NotImplementedError()
++
++    def apply_locale(self, locale, out_fn=None):
++        raise NotImplementedError()
++
++    def install_packages(self, pkglist):
++        raise NotImplementedError()
++
++    def package_command(self, command, args=None, pkgs=None):
++        raise NotImplementedError()
++
++    def set_timezone(self, tz):
++        raise NotImplementedError()
++
++    def update_package_sources(self):
++        raise NotImplementedError()
diff --git a/pkgs/tools/virtualization/cloud-init/default.nix b/pkgs/tools/virtualization/cloud-init/default.nix
index c038ca7c1bbe..94dae1e47faa 100644
--- a/pkgs/tools/virtualization/cloud-init/default.nix
+++ b/pkgs/tools/virtualization/cloud-init/default.nix
@@ -1,6 +1,6 @@
-{ lib, pythonPackages, fetchurl }:
+{ lib, pythonPackages, fetchurl, kmod, systemd, cloud-utils }:
 
-let version = "0.7.6";
+let version = "0.7.9";
 
 in pythonPackages.buildPythonApplication rec {
   name = "cloud-init-${version}";
@@ -8,10 +8,11 @@ in pythonPackages.buildPythonApplication rec {
 
   src = fetchurl {
     url = "https://launchpad.net/cloud-init/trunk/${version}/+download/cloud-init-${version}.tar.gz";
-    sha256 = "1mry5zdkfaq952kn1i06wiggc66cqgfp6qgnlpk0mr7nnwpd53wy";
+    sha256 = "0wnl76pdcj754pl99wxx76hkir1s61x0bg0lh27sdgdxy45vivbn";
   };
 
-  patchPhase = ''
+  patches = [ ./add-nixos-support.patch ];
+  prePatch = ''
     patchShebangs ./tools
 
     substituteInPlace setup.py \
@@ -19,15 +20,18 @@ in pythonPackages.buildPythonApplication rec {
       --replace /etc $out/etc \
       --replace /lib/systemd $out/lib/systemd \
       --replace 'self.init_system = ""' 'self.init_system = "systemd"'
+
+    substituteInPlace cloudinit/config/cc_growpart.py \
+      --replace 'util.subp(["growpart"' 'util.subp(["${cloud-utils}/bin/growpart"'
     '';
 
   propagatedBuildInputs = with pythonPackages; [ cheetah jinja2 prettytable
-    oauth pyserial configobj pyyaml argparse requests jsonpatch ];
+    oauthlib pyserial configobj pyyaml argparse requests jsonpatch ];
 
   meta = {
     homepage = http://cloudinit.readthedocs.org;
     description = "Provides configuration and customization of cloud instance";
-    maintainers = [ lib.maintainers.madjar ];
+    maintainers = [ lib.maintainers.madjar lib.maintainers.phile314 ];
     platforms = lib.platforms.all;
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 3e0e4ba200de..7eab38dc9d5a 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -949,6 +949,10 @@ with pkgs;
 
   envconsul = callPackage ../tools/system/envconsul { };
 
+  esptool = callPackage ../tools/misc/esptool { };
+
+  esptool-ck = callPackage ../tools/misc/esptool-ck { };
+
   f3 = callPackage ../tools/filesystems/f3 { };
 
   facter = callPackage ../tools/system/facter {
@@ -6464,7 +6468,7 @@ with pkgs;
   bin_replace_string = callPackage ../development/tools/misc/bin_replace_string { };
 
   binutils =
-    if lib.systems.parse.isDarwin targetPlatform.parsed
+    if targetPlatform.isDarwin
     then darwin.binutils
     else binutils-raw;
 
@@ -6940,6 +6944,8 @@ with pkgs;
 
   pahole = callPackage ../development/tools/misc/pahole {};
 
+  inherit (callPackages ../development/tools/build-managers/pants {}) pants pants13-pre;
+
   parse-cli-bin = callPackage ../development/tools/parse-cli-bin { };
 
   patchelf = callPackage ../development/tools/misc/patchelf { };
@@ -7143,10 +7149,6 @@ with pkgs;
 
   gdbGuile = lowPrio (gdb.override { inherit guile; });
 
-  gdbCross = lowPrio (callPackage ../development/tools/misc/gdb {
-    target = if targetPlatform != buildPlatform then targetPlatform else null;
-  });
-
   gdb-multitarget = lowPrio (gdb.override { multitarget = true; });
 
   valgrind = callPackage ../development/tools/analysis/valgrind {
@@ -7439,6 +7441,8 @@ with pkgs;
 
   cryptopp = callPackage ../development/libraries/crypto++ { };
 
+  cryptominisat = callPackage ../applications/science/logic/cryptominisat { };
+
   curlcpp = callPackage ../development/libraries/curlcpp { };
 
   cutee = callPackage ../development/libraries/cutee { };
@@ -8614,6 +8618,8 @@ with pkgs;
 
   libharu = callPackage ../development/libraries/libharu { };
 
+  libhdhomerun = callPackage ../development/libraries/libhdhomerun { };
+
   libhttpseverywhere = callPackage ../development/libraries/libhttpseverywhere { };
 
   libHX = callPackage ../development/libraries/libHX { };
@@ -8720,15 +8726,19 @@ with pkgs;
 
   libgsf = callPackage ../development/libraries/libgsf { };
 
-  # glibc provides libiconv so systems with glibc don't need to build libiconv
-  # separately, but we also provide libiconvReal, which will always be a
-  # standalone libiconv, just in case you want it
-  libiconv = if stdenv ? cross then
-    (if stdenv.cross.libc == "glibc" then libcCross
-      else if stdenv.cross.libc == "libSystem" then darwin.libiconv
-      else libiconvReal)
-    else if stdenv.isGlibc then glibcIconv stdenv.cc.libc
-    else if stdenv.isDarwin then darwin.libiconv
+  # GNU libc provides libiconv so systems with glibc don't need to build
+  # libiconv separately. Additionally, Apple forked/repackaged libiconv so we
+  # use that instead of the vanilla version on that OS.
+  #
+  # We also provide `libiconvReal`, which will always be a standalone libiconv,
+  # just in case you want it regardless of platform.
+  libiconv =
+    if hostPlatform.libc == "glibc"
+      then glibcIconv (if hostPlatform != buildPlatform
+                       then libcCross
+                       else stdenv.cc.libc)
+    else if hostPlatform.isDarwin
+      then darwin.libiconv
     else libiconvReal;
 
   glibcIconv = libc: let
@@ -11723,6 +11733,8 @@ with pkgs;
 
   iw = callPackage ../os-specific/linux/iw { };
 
+  iwd = callPackage ../os-specific/linux/iwd { };
+
   jfbview = callPackage ../os-specific/linux/jfbview { };
   jfbpdf = callPackage ../os-specific/linux/jfbview {
     imageSupport = false;
@@ -14313,6 +14325,9 @@ with pkgs;
 
   hipchat = callPackage ../applications/networking/instant-messengers/hipchat { };
 
+  hledger = haskell.lib.justStaticExecutables haskellPackages.hledger;
+  hledger-web = haskell.lib.justStaticExecutables haskellPackages.hledger-web;
+
   homebank = callPackage ../applications/office/homebank {
     gtk = gtk3;
   };
@@ -16340,20 +16355,22 @@ with pkgs;
 
   wily = callPackage ../applications/editors/wily { };
 
+  winswitch = callPackage ../tools/X11/winswitch { };
+
+  wings = callPackage ../applications/graphics/wings { };
+
+  wireguard = callPackage ../os-specific/linux/wireguard { };
+
   alsamixer.app = callPackage ../applications/window-managers/windowmaker/dockapps/alsamixer.app.nix { };
 
+  wllvm = callPackage  ../development/tools/wllvm { };
+
   wmcalclock = callPackage ../applications/window-managers/windowmaker/dockapps/wmcalclock.nix { };
 
   wmsm.app = callPackage ../applications/window-managers/windowmaker/dockapps/wmsm.app.nix { };
 
   wmsystemtray = callPackage ../applications/window-managers/windowmaker/dockapps/wmsystemtray.nix { };
 
-  winswitch = callPackage ../tools/X11/winswitch { };
-
-  wings = callPackage ../applications/graphics/wings { };
-
-  wireguard = callPackage ../os-specific/linux/wireguard { };
-
   wmname = callPackage ../applications/misc/wmname { };
 
   wmctrl = callPackage ../tools/X11/wmctrl { };
@@ -16437,6 +16454,7 @@ with pkgs;
       ++ optional (config.kodi.enableSVTPlay or false) svtplay
       ++ optional (config.kodi.enableSteamLauncher or false) steam-launcher
       ++ optional (config.kodi.enablePVRHTS or false) pvr-hts
+      ++ optional (config.kodi.enablePVRHDHomeRun or false) pvr-hdhomerun
       );
   };
 
@@ -17123,6 +17141,8 @@ with pkgs;
 
   rogue = callPackage ../games/rogue { };
 
+  robotfindskitten = callPackage ../games/robotfindskitten { };
+
   saga = callPackage ../applications/gis/saga { };
 
   samplv1 = callPackage ../applications/audio/samplv1 { };
@@ -17283,6 +17303,8 @@ with pkgs;
 
   vessel = callPackage_i686 ../games/vessel { };
 
+  vms-empire = callPackage ../games/vms-empire { };
+
   voxelands = callPackage ../games/voxelands {
     libpng = libpng12;
   };
@@ -17699,20 +17721,13 @@ with pkgs;
     camlp5 = ocamlPackages_3_12_1.camlp5_transitional;
     lablgtk = ocamlPackages_3_12_1.lablgtk_2_14;
   };
-  coq_8_4 = callPackage ../applications/science/logic/coq/8.4.nix {
-    inherit (ocamlPackages_4_02) ocaml findlib lablgtk;
-    camlp5 = ocamlPackages_4_02.camlp5_transitional;
-  };
-  coq_8_5 = callPackage ../applications/science/logic/coq {
-    version = "8.5pl3";
-  };
-  coq_8_6 = callPackage ../applications/science/logic/coq {};
-  coq_HEAD = callPackage ../applications/science/logic/coq/HEAD.nix {};
-  coq = coq_8_6;
 
   mkCoqPackages_8_4 = self: let callPackage = newScope self; in {
     inherit callPackage;
-    coq = coq_8_4;
+    coq = callPackage ../applications/science/logic/coq/8.4.nix {
+      inherit (ocamlPackages_4_02) ocaml findlib lablgtk;
+      camlp5 = ocamlPackages_4_02.camlp5_transitional;
+    };
     coqPackages = coqPackages_8_4;
 
     contribs =
@@ -17744,7 +17759,9 @@ with pkgs;
 
   mkCoqPackages_8_5 = self: let callPackage = newScope self; in rec {
     inherit callPackage;
-    coq = coq_8_5;
+    coq = callPackage ../applications/science/logic/coq {
+      version = "8.5pl3";
+    };
     coqPackages = coqPackages_8_5;
 
     coq-ext-lib = callPackage ../development/coq-modules/coq-ext-lib {};
@@ -17761,7 +17778,7 @@ with pkgs;
 
   mkCoqPackages_8_6 = self: let callPackage = newScope self; in rec {
     inherit callPackage;
-    coq = coq_8_6;
+    coq = callPackage ../applications/science/logic/coq {};
     coqPackages = coqPackages_8_6;
 
     coq-ext-lib = callPackage ../development/coq-modules/coq-ext-lib {};
@@ -17778,7 +17795,13 @@ with pkgs;
   coqPackages_8_4 = mkCoqPackages_8_4 coqPackages_8_4;
   coqPackages_8_5 = mkCoqPackages_8_5 coqPackages_8_5;
   coqPackages_8_6 = mkCoqPackages_8_6 coqPackages_8_6;
-  coqPackages = coqPackages_8_4;
+  coqPackages = coqPackages_8_6;
+  
+  coq_8_4 = coqPackages_8_4.coq;
+  coq_8_5 = coqPackages_8_5.coq;
+  coq_8_6 = coqPackages_8_6.coq;
+  coq_HEAD = callPackage ../applications/science/logic/coq/HEAD.nix {};
+  coq = coqPackages.coq;
 
   cryptoverif = callPackage ../applications/science/logic/cryptoverif { };
 
@@ -17842,6 +17865,7 @@ with pkgs;
   mcrl2 = callPackage ../applications/science/logic/mcrl2 { };
 
   minisat = callPackage ../applications/science/logic/minisat {};
+  minisatUnstable = callPackage ../applications/science/logic/minisat/unstable.nix {};
 
   opensmt = callPackage ../applications/science/logic/opensmt { };
 
@@ -18653,6 +18677,7 @@ with pkgs;
     gphoto2Support = true;
     ldapSupport = true;
     pulseaudioSupport = true;
+    udevSupport = true;
   });
   wineStable = self.wine.override { wineRelease = "stable"; };
   wineUnstable = lowPrio (self.wine.override { wineRelease = "unstable"; });
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index f210537618ed..eccf1047cc42 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -8285,93 +8285,9 @@ in {
     };
   };
 
-  pants = let
-    # Get rid of this when pants 1.3.0 is released and make 0.5 the default
-    pathspec = buildPythonPackage rec {
-      pname   = "pathspec";
-      version = "0.3.4";
-      name    = "${pname}-${version}";
-
-      src = self.fetchPypi {
-        inherit pname version;
-        sha256 = "0a37yrr2jhlg8aiynxivh2xqani7l9j725qxzrm7cm7m4rfcl1bn";
-      };
-
-      meta = {
-        description = "Utility library for gitignore-style pattern matching of file paths";
-        homepage = "https://github.com/cpburnz/python-path-specification";
-        license = licenses.mpl20;
-       maintainers = with maintainers; [ copumpkin ];
-      };
-    };
-  in buildPythonPackage rec {
-    pname   = "pantsbuild.pants";
-    version = "1.2.1";
-    name    = "${pname}-${version}";
-
-    src = self.fetchPypi {
-      inherit pname version;
-      sha256 = "1bnzhhd2acwk7ckv56xzg2d9vxacl3k5bh13bsjxymnq3spm962w";
-    };
-
-    prePatch = ''
-      sed -E -i "s/'([[:alnum:].-]+)[=><][^']*'/'\\1'/g" setup.py
-    '';
-
-    # Unnecessary, and causes some really weird behavior around .class files, which
-    # this package bundles. See https://github.com/NixOS/nixpkgs/issues/22520.
-    dontStrip = true;
-
-    propagatedBuildInputs = with self; [
-      ansicolors beautifulsoup4 cffi coverage docutils fasteners futures
-      isort lmdb markdown mock packaging pathspec pep8 pex psutil pyflakes
-      pygments pystache pytestcov pytest pywatchman requests scandir
-      setproctitle setuptools six thrift wheel twitter-common-dirutil
-      twitter-common-confluence twitter-common-collections
-    ];
-
-    meta = {
-      description = "A build system for software projects in a variety of languages";
-      homepage    = "http://www.pantsbuild.org/";
-      license     = licenses.asl20;
-      maintainers = with maintainers; [ copumpkin ];
-      platforms   = platforms.unix;
-    };
-  };
-
-  pants13-pre = buildPythonPackage rec {
-    pname   = "pantsbuild.pants";
-    version = "1.3.0.dev19";
-    name    = "${pname}-${version}";
-
-    src = self.fetchPypi {
-      inherit pname version;
-      sha256 = "07gxx8kzkcx3pm2qd5sz2xb3nw9khvbapiqdzgjvzbvai2gsd5qq";
-    };
-
-    prePatch = ''
-      sed -E -i "s/'([[:alnum:].-]+)[=><][[:digit:]=><.,]*'/'\\1'/g" setup.py
-    '';
-
-    # Unnecessary, and causes some really weird behavior around .class files, which
-    # this package bundles. See https://github.com/NixOS/nixpkgs/issues/22520.
-    dontStrip = true;
-
-    propagatedBuildInputs = with self; [
-      twitter-common-collections setproctitle setuptools six ansicolors
-      packaging pathspec scandir twitter-common-dirutil psutil requests
-      pystache pex docutils markdown pygments twitter-common-confluence
-      fasteners coverage pywatchman futures cffi
-    ];
-
-    meta = {
-      description = "A build system for software projects in a variety of languages";
-      homepage    = "http://www.pantsbuild.org/";
-      license     = licenses.asl20;
-      maintainers = with maintainers; [ copumpkin ];
-      platforms   = platforms.unix;
-    };
-  };
+  # These used to be here but were moved to all-packages, but I'll leave them around for a while.
+  pants = pkgs.pants;
+  pants13-pre = pkgs.pants13-pre;
 
   paperwork-backend = buildPythonPackage rec {
     name = "paperwork-backend-${version}";
@@ -10882,26 +10798,9 @@ in {
     };
   };
 
-  feedgenerator = buildPythonPackage (rec {
-    name = "feedgenerator-1.7";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/f/feedgenerator/${name}.tar.gz";
-      sha256 = "5d6b0b10134ac392be0c0c3a39c0e1d7e9c17cc7894590f75981e3f497a4a60f";
-    };
-
-    buildInputs = [ pkgs.glibcLocales ];
-
-    LC_ALL="en_US.UTF-8";
-
-    propagatedBuildInputs = with self; [ six pytz ];
-
-    meta = {
-      description = "Standalone version of django.utils.feedgenerator,  compatible with Py3k";
-      homepage = https://github.com/dmdm/feedgenerator-py3k.git;
-      maintainers = with maintainers; [ garbas ];
-    };
-  });
+  feedgenerator = callPackage ../development/python-modules/feedgenerator {
+    inherit (pkgs) glibcLocales;
+  };
 
   feedparser = buildPythonPackage (rec {
     name = "feedparser-5.2.1";
@@ -11030,27 +10929,7 @@ in {
     };
   };
 
-  flake8 = buildPythonPackage rec {
-    name = "flake8-${version}";
-    version = "3.2.1";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/f/flake8/${name}.tar.gz";
-      sha256 = "c7c460b5aff3a2063c798a77af18ec70af3941d35a22e2e76965e3c0e0b36055";
-    };
-
-    buildInputs = with self; [ pytest mock pytestrunner ];
-    propagatedBuildInputs = with self; [ pyflakes pycodestyle mccabe ]
-      ++ optionals (pythonOlder "3.4") [ enum34 ]
-      ++ optionals (pythonOlder "3.2") [ configparser ];
-
-    meta = {
-      description = "Code checking using pep8 and pyflakes";
-      homepage = http://pypi.python.org/pypi/flake8;
-      license = licenses.mit;
-      maintainers = with maintainers; [ garbas ];
-    };
-  };
+  flake8 = callPackage ../development/python-modules/flake8 { };
 
   flake8-blind-except = callPackage ../development/python-modules/flake8-blind-except { };
 
@@ -13917,23 +13796,7 @@ in {
   };
 
 
-  mccabe = buildPythonPackage (rec {
-    name = "mccabe-0.5.3";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/m/mccabe/${name}.tar.gz";
-      sha256 = "16293af41e7242031afd73896fef6458f4cad38201d21e28f344fff50ae1c25e";
-    };
-
-    buildInputs = with self; [ pytestrunner pytest ];
-
-    meta = {
-      description = "McCabe checker, plugin for flake8";
-      homepage = "https://github.com/flintwork/mccabe";
-      license = licenses.mit;
-      maintainers = with maintainers; [ garbas ];
-    };
-  });
+  mccabe = callPackage ../development/python-modules/mccabe { };
 
   mechanize = buildPythonPackage (rec {
     name = "mechanize-0.2.5";
@@ -17990,52 +17853,8 @@ in {
     };
   };
 
-  pelican = buildPythonPackage rec {
-    name = "pelican-${version}";
-    version = "3.6.3";
-    disabled = isPy26;
-
-    src = pkgs.fetchFromGitHub {
-      owner = "getpelican";
-      repo = "pelican";
-      rev = version;
-      sha256 = "1k572anw39rws67mvxl2w6y93y8w8q5smnwc0dd2gnnr16cc2vsh";
-    };
-
-    patches = [ ../development/python-modules/pelican-fix-tests-with-pygments-2.1.patch ];
-
-    # There's still some failing tests due to pygments 2.1.3
-    doCheck = false;
-
-    buildInputs = with self; [
-      pkgs.glibcLocales
-      pkgs.pandoc
-      pkgs.git
-      mock
-      nose
-      markdown
-      beautifulsoup4
-      lxml
-      typogrify
-    ];
-
-    propagatedBuildInputs = with self; [
-      jinja2 pygments docutils pytz unidecode six dateutil feedgenerator
-      blinker pillow beautifulsoup4 markupsafe
-    ];
-
-    postPatch= ''
-      sed -i -e "s|'git'|'${pkgs.git}/bin/git'|" pelican/tests/test_pelican.py
-    '';
-
-    LC_ALL="en_US.UTF-8";
-
-    meta = {
-      description = "A tool to generate a static blog from reStructuredText or Markdown input files";
-      homepage = "http://getpelican.com/";
-      license = licenses.agpl3;
-      maintainers = with maintainers; [ offline prikhi garbas ];
-    };
+  pelican = callPackage ../development/python-modules/pelican {
+    inherit (pkgs) glibcLocales pandoc git;
   };
 
   pep8 = buildPythonPackage rec {
@@ -19752,28 +19571,7 @@ in {
     };
   };
 
-  pyflakes = buildPythonPackage rec {
-    pname = "pyflakes";
-    version = "1.3.0";
-    name = "${pname}-${version}";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
-      sha256 = "a4f93317c97a9d9ed71d6ecfe08b68e3de9fea3f4d94dcd1d9d83ccbf929bc31";
-    };
-
-    buildInputs = with self; [ unittest2 ];
-
-    doCheck = !isPyPy;
-    force-rebuild = 1;  # fix transient test suite error at http://hydra.nixos.org/build/45083762
-
-    meta = {
-      homepage = https://launchpad.net/pyflakes;
-      description = "A simple program which checks Python source files for errors";
-      license = licenses.mit;
-      maintainers = with maintainers; [ garbas ];
-    };
-  };
+  pyflakes = callPackage ../development/python-modules/pyflakes { };
 
   pyftgl = buildPythonPackage rec {
     name = "pyftgl-0.4b";
diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix
index 1e764ef00727..c81d65ad0e03 100644
--- a/pkgs/top-level/release-cross.nix
+++ b/pkgs/top-level/release-cross.nix
@@ -24,7 +24,7 @@ let
   };
 
   linuxCommon = lib.recursiveUpdate gnuCommon {
-    buildPackages.gdbCross = nativePlatforms;
+    buildPackages.gdb = nativePlatforms;
 
     bison = nativePlatforms;
     busybox = nativePlatforms;
@@ -59,8 +59,8 @@ in
     # there probably a good idea to try to be "more parametric" --- i.e. avoid
     # any special casing.
     crossSystem = {
-      config = "foosys";
-      libc = "foolibc";
+      config = "mips64el-apple-windows-gnu";
+      libc = "glibc";
     };
 
     # Converting to a string (drv path) before checking equality is probably a