about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/instant-messengers
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-26 18:06:19 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-26 18:21:18 +0000
commit7ac6743433dd45ceaead2ca96f6356dc0d064ce6 (patch)
treeb68ec89d7d2a8d2b6e6b1ff94ba26d6af4096350 /nixpkgs/pkgs/applications/networking/instant-messengers
parentc5c7451dbef37b51f52792d6395a670ef5183d27 (diff)
parent891f607d5301d6730cb1f9dcf3618bcb1ab7f10e (diff)
downloadnixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.gz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.bz2
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.lz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.xz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.zst
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.zip
Merge commit '891f607d5301d6730cb1f9dcf3618bcb1ab7f10e'
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/instant-messengers')
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/SkypeExport/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/baresip/default.nix16
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-discord/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-facebook/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-mastodon/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-steam/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee/plugins.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/blink/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/bluejeans/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/centerim/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/chatterino2/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/cordless/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/coyim/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/discord/base.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/element/element-desktop.nix14
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/element/element-web.nix10
-rwxr-xr-xnixpkgs/pkgs/applications/networking/instant-messengers/element/update-element-desktop.sh8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/ferdi/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/fractal/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/franz/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/freetalk/default.nix10
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/gitter/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/gomuks/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/gomuks/hardcoded_path.patch13
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/gtmess/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/hipchat/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/jitsi/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/composition.nix5
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/node-env.nix46
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/matrixcli/default.nix14
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/mcabber/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/mikutter/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/mikutter/gemset.nix2
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/mirage/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/mm/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/neochat/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/nheko/default.nix18
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/carbons/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/msn-pecan/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/otr/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-mra/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-opensteamworks/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-osd/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-skypeweb/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-xmpp-receipts/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-discord/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-facebook/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-hangouts/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-lurch/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-matrix/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-plugin-pack/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-slack/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-vk-plugin/default.nix9
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-xmpp-http-upload/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/skype4pidgin/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/telegram-purple/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/tox-prpl/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/window-merge/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pidgin/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/poezio/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pond/default.nix14
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/profanity/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/psi/default.nix1
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/qtox/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/rambox/default.nix44
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/rambox/pro.nix55
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/rambox/rambox.nix30
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/ratox/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/ricochet/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/ring-daemon/default.nix12
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/ring-daemon/restbed.nix11
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/salut-a-toi/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/salut-a-toi/requirements.nix12
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/scudcloud/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/silc-client/default.nix14
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/slack-term/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/slack/default.nix14
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/stride/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/swift-im/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/tangram/default.nix56
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/teamspeak/client.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/teamspeak/server.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/gabble/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/haze/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/idle/default.nix12
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/salut/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/tensor/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/torchat/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/toxic/default.nix10
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/turses/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/twinkle/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/utox/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/vacuum/default.nix4
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/viber/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/wavebox/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix2
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/xmpp-client/default.nix6
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/ytalk/default.nix8
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/zoom-us/default.nix194
116 files changed, 614 insertions, 564 deletions
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/SkypeExport/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/SkypeExport/default.nix
index f5ec3d7b6bd0..bab9d12123df 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/SkypeExport/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/SkypeExport/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake, boost166 }:
+{ lib, stdenv, fetchFromGitHub, cmake, boost166 }:
 
 stdenv.mkDerivation rec {
   pname = "SkypeExport";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   preConfigure = "cd src/SkypeExport/_gccbuild/linux";
   installPhase = "install -Dt $out/bin SkypeExport";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Export Skype history to HTML";
     homepage = "https://github.com/Temptin/SkypeExport";
     license = licenses.gpl2;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/baresip/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/baresip/default.nix
index c3479d1ee698..e3a8e682577a 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/baresip/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/baresip/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, zlib, openssl, libre, librem, pkgconfig, gst_all_1
+{ lib, stdenv, fetchurl, zlib, openssl, libre, librem, pkg-config, gst_all_1
 , cairo, mpg123, alsaLib, SDL, libv4l, celt, libsndfile, srtp, ffmpeg_3
 , gsm, speex, portaudio, spandsp, libuuid, libvpx
 }:
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     url = "http://www.creytiv.com/pub/baresip-${version}.tar.gz";
     sha256 = "13di0ycdcr2q2a20mjvyaqfmvk5xldwqaxklqsz7470jnbc5n0rb";
   };
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [zlib openssl libre librem cairo mpg123
     alsaLib SDL libv4l celt libsndfile srtp ffmpeg_3 gsm speex portaudio spandsp libuuid
     libvpx
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
     "LIBRE_INC=${libre}/include/re"
     "LIBRE_SO=${libre}/lib"
     "LIBREM_PATH=${librem}"
-    ''PREFIX=$(out)''
+    "PREFIX=$(out)"
     "USE_VIDEO=1"
     "CCACHE_DISABLE=1"
 
@@ -33,8 +33,8 @@ stdenv.mkDerivation rec {
     "USE_BV32=" "USE_COREAUDIO=" "USE_G711=1" "USE_G722=1" "USE_G722_1="
     "USE_ILBC=" "USE_OPUS=" "USE_SILK="
   ]
-  ++ stdenv.lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
-  ++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}"
+  ++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
+  ++ lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}"
   ;
 
   NIX_CFLAGS_COMPILE='' -I${librem}/include/rem -I${gsm}/include/gsm
@@ -42,9 +42,9 @@ stdenv.mkDerivation rec {
     -D__need_timeval -D__need_timespec -D__need_time_t '';
   meta = {
     homepage = "http://www.creytiv.com/baresip.html";
-    platforms = with stdenv.lib.platforms; linux;
-    maintainers = with stdenv.lib.maintainers; [raskin];
-    license = stdenv.lib.licenses.bsd3;
+    platforms = with lib.platforms; linux;
+    maintainers = with lib.maintainers; [raskin];
+    license = lib.licenses.bsd3;
     inherit version;
     downloadPage = "http://www.creytiv.com/pub/";
     updateWalker = true;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-discord/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-discord/default.nix
index c4d780d9ea2c..543a5f52c979 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-discord/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-discord/default.nix
@@ -1,6 +1,6 @@
-{ fetchFromGitHub, stdenv, bitlbee, autoreconfHook, pkgconfig, glib }:
+{ lib, fetchFromGitHub, stdenv, bitlbee, autoreconfHook, pkg-config, glib }:
 
-with stdenv.lib;
+with lib;
 stdenv.mkDerivation rec {
   pname = "bitlbee-discord";
   version = "0.4.3";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
     sha256 = "00qgdvrp7hv02n0ns685igp810zxmv3adsama8601122al6x041n";
   };
 
-  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
   buildInputs = [ bitlbee ];
 
   preConfigure = ''
@@ -27,6 +27,6 @@ stdenv.mkDerivation rec {
     homepage = "https://github.com/sm00th/bitlbee-discord";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ lassulus jb55 ];
-    platforms = stdenv.lib.platforms.linux;
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-facebook/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-facebook/default.nix
index 1a8110acacb9..8023c70fe5fd 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-facebook/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-facebook/default.nix
@@ -1,6 +1,6 @@
-{ fetchFromGitHub, stdenv, bitlbee, autoconf, automake, libtool, pkgconfig, glib, json-glib }:
+{ lib, fetchFromGitHub, stdenv, bitlbee, autoconf, automake, libtool, pkg-config, glib, json-glib }:
 
-with stdenv.lib;
+with lib;
 stdenv.mkDerivation rec {
   pname = "bitlbee-facebook";
   version = "1.2.1";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
     sha256 = "1yjhjhk3jzjip13lq009vlg84lm2lzwhac5jy0aq3vkcz6rp94rc";
   };
 
-  nativeBuildInputs = [ autoconf automake libtool pkgconfig ];
+  nativeBuildInputs = [ autoconf automake libtool pkg-config ];
 
   buildInputs = [ bitlbee json-glib ];
 
@@ -26,6 +26,6 @@ stdenv.mkDerivation rec {
 
     homepage = "https://github.com/bitlbee/bitlbee-facebook";
     license = licenses.gpl2Plus;
-    platforms = stdenv.lib.platforms.linux;
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-mastodon/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-mastodon/default.nix
index 411cd789275b..f1b2df658a6b 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-mastodon/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-mastodon/default.nix
@@ -1,6 +1,6 @@
-{ fetchgit, stdenv, bitlbee, autoreconfHook, pkgconfig, glib }:
+{ lib, fetchgit, stdenv, bitlbee, autoreconfHook, pkg-config, glib }:
 
-with stdenv.lib;
+with lib;
 stdenv.mkDerivation rec {
   pname = "bitlbee-mastodon";
   version = "1.4.4";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "0a8196pyr6bjnqg82zn7jdhiv7xsg4npbpzalla1i2h99j30q8pk";
   };
 
-  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
   buildInputs = [ bitlbee ];
 
   preConfigure = ''
@@ -24,6 +24,6 @@ stdenv.mkDerivation rec {
     homepage = "https://alexschroeder.ch/cgit/bitlbee-mastodon/about";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ jpotier ];
-    platforms = stdenv.lib.platforms.linux;
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-steam/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-steam/default.nix
index 8cb7f6c37c43..14464247659c 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-steam/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee-steam/default.nix
@@ -1,6 +1,6 @@
-{ fetchFromGitHub, stdenv, bitlbee, autoconf, automake, libtool, pkgconfig, glib, libgcrypt }:
+{ lib, fetchFromGitHub, stdenv, bitlbee, autoconf, automake, libtool, pkg-config, glib, libgcrypt }:
 
-with stdenv.lib;
+with lib;
 stdenv.mkDerivation rec {
   version = "1.4.2";
   pname = "bitlbee-steam";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
     sha256 = "121r92mgwv445wwxzh35n19fs5k81ihr0j19k256ia5502b1xxaq";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ bitlbee autoconf automake libtool libgcrypt ];
 
   preConfigure = ''
@@ -25,6 +25,6 @@ stdenv.mkDerivation rec {
 
     homepage = "https://github.com/jgeboski/bitlbee-steam";
     license = licenses.gpl2Plus;
-    platforms = stdenv.lib.platforms.linux;
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee/default.nix
index 7b1256b657a7..1a83a04a1fa8 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee/default.nix
@@ -1,9 +1,9 @@
-{ fetchurl, fetchpatch, stdenv, gnutls, glib, pkgconfig, check, libotr, python
+{ lib, fetchurl, fetchpatch, stdenv, gnutls, glib, pkg-config, check, libotr, python
 , enableLibPurple ? false, pidgin ? null
 , enablePam ? false, pam ? null
 }:
 
-with stdenv.lib;
+with lib;
 stdenv.mkDerivation rec {
   name = "bitlbee-3.6";
 
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
     sha256 = "0zhhcbcr59sx9h4maf8zamzv2waya7sbsl7w74gbyilvy93dw5cz";
   };
 
-  nativeBuildInputs = [ pkgconfig ] ++ optional doCheck check;
+  nativeBuildInputs = [ pkg-config ] ++ optional doCheck check;
 
   buildInputs = [ gnutls libotr python ]
     ++ optional enableLibPurple pidgin
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee/plugins.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee/plugins.nix
index 4e05e7cae970..ad68fcb4b79d 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee/plugins.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/bitlbee/plugins.nix
@@ -1,6 +1,6 @@
-{ stdenv, bitlbee }:
+{ lib, stdenv, bitlbee }:
 
-with stdenv.lib;
+with lib;
 
 plugins:
 
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/blink/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/blink/default.nix
index 28cc38360576..9dd6754af0cb 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/blink/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/blink/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchdarcs, pythonPackages, libvncserver, zlib
+{ lib, stdenv, fetchdarcs, pythonPackages, libvncserver, zlib
 , gnutls, libvpx, makeDesktopItem, mkDerivationWith }:
 
 mkDerivationWith pythonPackages.buildPythonApplication rec {
@@ -58,7 +58,7 @@ mkDerivationWith pythonPackages.buildPythonApplication rec {
     )
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://icanblink.com/";
     description = "A state of the art, easy to use SIP client for Voice, Video and IM";
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/bluejeans/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/bluejeans/default.nix
index 5e3f0bdb5d63..2360b2442f54 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/bluejeans/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/bluejeans/default.nix
@@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ rpmextract makeWrapper ];
 
   libPath =
-    stdenv.lib.makeLibraryPath
+    lib.makeLibraryPath
       [
         libnotify
         libuuid
@@ -116,7 +116,7 @@ stdenv.mkDerivation rec {
     patchShebangs "$out"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Video, audio, and web conferencing that works together with the collaboration tools you use every day";
     homepage = "https://www.bluejeans.com";
     license = licenses.unfree;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/centerim/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/centerim/default.nix
index 52d8178764c5..78178f0021e2 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/centerim/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/centerim/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, gnused, openssl, curl, ncurses, libjpeg
+{ lib, stdenv, fetchurl, gnused, openssl, curl, ncurses, libjpeg
 , withGpg ? true, gpgme ? null}:
 
 stdenv.mkDerivation rec {
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   CXXFLAGS = "-std=gnu++98";
 
   buildInputs = [ openssl curl ncurses libjpeg ]
-    ++ stdenv.lib.optional withGpg gpgme;
+    ++ lib.optional withGpg gpgme;
 
   preConfigure = ''
     ${gnused}/bin/sed -i '1,1i#include <stdio.h>' libicq2000/libicq2000/sigslot.h
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://www.centerim.org/";
     description = "Fork of CenterICQ, a curses instant messaging program";
-    license = stdenv.lib.licenses.gpl2Plus;
-    platforms = with stdenv.lib.platforms; linux;
+    license = lib.licenses.gpl2Plus;
+    platforms = with lib.platforms; linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/chatterino2/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/chatterino2/default.nix
index 617c02de2635..f9789cfda418 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/chatterino2/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/chatterino2/default.nix
@@ -1,4 +1,4 @@
-{ mkDerivation, stdenv, lib, pkgconfig, fetchFromGitHub, qtbase, qtsvg, qtmultimedia, qmake, boost, openssl, wrapQtAppsHook }:
+{ mkDerivation, stdenv, lib, pkg-config, fetchFromGitHub, qtbase, qtsvg, qtmultimedia, qmake, boost, openssl, wrapQtAppsHook }:
 
 mkDerivation rec {
   pname = "chatterino2";
@@ -10,7 +10,7 @@ mkDerivation rec {
     sha256 = "026cs48hmqkv7k4akbm205avj2pn3x1g7q46chwa707k9km325dz";
     fetchSubmodules = true;
   };
-  nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
+  nativeBuildInputs = [ qmake pkg-config wrapQtAppsHook ];
   buildInputs = [ qtbase qtsvg qtmultimedia boost openssl ];
   postInstall = lib.optionalString stdenv.isDarwin ''
     mkdir -p "$out/Applications"
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/cordless/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/cordless/default.nix
index d3633e2245ff..5d95eddb6b63 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/cordless/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/cordless/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildGoModule, fetchFromGitHub }:
+{ lib, stdenv, buildGoModule, fetchFromGitHub }:
 
 buildGoModule rec {
   pname = "cordless";
@@ -15,7 +15,7 @@ buildGoModule rec {
 
   vendorSha256 = "01anbhwgwam70dymcmvkia1xpw48658rq7wv4m7fiavxvnli6z2y";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/Bios-Marcel/cordless";
     description = "Discord terminal client";
     license = licenses.bsd3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/coyim/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/coyim/default.nix
index 67c2a0db2372..0de7e264ec41 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/coyim/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/coyim/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildGoPackage, fetchFromGitHub, pkgconfig,
+{ lib, stdenv, buildGoPackage, fetchFromGitHub, pkg-config,
   cairo, gdk-pixbuf, glib, gnome3, wrapGAppsHook, gtk3 }:
 
 buildGoPackage rec {
@@ -14,11 +14,11 @@ buildGoPackage rec {
     sha256 = "1g8nf56j17rdhhj7pv3ha1rb2mfc0mdvyzl35pgcki08w7iw08j3";
   };
 
-  nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
+  nativeBuildInputs = [ pkg-config wrapGAppsHook ];
 
   buildInputs = [ glib cairo gdk-pixbuf gtk3 gnome3.adwaita-icon-theme ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "a safe and secure chat client";
     homepage = "https://coy.im/";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
index 03508c2ffb53..0474f21a2b92 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub
-, vala, cmake, ninja, wrapGAppsHook, pkgconfig, gettext
+, vala, cmake, ninja, wrapGAppsHook, pkg-config, gettext
 , gobject-introspection, gnome3, glib, gdk-pixbuf, gtk3, glib-networking
 , xorg, libXdmcp, libxkbcommon
 , libnotify, libsoup, libgee
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
     vala
     cmake
     ninja
-    pkgconfig
+    pkg-config
     wrapGAppsHook
     gettext
   ];
@@ -79,7 +79,7 @@ stdenv.mkDerivation rec {
     done
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Modern Jabber/XMPP Client using GTK/Vala";
     homepage = "https://github.com/dino/dino";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/discord/base.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/discord/base.nix
index 46c0cbef669e..e4c588e6c18e 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/discord/base.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/discord/base.nix
@@ -1,5 +1,5 @@
 { pname, version, src, binaryName, desktopName
-, autoPatchelfHook, fetchurl, makeDesktopItem, stdenv, wrapGAppsHook
+, autoPatchelfHook, fetchurl, makeDesktopItem, lib, stdenv, wrapGAppsHook
 , alsaLib, at-spi2-atk, at-spi2-core, atk, cairo, cups, dbus, expat, fontconfig
 , freetype, gdk-pixbuf, glib, gtk3, libcxx, libdrm, libnotify, libpulseaudio, libuuid
 , libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
@@ -29,7 +29,7 @@ in stdenv.mkDerivation rec {
 
   dontWrapGApps = true;
 
-  libPath = stdenv.lib.makeLibraryPath [
+  libPath = lib.makeLibraryPath [
     libcxx systemd libpulseaudio
     stdenv.cc.cc alsaLib atk at-spi2-atk at-spi2-core cairo cups dbus expat fontconfig freetype
     gdk-pixbuf glib gtk3 libnotify libX11 libXcomposite libuuid
@@ -69,7 +69,7 @@ in stdenv.mkDerivation rec {
 
   passthru.updateScript = ./update-discord.sh;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "All-in-one cross-platform voice and text chat for gamers";
     homepage = "https://discordapp.com/";
     downloadPage = "https://discordapp.com/download";
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json b/nixpkgs/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json
index 7a735e59dcbd..f6fa30e91e5b 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/element/element-desktop-package.json
@@ -2,7 +2,7 @@
   "name": "element-desktop",
   "productName": "Element",
   "main": "src/electron-main.js",
-  "version": "1.7.16",
+  "version": "1.7.17",
   "description": "A feature-rich client for Matrix.org",
   "author": "Element",
   "repository": {
@@ -57,12 +57,12 @@
     "tar": "^6.0.1"
   },
   "hakDependencies": {
-    "matrix-seshat": "^2.2.1",
+    "matrix-seshat": "^2.2.3",
     "keytar": "^5.6.0"
   },
   "build": {
     "appId": "im.riot.app",
-    "electronVersion": "10.1.6",
+    "electronVersion": "10.2.0",
     "files": [
       "package.json",
       {
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/element/element-desktop.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
index b6dfac397a11..fcd06326e213 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/element/element-desktop.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchFromGitHub
+{ lib, stdenv, fetchFromGitHub
 , makeWrapper, makeDesktopItem, mkYarnPackage
-, electron_9, element-web
+, electron, element-web
 }:
 # Notes for maintainers:
 # * versions of `element-web` and `element-desktop` should be kept in sync.
@@ -8,15 +8,13 @@
 
 let
   executableName = "element-desktop";
-  version = "1.7.16";
+  version = "1.7.17";
   src = fetchFromGitHub {
     owner = "vector-im";
     repo = "element-desktop";
     rev = "v${version}";
-    sha256 = "sha256-mdHsw1Vi+2hrAF7biX3pJqfRaZU2lpw9zUZdcCm717g=";
+    sha256 = "sha256-3GFfldQoD5plIeuAOd4OcB/q7m8tKU6so+M8MlB6Uuc=";
   };
-  electron = electron_9;
-
 in mkYarnPackage rec {
   name = "element-desktop-${version}";
   inherit version src;
@@ -57,7 +55,7 @@ in mkYarnPackage rec {
   '';
 
   # The desktop item properties should be kept in sync with data from upstream:
-  # https://github.com/vector-im/riot-desktop/blob/develop/package.json
+  # https://github.com/vector-im/element-desktop/blob/develop/package.json
   desktopItem = makeDesktopItem {
     name = "element-desktop";
     exec = "${executableName} %u";
@@ -72,7 +70,7 @@ in mkYarnPackage rec {
     '';
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A feature-rich client for Matrix.org";
     homepage = "https://element.io/";
     license = licenses.asl20;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/element/element-web.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/element/element-web.nix
index 527af7a4de06..173977155e81 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/element/element-web.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/element/element-web.nix
@@ -12,11 +12,11 @@ let
 
 in stdenv.mkDerivation rec {
   pname = "element-web";
-  version = "1.7.16";
+  version = "1.7.17";
 
   src = fetchurl {
     url = "https://github.com/vector-im/element-web/releases/download/v${version}/element-v${version}.tar.gz";
-    sha256 = "sha256-/KLTD7IvIp1f1dSUEMMCoknQzZarcP2wDM211h+OJMM=";
+    sha256 = "sha256-9DyA3h0sQCzOFZ9gEReJrMQOnygFvEB7PeIpkG/F5H4=";
   };
 
   installPhase = ''
@@ -32,9 +32,9 @@ in stdenv.mkDerivation rec {
   meta = {
     description = "A glossy Matrix collaboration client for the web";
     homepage = "https://element.io/";
-    maintainers = stdenv.lib.teams.matrix.members;
-    license = stdenv.lib.licenses.asl20;
-    platforms = stdenv.lib.platforms.all;
+    maintainers = lib.teams.matrix.members;
+    license = lib.licenses.asl20;
+    platforms = lib.platforms.all;
     hydraPlatforms = [];
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/element/update-element-desktop.sh b/nixpkgs/pkgs/applications/networking/instant-messengers/element/update-element-desktop.sh
index ecca3018e76f..69d0d3d70728 100755
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/element/update-element-desktop.sh
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/element/update-element-desktop.sh
@@ -4,12 +4,12 @@
 set -euo pipefail
 
 if [ "$#" -ne 1 ] || [[ "$1" == -* ]]; then
-	echo "Regenerates the Yarn dependency lock files for the element-desktop package."
-	echo "Usage: $0 <git release tag>"
-	exit 1
+  echo "Regenerates the Yarn dependency lock files for the element-desktop package."
+  echo "Usage: $0 <git release tag>"
+  exit 1
 fi
 
-RIOT_WEB_SRC="https://raw.githubusercontent.com/vector-im/riot-desktop/$1"
+RIOT_WEB_SRC="https://raw.githubusercontent.com/vector-im/element-desktop/$1"
 
 wget "$RIOT_WEB_SRC/package.json" -O element-desktop-package.json
 wget "$RIOT_WEB_SRC/yarn.lock" -O element-desktop-yarndeps.lock
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/ferdi/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/ferdi/default.nix
index 190050d8327b..458808c832da 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/ferdi/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/ferdi/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, mkFranzDerivation, fetchurl }:
+{ lib, stdenv, mkFranzDerivation, fetchurl }:
 
 mkFranzDerivation rec {
   pname = "ferdi";
@@ -8,7 +8,7 @@ mkFranzDerivation rec {
     url = "https://github.com/getferdi/ferdi/releases/download/v${version}/ferdi_${version}_amd64.deb";
     sha256 = "0i24vcnq4iz5amqmn2fgk92ff9x9y7fg8jhc3g6ksvmcfly7af3k";
   };
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Combine your favorite messaging services into one application";
     homepage = "https://getferdi.com/";
     license = licenses.free;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/fractal/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/fractal/default.nix
index bc6dbc5ce193..14cf45e97bbd 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/fractal/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/fractal/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromGitLab
 , nix-update-script
 , fetchpatch
@@ -88,7 +88,7 @@ rustPlatform.buildRustPackage rec {
     };
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Matrix group messaging app";
     homepage = "https://gitlab.gnome.org/GNOME/fractal";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/franz/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/franz/default.nix
index 646a790fed25..a72ff17abcd4 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/franz/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/franz/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, mkFranzDerivation, fetchurl }:
+{ lib, stdenv, mkFranzDerivation, fetchurl }:
 
 mkFranzDerivation rec {
   pname = "franz";
@@ -8,7 +8,7 @@ mkFranzDerivation rec {
     url = "https://github.com/meetfranz/franz/releases/download/v${version}/franz_${version}_amd64.deb";
     sha256 = "1gn0n1hr6z2gsdnpxysyq6sm8y7cjr9jafhsam8ffw0bq74kph7p";
   };
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A free messaging app that combines chat & messaging services into one application";
     homepage = "https://meetfranz.com";
     license = licenses.free;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/freetalk/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/freetalk/default.nix
index e24ac2e18317..4c28e346a124 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/freetalk/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/freetalk/default.nix
@@ -1,11 +1,11 @@
-{ stdenv, fetchFromGitHub
-, guile, pkgconfig, glib, loudmouth, gmp, libidn, readline, libtool
+{ lib, stdenv, fetchFromGitHub
+, guile, pkg-config, glib, loudmouth, gmp, libidn, readline, libtool
 , libunwind, ncurses, curl, jansson, texinfo
 , automake, autoconf }:
 stdenv.mkDerivation rec {
   pname = "freetalk";
   version = "4.1";
-  
+
   src = fetchFromGitHub {
     owner = "GNUFreetalk";
     repo = "freetalk";
@@ -17,13 +17,13 @@ stdenv.mkDerivation rec {
     ./autogen.sh
   '';
 
-  nativeBuildInputs = [ pkgconfig texinfo autoconf automake ];
+  nativeBuildInputs = [ pkg-config texinfo autoconf automake ];
   buildInputs = [
     guile glib loudmouth gmp libidn readline libtool
     libunwind ncurses curl jansson
   ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description =  "Console XMPP client";
     license = licenses.gpl3Plus ;
     maintainers = with maintainers; [ raskin ];
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/gitter/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/gitter/default.nix
index 69a198480668..6fe0e3b13b27 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/gitter/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/gitter/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, alsaLib, atk, at-spi2-core, cairo, cups, dbus, dpkg, expat, fetchurl
+{ lib, stdenv, alsaLib, atk, at-spi2-core, cairo, cups, dbus, dpkg, expat, fetchurl
 , fontconfig, freetype, gdk-pixbuf, glib, gnome2, gtk3,  libdrm, libX11
 , libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext, libXfixes
 , libXi, libXrandr, libXrender, libXtst, libappindicator-gtk3, libcxx
@@ -6,7 +6,7 @@
 , pango, systemd }:
 
 let gitterDirectorySuffix = "opt/gitter";
-   libPath = stdenv.lib.makeLibraryPath [
+   libPath = lib.makeLibraryPath [
      alsaLib
      atk
      at-spi2-core
@@ -92,7 +92,7 @@ in stdenv.mkDerivation rec {
     categories = "Network;InstantMessaging;";
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Where developers come to talk";
     downloadPage = "https://gitter.im/apps";
     license = licenses.mit;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/gomuks/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/gomuks/default.nix
index 00134e2597be..a2d12124dbf1 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/gomuks/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/gomuks/default.nix
@@ -1,21 +1,38 @@
-{ stdenv, buildGoModule, fetchFromGitHub, olm, makeDesktopItem }:
+{ lib
+, stdenv
+, substituteAll
+, buildGoModule
+, fetchFromGitHub
+, makeDesktopItem
+, makeWrapper
+, libnotify
+, olm
+, pulseaudio
+, sound-theme-freedesktop
+}:
 
 buildGoModule rec {
   pname = "gomuks";
-  version = "0.2.1";
+  version = "0.2.2";
 
   src = fetchFromGitHub {
     owner = "tulir";
     repo = pname;
-    rev = "v" + version;
-    sha256 = "0xa4ch4p48w6sd0f4s1sp0hl1w4fvzhff7w2ar19ki0ydy5g368n";
+    rev = "v${version}";
+    sha256 = "169xyd44jyfh5njwmhsmkah8njfgnp9q9c2b13p0ry5saicwm5h5";
   };
 
-  vendorSha256 = "1rhvwk8bdbbffhx2d03a8p9jc5c8v3pi7kw1dmyyngz6p7wq1g0x";
+  vendorSha256 = "1l8qnz0qy90zpywfx7pbkqpxg7rkvc9j622zcmkf38kdc1z6w20a";
 
   doCheck = false;
 
-  buildInputs = [ olm ];
+  buildInputs = [ makeWrapper olm ];
+
+  # Upstream issue: https://github.com/tulir/gomuks/issues/260
+  patches = lib.optional stdenv.isLinux (substituteAll {
+    src = ./hardcoded_path.patch;
+    soundTheme = sound-theme-freedesktop;
+  });
 
   postInstall = ''
     cp -r ${
@@ -30,13 +47,15 @@ buildGoModule rec {
       }
     }/* $out/
     substituteAllInPlace $out/share/applications/*
+    wrapProgram $out/bin/gomuks \
+      --prefix PATH : "${lib.makeBinPath (lib.optionals stdenv.isLinux [ libnotify pulseaudio ])}"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://maunium.net/go/gomuks/";
     description = "A terminal based Matrix client written in Go";
     license = licenses.gpl3;
-    maintainers = with maintainers; [ tilpner emily ];
+    maintainers = with maintainers; [ charvp emily ];
     platforms = platforms.unix;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/gomuks/hardcoded_path.patch b/nixpkgs/pkgs/applications/networking/instant-messengers/gomuks/hardcoded_path.patch
new file mode 100644
index 000000000000..0e0d4e28b0a1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/gomuks/hardcoded_path.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/notification/notify_linux.go b/lib/notification/notify_linux.go
+index f93a95f..da6a61d 100644
+--- a/lib/notification/notify_linux.go
++++ b/lib/notification/notify_linux.go
+@@ -32,7 +32,7 @@ func Send(title, text string, critical, sound bool) error {
+ 		if critical {
+ 			soundName = "complete"
+ 		}
+-		exec.Command("paplay", "/usr/share/sounds/freedesktop/stereo/"+soundName+".oga").Run()
++		exec.Command("paplay", "@soundTheme@/share/sounds/freedesktop/stereo/"+soundName+".oga").Run()
+ 	}
+ 	return exec.Command("notify-send", args...).Run()
+ }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/gtmess/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/gtmess/default.nix
index 0661e6d7525e..fec5462c47a7 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/gtmess/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/gtmess/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, ncurses, openssl, tcl, tk}:
+{lib, stdenv, fetchurl, ncurses, openssl, tcl, tk}:
 
 stdenv.mkDerivation {
   name = "gtmess-0.97";
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
   meta = {
     description = "Console MSN Messenger client for Linux and other unix systems";
     homepage = "http://gtmess.sourceforge.net/";
-    license = stdenv.lib.licenses.gpl2Plus;
-    platforms = with stdenv.lib.platforms; linux;
+    license = lib.licenses.gpl2Plus;
+    platforms = with lib.platforms; linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/hipchat/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/hipchat/default.nix
index 63cbb69b187d..323a2521b0fd 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/hipchat/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/hipchat/default.nix
@@ -1,11 +1,11 @@
-{ stdenv, fetchurl, xorg, freetype, fontconfig, openssl, glib, nss, nspr, expat
+{ lib, stdenv, fetchurl, xorg, freetype, fontconfig, openssl, glib, nss, nspr, expat
 , alsaLib, dbus, zlib, libxml2, libxslt, makeWrapper, xkeyboard_config, systemd
 , libGL, xcbutilkeysyms, xdg_utils, libtool }:
 
 let
   version = "4.30.5.1682";
 
-  rpath = stdenv.lib.makeLibraryPath [
+  rpath = lib.makeLibraryPath [
     xdg_utils
     xorg.libXext
     xorg.libSM
@@ -78,7 +78,7 @@ in stdenv.mkDerivation {
       --set QT_PLUGIN_PATH "$d/plugins"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Desktop client for HipChat services";
     homepage = "http://www.hipchat.com";
     license = licenses.unfree;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix
index 4797bf5ffccb..7cb614f1d413 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/jitsi-meet-electron/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchurl
 , appimageTools
 , makeWrapper
@@ -47,10 +47,10 @@ stdenv.mkDerivation rec {
   postFixup = ''
     makeWrapper ${electron}/bin/electron $out/bin/${pname} \
       --add-flags $out/share/${pname}/resources/app.asar \
-      --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}"
+      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Jitsi Meet desktop application powered by Electron";
     homepage = "https://github.com/jitsi/jitsi-meet-electron";
     license = licenses.asl20;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/jitsi/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/jitsi/default.nix
index 938be9a9778d..5fa5c2a28641 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/jitsi/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/jitsi/default.nix
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ unzip ];
   buildInputs = [ ant jdk ];
 
-  buildPhase = ''ant make'';
+  buildPhase = "ant make";
 
   installPhase = ''
     mkdir -p $out
@@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
     done
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://jitsi.org/";
     description = "Open Source Video Calls and Chat";
     license = licenses.lgpl21Plus;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix
index 1344440eafc8..a3df74a00161 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix
@@ -36,7 +36,7 @@
 , openldap
 , ortp
 , pango
-, pkgconfig
+, pkg-config
 , python
 , qtbase
 , qtgraphicaleffects
@@ -125,7 +125,7 @@ mkDerivation rec {
     graphviz
     intltool
     makeWrapper
-    pkgconfig
+    pkg-config
   ];
 
   cmakeFlags = [
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/composition.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/composition.nix
index 92ddfe342982..2992bf22cb31 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/composition.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/composition.nix
@@ -6,12 +6,11 @@
 
 let
   nodeEnv = import ./node-env.nix {
-    inherit (pkgs) stdenv python2 util-linux runCommand writeTextFile;
+    inherit (pkgs) lib stdenv python2 util-linux runCommand writeTextFile;
     inherit nodejs;
     libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
   };
-locpkgs = 
-import ./node-packages.nix {
+locpkgs = import ./node-packages.nix {
   inherit (pkgs) fetchurl fetchgit;
   inherit nodeEnv;
   globalBuildInputs = [
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/default.nix
index 633219626b68..9e3527948818 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, pkgs }:
+{ lib, stdenv, pkgs }:
 (import ./composition.nix {
   inherit pkgs;
   inherit (stdenv.hostPlatform) system;
@@ -21,7 +21,7 @@
   meta = {
     description = "Matrix message recorder";
     homepage = "https://gitlab.com/argit/matrix-recorder/";
-    license = stdenv.lib.licenses.mit;
-    maintainers = [ stdenv.lib.maintainers.raskin ];
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.raskin ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/node-env.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/node-env.nix
index ff5ca0d99b19..e6131fe8e771 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/node-env.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/matrix-recorder/node-env.nix
@@ -1,6 +1,6 @@
 # This file originates from node2nix
 
-{stdenv, nodejs, python2, util-linux, libtool, runCommand, writeTextFile}:
+{lib, stdenv, nodejs, python2, util-linux, libtool, runCommand, writeTextFile}:
 
 let
   python = if nodejs ? python then nodejs.python else python2;
@@ -38,8 +38,8 @@ let
     };
 
   includeDependencies = {dependencies}:
-    stdenv.lib.optionalString (dependencies != [])
-      (stdenv.lib.concatMapStrings (dependency:
+    lib.optionalString (dependencies != [])
+      (lib.concatMapStrings (dependency:
         ''
           # Bundle the dependencies of the package
           mkdir -p node_modules
@@ -100,7 +100,7 @@ let
       cd "$DIR/${packageName}"
       ${includeDependencies { inherit dependencies; }}
       cd ..
-      ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
+      ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
     '';
 
   pinpointDependencies = {dependencies, production}:
@@ -161,12 +161,12 @@ let
     ''
       node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"}
 
-      ${stdenv.lib.optionalString (dependencies != [])
+      ${lib.optionalString (dependencies != [])
         ''
           if [ -d node_modules ]
           then
               cd node_modules
-              ${stdenv.lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies}
+              ${lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies}
               cd ..
           fi
         ''}
@@ -183,7 +183,7 @@ let
           cd "${packageName}"
           ${pinpointDependencies { inherit dependencies production; }}
           cd ..
-          ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
+          ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
       fi
     '';
 
@@ -344,8 +344,8 @@ let
         cd "${packageName}"
         runHook preRebuild
 
-        ${stdenv.lib.optionalString bypassCache ''
-          ${stdenv.lib.optionalString reconstructLock ''
+        ${lib.optionalString bypassCache ''
+          ${lib.optionalString reconstructLock ''
             if [ -f package-lock.json ]
             then
                 echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!"
@@ -361,14 +361,14 @@ let
           node ${addIntegrityFieldsScript}
         ''}
 
-        npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
+        npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} rebuild
 
         if [ "$dontNpmInstall" != "1" ]
         then
             # NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
             rm -f npm-shrinkwrap.json
 
-            npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
+            npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} install
         fi
     '';
 
@@ -396,8 +396,8 @@ let
     stdenv.mkDerivation ({
       name = "node_${name}-${version}";
       buildInputs = [ tarWrapper python nodejs ]
-        ++ stdenv.lib.optional (stdenv.isLinux) util-linux
-        ++ stdenv.lib.optional (stdenv.isDarwin) libtool
+        ++ lib.optional (stdenv.isLinux) util-linux
+        ++ lib.optional (stdenv.isDarwin) libtool
         ++ buildInputs;
 
       inherit dontStrip; # Stripping may fail a build for some package deployments
@@ -468,8 +468,8 @@ let
         name = "node-dependencies-${name}-${version}";
 
         buildInputs = [ tarWrapper python nodejs ]
-          ++ stdenv.lib.optional (stdenv.isLinux) util-linux
-          ++ stdenv.lib.optional (stdenv.isDarwin) libtool
+          ++ lib.optional (stdenv.isLinux) util-linux
+          ++ lib.optional (stdenv.isDarwin) libtool
           ++ buildInputs;
 
         inherit dontStrip; # Stripping may fail a build for some package deployments
@@ -489,7 +489,7 @@ let
           # Create fake package.json to make the npm commands work properly
           cp ${src}/package.json .
           chmod 644 package.json
-          ${stdenv.lib.optionalString bypassCache ''
+          ${lib.optionalString bypassCache ''
             if [ -f ${src}/package-lock.json ]
             then
                 cp ${src}/package-lock.json .
@@ -498,13 +498,13 @@ let
 
           # Go to the parent folder to make sure that all packages are pinpointed
           cd ..
-          ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
+          ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
 
           ${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
 
           # Expose the executables that were installed
           cd ..
-          ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
+          ${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
 
           mv ${packageName} lib
           ln -s $out/lib/node_modules/.bin $out/bin
@@ -514,7 +514,7 @@ let
     stdenv.mkDerivation {
       name = "node-shell-${name}-${version}";
 
-      buildInputs = [ python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) util-linux ++ buildInputs;
+      buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) util-linux ++ buildInputs;
       buildCommand = ''
         mkdir -p $out/bin
         cat > $out/bin/shell <<EOF
@@ -527,14 +527,14 @@ let
 
       # Provide the dependencies in a development shell through the NODE_PATH environment variable
       inherit nodeDependencies;
-      shellHook = stdenv.lib.optionalString (dependencies != []) ''
+      shellHook = lib.optionalString (dependencies != []) ''
         export NODE_PATH=$nodeDependencies/lib/node_modules
         export PATH="$nodeDependencies/bin:$PATH"
       '';
     };
 in
 {
-  buildNodeSourceDist = stdenv.lib.makeOverridable buildNodeSourceDist;
-  buildNodePackage = stdenv.lib.makeOverridable buildNodePackage;
-  buildNodeShell = stdenv.lib.makeOverridable buildNodeShell;
+  buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist;
+  buildNodePackage = lib.makeOverridable buildNodePackage;
+  buildNodeShell = lib.makeOverridable buildNodeShell;
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/matrixcli/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/matrixcli/default.nix
index 54b7ef2bd991..bca999f5762a 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/matrixcli/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/matrixcli/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit
+{ lib, stdenv, fetchgit
   , buildPythonApplication, buildPythonPackage
   , pygobject3, pytestrunner, requests, responses, pytest, python-olm
   , canonicaljson, olm
@@ -15,7 +15,7 @@ let
     name = "${pname}-${version}";
     pname = "matrix-python-sdk-matrixcli";
     version = "0.0.2019-08-15";
-    
+
     src = "${mainsrc}/matrix-python-sdk/";
 
     propagatedBuildInputs = [
@@ -27,9 +27,9 @@ let
     doInstallCheck = false;
 
     meta = {
-      license = stdenv.lib.licenses.asl20;
+      license = lib.licenses.asl20;
       description = "Fork of Matrix Python SDK";
-      platforms = stdenv.lib.platforms.linux;
+      platforms = lib.platforms.linux;
     };
   };
 
@@ -45,9 +45,9 @@ buildPythonApplication rec {
 
   meta = {
     description = "CLI client for Matrix";
-    license = stdenv.lib.licenses.gpl3;
-    maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.gpl3;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.linux;
     homepage = "https://github.com/saadnpq/matrixcli";
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix
index 7e63161ff35a..121bd3f8fe32 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix
@@ -1,11 +1,11 @@
-{ stdenv, fetchurl, gnome2, gtk3, pango, atk, cairo, gdk-pixbuf, glib,
+{ lib, stdenv, fetchurl, gnome2, gtk3, pango, atk, cairo, gdk-pixbuf, glib,
 freetype, fontconfig, dbus, libX11, xorg, libXi, libXcursor, libXdamage,
 libXrandr, libXcomposite, libXext, libXfixes, libXrender, libXtst,
 libXScrnSaver, nss, nspr, alsaLib, cups, expat, udev, wrapGAppsHook,
 hicolor-icon-theme, libuuid, at-spi2-core, at-spi2-atk }:
 
 let
-  rpath = stdenv.lib.makeLibraryPath [
+  rpath = lib.makeLibraryPath [
     alsaLib
     at-spi2-atk
     at-spi2-core
@@ -88,7 +88,7 @@ in
         $out/share/mattermost-desktop/mattermost-desktop
     '';
 
-    meta = with stdenv.lib; {
+    meta = with lib; {
       description = "Mattermost Desktop client";
       homepage    = "https://about.mattermost.com/";
       license     = licenses.asl20;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/mcabber/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/mcabber/default.nix
index 23db7d1ce257..7c5bff940848 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/mcabber/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/mcabber/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, openssl, ncurses, pkgconfig, glib, loudmouth, libotr
+{ lib, stdenv, fetchurl, openssl, ncurses, pkg-config, glib, loudmouth, libotr
 , gpgme
 }:
 
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "0q1i5acyghsmzas88qswvki8kkk2nfpr8zapgnxbcd3lwcxl38f4";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ openssl ncurses glib loudmouth libotr gpgme ];
 
   configureFlags = [
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://mcabber.com/";
     description = "Small Jabber console client";
     license = licenses.gpl2;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/mikutter/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/mikutter/default.nix
index 5c86157f5023..be84342787d2 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/mikutter/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/mikutter/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl
+{ lib, stdenv, fetchurl
 , bundlerEnv, ruby
 , alsaUtils, libnotify, which, wrapGAppsHook, gtk2, atk, gobject-introspection
 }:
@@ -72,7 +72,7 @@ stdenv.mkDerivation rec {
       --replace "$out/bin/.mikutter-wrapped" "$out/mikutter.rb"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An extensible Twitter client";
     homepage = "https://mikutter.hachune.net";
     platforms = ruby.meta.platforms;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/mikutter/gemset.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/mikutter/gemset.nix
index 88ea97be1caf..2bc4db978dda 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/mikutter/gemset.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/mikutter/gemset.nix
@@ -419,4 +419,4 @@
     };
     version = "3.7.6";
   };
-}
\ No newline at end of file
+}
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/mirage/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/mirage/default.nix
index decdb18aa063..3b6b9bfc6f91 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/mirage/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/mirage/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, mkDerivation, fetchFromGitHub
-, qmake, pkgconfig, olm, wrapQtAppsHook
+{ lib, stdenv, mkDerivation, fetchFromGitHub
+, qmake, pkg-config, olm, wrapQtAppsHook
 , qtbase, qtquickcontrols2, qtkeychain, qtmultimedia, qttools, qtgraphicaleffects
 , python3Packages, pyotherside, libXScrnSaver
 }:
@@ -23,7 +23,7 @@ mkDerivation rec {
     fetchSubmodules = true;
   };
 
-  nativeBuildInputs = [ pkgconfig qmake wrapQtAppsHook python3Packages.wrapPython ];
+  nativeBuildInputs = [ pkg-config qmake wrapQtAppsHook python3Packages.wrapPython ];
 
   buildInputs = [
     qtbase qtmultimedia
@@ -47,7 +47,7 @@ mkDerivation rec {
       "''${qtWrapperArgs[@]}"
     '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A fancy, customizable, keyboard-operable Qt/QML+Python Matrix chat client for encrypted and decentralized communication";
     homepage = "https://github.com/mirukana/mirage";
     license = licenses.lgpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/mm/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/mm/default.nix
index a9306a751ac8..7229218a704d 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/mm/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/mm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildGoModule, fetchgit }:
+{ lib, stdenv, buildGoModule, fetchgit }:
 
 buildGoModule {
   pname = "mm";
@@ -12,7 +12,7 @@ buildGoModule {
 
   vendorSha256 = "sha256-zJJ9PzQShv2iRNyCg1XVscbwjV9ZtMIojJDtXXm3rVM=";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A file system based matrix client";
     homepage = "https://git.lost.host/meutraa/mm";
     license = licenses.isc;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/neochat/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/neochat/default.nix
index 2a489ee3e713..bcd6fdc9f3e4 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/neochat/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/neochat/default.nix
@@ -1,5 +1,5 @@
 { mkDerivation
-, stdenv
+, lib, stdenv
 , fetchFromGitLab
 , pkg-config
 , cmake
@@ -26,14 +26,14 @@
 
 mkDerivation rec {
   pname = "neochat";
-  version = "1.0";
+  version = "1.0.1";
 
   src = fetchFromGitLab {
     domain = "invent.kde.org";
     owner = "network";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1r9n83kvc5v215lzmzh6hyc5q9i3w6znbf508qk0mdwdzxz4zry9";
+    sha256 = "sha256-xGqGFJHyoZXHLv/n3UGr/KVbgs5Gc9kKKWIuKMr9DtQ=";
   };
 
   nativeBuildInputs = [ cmake extra-cmake-modules pkg-config ];
@@ -57,7 +57,7 @@ mkDerivation rec {
     libpulseaudio
   ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A client for matrix, the decentralized communication protocol.";
     homepage = "https://apps.kde.org/en/neochat";
     license = licenses.gpl3Only;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/nheko/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/nheko/default.nix
index 80ffbebe9be3..9febaeee93f4 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/nheko/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/nheko/default.nix
@@ -6,9 +6,11 @@
 , cmark
 , lmdb
 , lmdbxx
+, libsecret
 , tweeny
 , mkDerivation
 , qtbase
+, qtkeychain
 , qtmacextras
 , qtmultimedia
 , qttools
@@ -19,25 +21,25 @@
 , spdlog
 , fmt
 , olm
-, pkgconfig
+, pkg-config
 , nlohmann_json
 }:
 
 mkDerivation rec {
   pname = "nheko";
-  version = "0.7.2";
+  version = "0.8.0";
 
   src = fetchFromGitHub {
     owner = "Nheko-Reborn";
     repo = "nheko";
     rev = "v${version}";
-    sha256 = "1cbhgaf9klgxdirrxj571fqwspm0byl75c1xc40l727a6qswvp7s";
+    sha256 = "00d6wx3lcgbks74jkdyifqxf8nlravqh88fyljd0sy7kzbah9msf";
   };
 
   nativeBuildInputs = [
     lmdbxx
     cmake
-    pkgconfig
+    pkg-config
   ];
 
   buildInputs = [
@@ -46,6 +48,7 @@ mkDerivation rec {
     mtxclient
     olm
     boost17x
+    libsecret
     lmdb
     spdlog
     fmt
@@ -55,9 +58,14 @@ mkDerivation rec {
     qttools
     qtquickcontrols2
     qtgraphicaleffects
+    qtkeychain
   ] ++ lib.optional stdenv.isDarwin qtmacextras;
 
-  meta = with stdenv.lib; {
+  cmakeFlags = [
+    "-DCOMPILE_QML=ON" # see https://github.com/Nheko-Reborn/nheko/issues/389
+  ];
+
+  meta = with lib; {
     description = "Desktop client for the Matrix protocol";
     homepage = "https://github.com/Nheko-Reborn/nheko";
     maintainers = with maintainers; [ ekleog fpletz ];
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/carbons/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/carbons/default.nix
index 7c2150a584fe..46f8458f1533 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/carbons/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/carbons/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, libxml2, pidgin, pkgconfig, fetchFromGitHub } :
+{ lib, stdenv, libxml2, pidgin, pkg-config, fetchFromGitHub } :
 
 stdenv.mkDerivation rec {
   pname = "pidgin-carbons";
@@ -13,10 +13,10 @@ stdenv.mkDerivation rec {
 
   makeFlags = [ "PURPLE_PLUGIN_DIR=$(out)/lib/pidgin" ];
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ libxml2 pidgin ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/gkdr/carbons";
     description = "XEP-0280: Message Carbons plugin for libpurple";
     license = licenses.gpl2;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/msn-pecan/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/msn-pecan/default.nix
index eccb8de31e59..c32bd6f3e398 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/msn-pecan/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/msn-pecan/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pidgin} :
+{ lib, stdenv, fetchurl, pidgin} :
 
 stdenv.mkDerivation {
   name = "pidgin-msn-pecan-0.1.4";
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
   meta = {
     description = "Alternative MSN protocol plug-in for Pidgin IM";
     homepage = "https://github.com/felipec/msn-pecan";
-    platforms = stdenv.lib.platforms.linux;
+    platforms = lib.platforms.linux;
   };
 
   makeFlags = [
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/otr/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/otr/default.nix
index bdc16d101f55..c7bad49cebaa 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/otr/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/otr/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libotr, pidgin, intltool } :
+{ lib, stdenv, fetchurl, libotr, pidgin, intltool } :
 
 stdenv.mkDerivation rec {
   name = "pidgin-otr-4.0.2";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ libotr pidgin intltool ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://otr.cypherpunks.ca/";
     description = "Plugin for Pidgin 2.x which implements OTR Messaging";
     license = licenses.gpl2;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/default.nix
index 1fd248e0c89d..1250e3877b96 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, pidgin, texLive, imagemagick, glib, gtk2 }:
+{ lib, stdenv, fetchurl, pkg-config, pidgin, texLive, imagemagick, glib, gtk2 }:
 
 let version = "1.5.0";
 in
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
     sha256 = "9c850aee90d7e59de834f83e09fa6e3e51b123f06e265ead70957608ada95441";
   };
 
-  nativeBuildInputs = [pkgconfig];
+  nativeBuildInputs = [pkg-config];
   buildInputs = [gtk2 glib pidgin];
   makeFlags = [ "PREFIX=$(out)" ];
 
@@ -20,10 +20,10 @@ stdenv.mkDerivation {
   '';
 
   passthru = {
-    wrapArgs = "--prefix PATH ':' ${stdenv.lib.makeBinPath [ texLive imagemagick ]}";
+    wrapArgs = "--prefix PATH ':' ${lib.makeBinPath [ texLive imagemagick ]}";
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://sourceforge.net/projects/pidgin-latex/";
     description = "LaTeX rendering plugin for Pidgin IM";
     license = licenses.gpl2;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-mra/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-mra/default.nix
index 13e165ad7a13..a168eb984c33 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-mra/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-mra/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, pkgconfig, pidgin } :
+{ lib, stdenv, fetchgit, pkg-config, pidgin } :
 
 let
   version = "54b2992";
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
     sha256 = "1adq57g11kw7bfpivyvfk3nlpjkc8raiw4bzn3gn4nx3m0wl99vw";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ pidgin ];
 
   postPatch = ''
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
   meta = {
     homepage = "https://github.com/dreadatour/pidgin-mra";
     description = "Mail.ru Agent plugin for Pidgin / libpurple";
-    license = stdenv.lib.licenses.gpl2;
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-opensteamworks/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-opensteamworks/default.nix
index 067a71a93dd5..9af8b0aff77b 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-opensteamworks/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-opensteamworks/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgconfig, pidgin, glib, json-glib, nss, nspr
+{ lib, stdenv, fetchFromGitHub, pkg-config, pidgin, glib, json-glib, nss, nspr
 , libsecret
 } :
 
@@ -21,13 +21,13 @@ stdenv.mkDerivation rec {
   ];
 
   nativeBuildInputs = [
-    pkgconfig
+    pkg-config
   ];
   buildInputs = [
     pidgin glib json-glib nss nspr libsecret
   ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/EionRobb/pidgin-opensteamworks";
     description = "Plugin for Pidgin 2.x which implements Steam Friends/Steam IM compatibility";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-osd/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-osd/default.nix
index bf9979c19f25..4c7cb2c46bfa 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-osd/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-osd/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pidgin, xosd
+{ lib, stdenv, fetchFromGitHub, pidgin, xosd
 , autoreconfHook } :
 
 stdenv.mkDerivation rec {
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ autoreconfHook ];
   buildInputs = [ xosd pidgin ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/mbroemme/pidgin-osd";
     description = "Plugin for Pidgin which implements on-screen display via libxosd";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-skypeweb/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-skypeweb/default.nix
index 72309e3479fe..d7c3c6cacabd 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-skypeweb/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-skypeweb/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgconfig, pidgin, json-glib }:
+{ lib, stdenv, fetchFromGitHub, pkg-config, pidgin, json-glib }:
 
 stdenv.mkDerivation rec {
   pname = "pidgin-skypeweb";
@@ -15,13 +15,13 @@ stdenv.mkDerivation rec {
     sourceRoot=$(echo */skypeweb)
   '';
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ pidgin json-glib ];
 
   PKG_CONFIG_PURPLE_PLUGINDIR = "${placeholder "out"}/lib/purple-2";
   PKG_CONFIG_PURPLE_DATADIR = "${placeholder "out"}/share";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/EionRobb/skype4pidgin";
     description = "SkypeWeb plugin for Pidgin";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-xmpp-receipts/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-xmpp-receipts/default.nix
index 463b6326b5a2..f545b65cd8ea 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-xmpp-receipts/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/pidgin-xmpp-receipts/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pidgin } :
+{ lib, stdenv, fetchFromGitHub, pidgin } :
 
 let
   version = "0.8";
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
     cp xmpp-receipts.so $out/lib/pidgin/
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "http://devel.kondorgulasch.de/pidgin-xmpp-receipts/";
     description = "Message delivery receipts (XEP-0184) Pidgin plugin";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-discord/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-discord/default.nix
index 0322005ae935..10cbcb6c1d29 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-discord/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-discord/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgconfig, pidgin, json-glib }:
+{ lib, stdenv, fetchFromGitHub, pkg-config, pidgin, json-glib }:
 
 stdenv.mkDerivation {
   pname = "purple-discord";
@@ -11,13 +11,13 @@ stdenv.mkDerivation {
     sha256 = "0dc344zh1v4yh9c8javcw5ylzwc1wpx0ih8bww8p8cjmhr8kcl32";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ pidgin json-glib ];
 
   PKG_CONFIG_PURPLE_PLUGINDIR = "${placeholder "out"}/lib/purple-2";
   PKG_CONFIG_PURPLE_DATADIR = "${placeholder "out"}/share";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/EionRobb/purple-discord";
     description = "Discord plugin for Pidgin";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-facebook/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-facebook/default.nix
index cff1bcc56b92..a45f91ec57fd 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-facebook/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-facebook/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchhg, pidgin, glib, json-glib, autoreconfHook }:
+{ lib, stdenv, fetchFromGitHub, fetchhg, pidgin, glib, json-glib, autoreconfHook }:
 
 
 let
@@ -55,7 +55,7 @@ in stdenv.mkDerivation rec {
   nativeBuildInputs = [ autoreconfHook ];
   buildInputs = [ pidgin glib json-glib ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     inherit (src.meta) homepage;
     description = "Facebook protocol plugin for libpurple";
     license = licenses.gpl2;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-hangouts/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-hangouts/default.nix
index 204d99f6d7ab..653708abe3b6 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-hangouts/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-hangouts/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchhg, pidgin, glib, json-glib, protobuf, protobufc }:
+{ lib, stdenv, fetchhg, pidgin, glib, json-glib, protobuf, protobufc }:
 
 stdenv.mkDerivation {
   pname = "purple-hangouts-hg";
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
   PKG_CONFIG_PURPLE_PLUGINDIR = "${placeholder "out"}/lib/purple-2";
   PKG_CONFIG_PURPLE_DATADIR = "${placeholder "out"}/share";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://bitbucket.org/EionRobb/purple-hangouts";
     description = "Native Hangouts support for pidgin";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-lurch/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-lurch/default.nix
index 0a6aa1a133d6..2170aac16e05 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-lurch/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-lurch/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake, pidgin, minixml, libxml2, sqlite, libgcrypt }:
+{ lib, stdenv, fetchFromGitHub, cmake, pidgin, minixml, libxml2, sqlite, libgcrypt }:
 
 stdenv.mkDerivation rec {
   pname = "purple-lurch";
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
     install -Dm755 -t $out/lib/purple-2 build/lurch.so
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/gkdr/lurch";
     description = "XEP-0384: OMEMO Encryption for libpurple";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-matrix/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-matrix/default.nix
index 4ded2ce1d0bf..2862e4df796a 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-matrix/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-matrix/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgconfig, pidgin, json-glib, glib, http-parser, sqlite, olm, libgcrypt } :
+{ lib, stdenv, fetchFromGitHub, pkg-config, pidgin, json-glib, glib, http-parser, sqlite, olm, libgcrypt } :
 
 stdenv.mkDerivation rec {
   pname = "purple-matrix-unstable";
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
     "-O3" "-Wno-error"
   ];
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ pidgin json-glib glib http-parser sqlite olm libgcrypt ];
 
   makeFlags = [
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
 
   buildFlags = [ "CC=cc" ]; # fix build on darwin
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/matrix-org/purple-matrix";
     description = "Matrix support for Pidgin / libpurple";
     license = licenses.gpl2;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-plugin-pack/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-plugin-pack/default.nix
index 6739befbfea4..edc047c78ba2 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-plugin-pack/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-plugin-pack/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pidgin, intltool, python } :
+{ lib, stdenv, fetchurl, pidgin, intltool, python } :
 
 stdenv.mkDerivation rec {
   name = "purple-plugin-pack-2.7.0";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ pidgin intltool python ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://bitbucket.org/rekkanoryo/purple-plugin-pack";
     description = "Plugin pack for Pidgin 2.x";
     license = licenses.gpl2;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-slack/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-slack/default.nix
index 5b3a1564aebf..9f5f9a2bda1e 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-slack/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-slack/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pidgin, pkgconfig }:
+{ lib, stdenv, fetchFromGitHub, pidgin, pkg-config }:
 
 stdenv.mkDerivation {
   pname = "purple-slack-unstable";
@@ -11,13 +11,13 @@ stdenv.mkDerivation {
     sha256 = "1sksqshiwldd32k8jmiflp2pcax31ym6rypr4qa4v5vdn907g80m";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ pidgin ];
 
   PKG_CONFIG_PURPLE_PLUGINDIR = "${placeholder "out"}/lib/purple-2";
   PKG_CONFIG_PURPLE_DATAROOTDIR = "${placeholder "out"}/share";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/dylex/slack-libpurple";
     description = "Slack plugin for Pidgin";
     license = licenses.gpl2;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-vk-plugin/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-vk-plugin/default.nix
index 76b242659e7a..07b38ff3c5a2 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-vk-plugin/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-vk-plugin/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchhg, pidgin, cmake, libxml2 } :
+{ lib, stdenv, fetchhg, pidgin, cmake, libxml2 } :
 
 let
   version = "40ddb6d";
@@ -13,7 +13,8 @@ stdenv.mkDerivation {
     sha256 = "02p57fgx8ml00cbrb4f280ak2802svz80836dzk9f1zwm1bcr2qc";
   };
 
-  buildInputs = [ pidgin cmake libxml2 ];
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ pidgin libxml2 ];
 
   preConfigure = ''
     sed -i -e 's|DESTINATION.*PURPLE_PLUGIN_DIR}|DESTINATION lib/purple-2|' CMakeLists.txt
@@ -24,7 +25,7 @@ stdenv.mkDerivation {
   meta = {
     homepage = "https://bitbucket.org/olegoandreev/purple-vk-plugin";
     description = "Vk (russian social network) plugin for Pidgin / libpurple";
-    license = stdenv.lib.licenses.gpl3;
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.gpl3;
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-xmpp-http-upload/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-xmpp-http-upload/default.nix
index 3277e12ec086..6ade8e5f19e5 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-xmpp-http-upload/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-xmpp-http-upload/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, pidgin, glib, libxml2 }:
+{ lib, stdenv, fetchgit, pidgin, glib, libxml2 }:
 
 stdenv.mkDerivation {
   name = "purple-xmpp-upload-2017-12-31";
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
     install -Dm644 -t $out/lib/purple-2 jabber_http_file_upload.so
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/Junker/purple-xmpp-http-upload";
     description = "HTTP File Upload plugin for libpurple (XMPP Protocol XEP-0363)";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix
index 3d1a6ac534c5..468d7f64c4cf 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pidgin, intltool, libxml2, gmime, nss }:
+{ lib, stdenv, fetchurl, pidgin, intltool, libxml2, gmime, nss }:
 
 stdenv.mkDerivation rec {
   pname = "pidgin-sipe";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
 
   postInstall = "ln -s \$out/lib/purple-2 \$out/share/pidgin-sipe";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "SIPE plugin for Pidgin IM";
     homepage = "http://sipe.sourceforge.net/";
     license = licenses.gpl2;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/skype4pidgin/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/skype4pidgin/default.nix
index 253d2ddfe24a..6e14ee1a2b88 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/skype4pidgin/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/skype4pidgin/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, pidgin, libnotify, gdk-pixbuf, glib, dbus
+{ lib, stdenv, fetchurl, pkg-config, pidgin, libnotify, gdk-pixbuf, glib, dbus
 , dbus-glib }:
 
 stdenv.mkDerivation rec {
@@ -29,13 +29,13 @@ stdenv.mkDerivation rec {
 
   postInstall = "ln -s \$out/lib/pidgin \$out/share/pidgin-otr";
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ pidgin libnotify gdk-pixbuf glib dbus dbus-glib ];
 
   meta = {
     homepage = "https://github.com/novas0x2a/skype4pidgin";
-    license = stdenv.lib.licenses.gpl3Plus;
+    license = lib.licenses.gpl3Plus;
     description = "Plugin to use a running skype account through pidgin";
-    platforms = stdenv.lib.platforms.linux;
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/telegram-purple/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/telegram-purple/default.nix
index 38424ca25979..527af9ed98db 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/telegram-purple/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/telegram-purple/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, pkgconfig, pidgin, libwebp, libgcrypt, gettext } :
+{ lib, stdenv, fetchgit, pkg-config, pidgin, libwebp, libgcrypt, gettext } :
 
 let
   version = "1.3.1";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
 
   NIX_CFLAGS_COMPILE = "-Wno-error=cast-function-type";
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ pidgin libwebp libgcrypt gettext ];
 
   preConfigure = ''
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
     cp imgs/telegram48.png $out/pixmaps/pidgin/protocols/48
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/majn/telegram-purple";
     description = "Telegram for Pidgin / libpurple";
     license = licenses.gpl2;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/tox-prpl/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/tox-prpl/default.nix
index de48ee26a6ed..41c6a75310a6 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/tox-prpl/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/tox-prpl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, libtoxcore, pidgin, autoreconfHook, libsodium }:
+{ lib, stdenv, fetchFromGitHub, libtoxcore, pidgin, autoreconfHook, libsodium }:
 
 stdenv.mkDerivation rec {
   pname = "tox-prpl";
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ libtoxcore pidgin libsodium ];
   nativeBuildInputs = [ autoreconfHook ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/jin-eld/tox-prpl";
     description = "Tox plugin for Pidgin / libpurple";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/window-merge/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/window-merge/default.nix
index f576f2ad9c3e..c5437e965ed8 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/window-merge/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin-plugins/window-merge/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pidgin } :
+{ lib, stdenv, fetchurl, pidgin } :
 
 stdenv.mkDerivation rec {
   pname = "pidgin-window-merge";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ pidgin ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/dm0-/window_merge";
     description = "Pidgin plugin that merges the Buddy List window with a conversation window";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin/default.nix
index a269eead708a..65b9c245a383 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pidgin/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeWrapper, pkgconfig, gtk2, gtk2-x11
+{ stdenv, fetchurl, makeWrapper, pkg-config, gtk2, gtk2-x11
 , gtkspell2, aspell
 , gst_all_1, startupnotification, gettext
 , perlPackages, libxml2, nss, nspr, farstream
@@ -44,7 +44,7 @@ let unwrapped = stdenv.mkDerivation rec {
   ++ (lib.optional (stdenv.isDarwin) gtk2-x11);
 
 
-  propagatedBuildInputs = [ pkgconfig gettext ]
+  propagatedBuildInputs = [ pkg-config gettext ]
     ++ (with perlPackages; [ perl XMLParser ])
     ++ (lib.optional (stdenv.isLinux) gtk2)
     ++ (lib.optional (stdenv.isDarwin) gtk2-x11);
@@ -72,7 +72,7 @@ let unwrapped = stdenv.mkDerivation rec {
       --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Multi-protocol instant messaging client";
     homepage = "http://pidgin.im";
     license = licenses.gpl2Plus;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/poezio/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/poezio/default.nix
index 8dc70d6d7921..df6e675fecb6 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/poezio/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/poezio/default.nix
@@ -1,5 +1,5 @@
 { lib, buildPythonApplication, fetchFromGitHub, pythonOlder
-, pytest, aiodns, slixmpp, pyinotify, potr, mpd2, cffi, pkgconfig, setuptools }:
+, pytest, aiodns, slixmpp, pyinotify, potr, mpd2, cffi, pkg-config, setuptools }:
 buildPythonApplication rec {
     pname = "poezio";
     version = "0.13.1";
@@ -8,7 +8,7 @@ buildPythonApplication rec {
 
     checkInputs = [ pytest ];
     propagatedBuildInputs = [ aiodns slixmpp pyinotify potr mpd2 cffi setuptools ];
-    nativeBuildInputs = [ pkgconfig ];
+    nativeBuildInputs = [ pkg-config ];
 
     src = fetchFromGitHub {
       owner = pname;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pond/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pond/default.nix
index 1d70c9641f8e..4c059cb20d83 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pond/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pond/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildGoPackage, trousers, dclxvi, wrapGAppsHook, pkgconfig, gtk3, gtkspell3,
+{ lib, stdenv, buildGoPackage, trousers, dclxvi, wrapGAppsHook, pkg-config, gtk3, gtkspell3,
   fetchgit }:
 
 let
@@ -6,7 +6,7 @@ let
 in
 buildGoPackage rec {
   pname = "pond";
-  version = "20150830-${stdenv.lib.strings.substring 0 7 rev}";
+  version = "20150830-${lib.strings.substring 0 7 rev}";
   rev = "bce6e0dc61803c23699c749e29a83f81da3c41b2";
 
   goPackagePath = "github.com/agl/pond";
@@ -19,13 +19,13 @@ buildGoPackage rec {
 
   goDeps = ./deps.nix;
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ trousers gtk3 gtkspell3 ]
-    ++ stdenv.lib.optional stdenv.hostPlatform.isx86_64 dclxvi
-    ++ stdenv.lib.optionals gui [ wrapGAppsHook ];
-  buildFlags = stdenv.lib.optionals (!gui) [ "-tags" "nogui" ];
+    ++ lib.optional stdenv.hostPlatform.isx86_64 dclxvi
+    ++ lib.optionals gui [ wrapGAppsHook ];
+  buildFlags = lib.optionals (!gui) [ "-tags" "nogui" ];
   excludedPackages = "\\(appengine\\|bn256cgo\\)";
-  postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isx86_64 ''
+  postPatch = lib.optionalString stdenv.hostPlatform.isx86_64 ''
     grep -r 'bn256' | awk -F: '{print $1}' | xargs sed -i \
       -e "s,golang.org/x/crypto/bn256,github.com/agl/pond/bn256cgo,g" \
       -e "s,bn256\.,bn256cgo.,g"
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/profanity/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/profanity/default.nix
index 4dfca92f39f3..c373d23948b8 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/profanity/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/profanity/default.nix
@@ -1,7 +1,6 @@
-{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, openssl
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, glib, openssl
 , glibcLocales, expect, ncurses, libotr, curl, readline, libuuid
-, cmocka, libmicrohttpd, expat, sqlite, libmesode, fetchpatch
-, autoconf-archive
+, cmocka, libmicrohttpd, expat, sqlite, libmesode, autoconf-archive
 
 , autoAwaySupport ? true,       libXScrnSaver ? null, libX11 ? null
 , notifySupport ? true,         libnotify ? null, gdk-pixbuf ? null
@@ -18,31 +17,27 @@ assert pgpSupport          -> gpgme != null;
 assert pythonPluginSupport -> python != null;
 assert omemoSupport        -> libsignal-protocol-c != null && libgcrypt != null;
 
-with stdenv.lib;
+with lib;
 
 stdenv.mkDerivation rec {
   pname = "profanity";
-  version = "0.9.5";
+  version = "0.10.0";
 
   src = fetchFromGitHub {
     owner = "profanity-im";
     repo = "profanity";
     rev = version;
-    sha256 = "14vbblf639f90bb4npg2xv53cpvk9am9ic4pmc1vnv4m3zsndjg5";
+    sha256 = "0a9rzhnivxcr8v02xxzrbck7pvvv4c66ap2zy0gzxhri5p8ac03r";
   };
 
   patches = [
-    (fetchpatch {
-      url = "https://github.com/profanity-im/profanity/commit/54667c022f17bdb547c3b8b4eec1c2889c9d60f3.patch";
-      sha256 = "0aqrq45im1qnq308hyhh7dqbggzmcqb0b868wr5v8v08pd94s45k";
-    })
     ./patches/packages-osx.patch
   ];
 
   enableParallelBuilding = true;
 
   nativeBuildInputs = [
-    autoreconfHook autoconf-archive glibcLocales pkgconfig
+    autoreconfHook autoconf-archive glibcLocales pkg-config
   ];
 
   buildInputs = [
@@ -80,6 +75,8 @@ stdenv.mkDerivation rec {
     homepage = "http://www.profanity.im/";
     license = licenses.gpl3Plus;
     platforms = platforms.unix;
+    changelog = "https://github.com/profanity-im/profanity/releases/tag/${version}";
+    downloadPage = "https://github.com/profanity-im/profanity/releases/";
     maintainers = [ maintainers.devhell ];
     updateWalker = true;
   };
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/psi/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/psi/default.nix
index 08c3ab96210f..62b6c8f8e59c 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/psi/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/psi/default.nix
@@ -21,7 +21,6 @@ mkDerivation rec {
     qtbase qtmultimedia qtx11extras qtwebengine
     libidn qca-qt5 libXScrnSaver hunspell
   ];
-  enableParallelBuilding = true;
 
   meta = with lib; {
     homepage = "https://psi-im.org";
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix
index d76b8dd206e4..06f02fa80946 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/pybitmessage/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, python2Packages, openssl }:
+{ lib, stdenv, fetchFromGitHub, python2Packages, openssl }:
 
 python2Packages.buildPythonApplication rec {
   pname = "pybitmessage";
@@ -30,7 +30,7 @@ python2Packages.buildPythonApplication rec {
 
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://bitmessage.org/";
     description = "The official Bitmessage client";
     license = licenses.mit;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/qtox/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/qtox/default.nix
index 2605d6dc0818..b91db31f89a1 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/qtox/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/qtox/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, mkDerivation, fetchFromGitHub, cmake, pkg-config, perl
+{ lib, stdenv, mkDerivation, fetchFromGitHub, cmake, pkg-config, perl
 , libtoxcore, libpthreadstubs, libXdmcp, libXScrnSaver
 , qtbase, qtsvg, qttools, qttranslations
 , ffmpeg_3, filter-audio, libexif, libsodium, libopus
@@ -22,10 +22,10 @@ mkDerivation rec {
     qtbase qtsvg qttranslations
     ffmpeg_3 filter-audio libexif libopus libsodium
     libvpx openal pcre qrencode sqlcipher
-  ] ++ stdenv.lib.optionals stdenv.isDarwin [ AVFoundation] ;
+  ] ++ lib.optionals stdenv.isDarwin [ AVFoundation] ;
 
   nativeBuildInputs = [ cmake pkg-config qttools ]
-    ++ stdenv.lib.optionals stdenv.isDarwin [ perl ];
+    ++ lib.optionals stdenv.isDarwin [ perl ];
 
   cmakeFlags = [
     "-DGIT_DESCRIBE=v${version}"
@@ -35,7 +35,7 @@ mkDerivation rec {
     "-DTIMESTAMP=1"
   ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Qt Tox client";
     homepage = "https://tox.chat";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/rambox/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/rambox/default.nix
index cc9fab4d3752..5525805c2e4c 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/rambox/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/rambox/default.nix
@@ -1,47 +1,23 @@
-{ stdenv, lib, fetchurl, xdg_utils, dpkg, makeWrapper, autoPatchelfHook
-, libXtst, libXScrnSaver, gtk3, nss, alsaLib, udev, libnotify, wrapGAppsHook
-}:
+{ stdenv, callPackage, fetchurl, lib }:
 
 let
-  version = "0.7.7";
-in stdenv.mkDerivation rec {
+  mkRambox = opts: callPackage (import ./rambox.nix opts) { };
+in mkRambox rec {
   pname = "rambox";
-  inherit version;
+  version = "0.7.7";
+
   src = {
     x86_64-linux = fetchurl {
-      url = "https://github.com/ramboxapp/community-edition/releases/download/${version}/Rambox-${version}-linux-amd64.deb";
-      sha256 = "0bij4f1bkg94gc8pq7r6yfym5zcvwc2ymdnmnmh5m4h1pa1gk6x9";
+      url = "https://github.com/ramboxapp/community-edition/releases/download/${version}/Rambox-${version}-linux-x86_64.AppImage";
+      sha256 = "0f82hq0dzcjicdz6lkzj8889y100yqciqrwh8wjjy9pxkhjcdini";
     };
     i686-linux = fetchurl {
-      url = "https://github.com/ramboxapp/community-edition/releases/download/${version}/Rambox-${version}-linux-i386.deb";
-      sha256 = "1nhgqjha10jvyf9nsghvlkibg7byj8qz140639ygag9qlpd51rfs";
+      url = "https://github.com/ramboxapp/community-edition/releases/download/${version}/Rambox-${version}-linux-i386.AppImage";
+      sha256 = "1nhgqjha10jvyf9nsghvlkibg7byj8qz140639ygag9qlpd52rfs";
     };
   }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
 
-  nativeBuildInputs = [ dpkg makeWrapper autoPatchelfHook wrapGAppsHook ];
-  buildInputs = [ libXtst libXScrnSaver gtk3 nss alsaLib ];
-  runtimeDependencies = [ (lib.getLib udev) libnotify ];
-
-  unpackPhase = "dpkg-deb -x $src .";
-
-  installPhase = ''
-    mkdir -p $out/bin
-    cp -r opt $out
-    ln -s $out/opt/Rambox/rambox $out/bin
-
-    # provide resources
-    cp -r usr/share $out
-    substituteInPlace $out/share/applications/rambox.desktop \
-      --replace Exec=/opt/Rambox/rambox Exec=rambox
-  '';
-
-  preFixup = ''
-    gappsWrapperArgs+=(
-      --prefix PATH : ${xdg_utils}/bin
-    )
-  '';
-
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Free and Open Source messaging and emailing app that combines common web applications into one";
     homepage = "https://rambox.pro";
     license = licenses.mit;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/rambox/pro.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/rambox/pro.nix
index 3cdf1339e3bf..7051799a2775 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/rambox/pro.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/rambox/pro.nix
@@ -1,56 +1,25 @@
-{ autoPatchelfHook, electron_7, fetchurl, makeDesktopItem, makeWrapper, nodePackages, nss, stdenv, xdg_utils, xorg }:
+{ stdenv, callPackage, fetchurl, lib }:
 
 let
-  electron = electron_7;
-in
-stdenv.mkDerivation rec {
+  mkRambox = opts: callPackage (import ./rambox.nix opts) { };
+in mkRambox rec {
   pname = "rambox-pro";
   version = "1.4.1";
 
-  dontBuild = true;
-  dontStrip = true;
+  desktopName = "Rambox Pro";
 
-  buildInputs = [ nss xorg.libXext xorg.libxkbfile xorg.libXScrnSaver ];
-  nativeBuildInputs = [ autoPatchelfHook makeWrapper nodePackages.asar ];
+  src = {
+    x86_64-linux = fetchurl {
+      url = "https://github.com/ramboxapp/download/releases/download/v${version}/RamboxPro-${version}-linux-x64.AppImage";
+      sha256 = "18383v3g26hd1czvw06gmjn8bdw2w9c7zb04zkfl6szgakrv26x4";
+    };
+  }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
 
-  src = fetchurl {
-    url = "https://github.com/ramboxapp/download/releases/download/v${version}/RamboxPro-${version}-linux-x64.tar.gz";
-    sha256 = "1bd4fba3ac8c20fa557ebfb110f6503d36e6c3dba0401d1073529dcae2c2ec1e";
-  };
-
-  installPhase = ''
-    mkdir -p $out/{bin,resources/dist/renderer/assets/images/app,share/applications,share/icons/hicolor/256x256/apps}
-
-    asar e resources/app.asar $out/resources
-
-    substituteInPlace "$out/resources/dist/electron/main.js" \
-      --replace ",isHidden:" ",path:\"$out/bin/ramboxpro\",isHidden:"
-
-    cp $desktopItem/share/applications/* $out/share/applications
-    cp $out/resources/dist/electron/imgs/256x256.png $out/share/icons/hicolor/256x256/apps/ramboxpro.png
-    cp $out/resources/dist/electron/imgs/256x256.png $out/resources/dist/renderer/assets/images/app/icon.png
-  '';
-
-  postFixup = ''
-    makeWrapper ${electron}/bin/electron $out/bin/ramboxpro \
-      --add-flags "$out/resources --without-update" \
-      --prefix PATH : ${xdg_utils}/bin
-  '';
-
-  desktopItem = makeDesktopItem {
-    name = "rambox-pro";
-    exec = "ramboxpro";
-    icon = "ramboxpro";
-    type = "Application";
-    desktopName = "Rambox Pro";
-    categories = "Network;";
-  };
-
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Messaging and emailing app that combines common web applications into one";
     homepage = "https://rambox.pro";
     license = licenses.unfree;
     maintainers = with maintainers; [ chrisaw ];
-    platforms = [ "i686-linux" "x86_64-linux" ];
+    platforms = [ "x86_64-linux" ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/rambox/rambox.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/rambox/rambox.nix
new file mode 100644
index 000000000000..6881ae270f9b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/rambox/rambox.nix
@@ -0,0 +1,30 @@
+{ pname, version, src, meta, desktopName ? "Rambox" }:
+
+{ appimageTools, stdenv, lib, fetchurl, makeDesktopItem }:
+
+let
+  name = "${pname}-${version}";
+
+  desktopItem = (makeDesktopItem {
+    inherit desktopName;
+    name = pname;
+    exec = pname;
+    icon = pname;
+    type = "Application";
+    categories = "Network;";
+  });
+
+  appimageContents = appimageTools.extractType2 {
+    inherit name src;
+  };
+in appimageTools.wrapType2 rec {
+  inherit name src meta;
+
+  extraInstallCommands = ''
+    mkdir -p $out/share/applications $out/share/icons/hicolor/256x256/apps
+    # CE uses rambox-<version>, Pro uses rambox
+    mv $out/bin/rambox* $out/bin/${pname}
+    install -Dm644 ${appimageContents}/usr/share/icons/hicolor/256x256/apps/rambox*.png $out/share/icons/hicolor/256x256/apps/${pname}.png
+    install -Dm644 ${desktopItem}/share/applications/* $out/share/applications
+  '';
+}
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/ratox/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/ratox/default.nix
index 212ba3a31a4b..1851a60216b9 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/ratox/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/ratox/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchgit, libtoxcore
+{ lib, stdenv, fetchgit, libtoxcore
 , conf ? null }:
 
-with stdenv.lib;
+with lib;
 
 let
   configFile = optionalString (conf!=null) (builtins.toFile "config.h" conf);
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/ricochet/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/ricochet/default.nix
index de46c891d1fa..2a234edaa08b 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/ricochet/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/ricochet/default.nix
@@ -1,4 +1,4 @@
-{ mkDerivation, stdenv, fetchurl, pkgconfig, makeDesktopItem
+{ mkDerivation, lib, stdenv, fetchurl, pkg-config, makeDesktopItem
 , qtbase, qttools, qtmultimedia, qtquick1, qtquickcontrols
 , openssl, protobuf, qmake
 }:
@@ -27,7 +27,7 @@ mkDerivation rec {
     openssl protobuf
   ];
 
-  nativeBuildInputs = [ pkgconfig qmake ];
+  nativeBuildInputs = [ pkg-config qmake ];
 
   preConfigure = ''
     export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags openssl)"
@@ -49,7 +49,7 @@ mkDerivation rec {
   # RCC: Error in 'translation/embedded.qrc': Cannot find file 'ricochet_en.qm'
   enableParallelBuilding = false;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Anonymous peer-to-peer instant messaging";
     homepage = "https://ricochet.im";
     license = licenses.bsd3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/ring-daemon/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/ring-daemon/default.nix
index 4a95debdfd10..bad54f455b08 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/ring-daemon/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/ring-daemon/default.nix
@@ -1,8 +1,8 @@
-{ stdenv
+{ lib, stdenv
 , fetchgit
 , which
 , autoreconfHook
-, pkgconfig
+, pkg-config
 , automake
 , libtool
 , pjsip
@@ -52,7 +52,7 @@ let
   patchdir = "${src}/contrib/src";
 
   restbed = import ./restbed.nix {
-    inherit stdenv fetchFromGitHub cmake asio openssl;
+    inherit stdenv lib fetchFromGitHub cmake asio openssl;
     patches = [
     "${patchdir}/restbed/CMakeLists.patch"
     "${patchdir}/restbed/strand.patch"
@@ -62,7 +62,7 @@ let
     ];
   };
 
-  pjsip' = stdenv.lib.overrideDerivation pjsip (old: {
+  pjsip' = lib.overrideDerivation pjsip (old: {
     patches = [
       "${patchdir}/pjproject/gnutls.patch"
       ./notestsapps.patch # this one had to be modified
@@ -89,7 +89,7 @@ stdenv.mkDerivation {
     autoreconfHook
     automake
     libtool
-    pkgconfig
+    pkg-config
   ];
 
   buildInputs = [
@@ -132,7 +132,7 @@ stdenv.mkDerivation {
     ln -s $out/dringctrl/dringctrl.py $out/bin/dringctrl.py
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A Voice-over-IP software phone";
     longDescription = ''
       As the SIP/audio daemon and the user interface are separate processes, it
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/ring-daemon/restbed.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/ring-daemon/restbed.nix
index 775b9015eb0e..e2cdb1f05b0e 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/ring-daemon/restbed.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/ring-daemon/restbed.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromGitHub
 , cmake
 , asio
@@ -19,13 +19,10 @@ stdenv.mkDerivation {
 
   inherit patches;
 
-  buildInputs = [
-    cmake
-    asio
-    openssl
-  ];
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ asio openssl ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "HTTP framework for building networked applications";
     longDescription = ''
       HTTP framework for building networked applications that require seamless
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/salut-a-toi/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/salut-a-toi/default.nix
index 6b9593a24b7f..6a6302e74955 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/salut-a-toi/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/salut-a-toi/default.nix
@@ -1,9 +1,9 @@
-{ stdenv, fetchurl, python27Packages, file }:
+{ lib, stdenv, fetchurl, python27Packages, file }:
 
 let
   inherit (python27Packages) python;
   requirements = (import ./requirements.nix {
-    inherit stdenv fetchurl;
+    inherit lib fetchurl;
     pythonPackages = python27Packages;
   });
 
@@ -50,7 +50,7 @@ in
       done
     '';
 
-    meta = with stdenv.lib; {
+    meta = with lib; {
       homepage = "http://sat.goffi.org/";
       description = "A multi-frontend XMPP client";
       platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/salut-a-toi/requirements.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/salut-a-toi/requirements.nix
index 1a6811182453..8277028ac7b8 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/salut-a-toi/requirements.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/salut-a-toi/requirements.nix
@@ -1,5 +1,5 @@
 { fetchurl
-, stdenv
+, lib
 , pythonPackages
 }:
 
@@ -8,7 +8,7 @@ let
 
   xe = buildPythonPackage rec {
     url = "http://www.blarg.net/%7Esteveha/xe-0.7.4.tar.gz";
-    name = stdenv.lib.nameFromURL url ".tar";
+    name = lib.nameFromURL url ".tar";
     src = fetchurl {
       inherit url;
       sha256 = "0v9878cl0y9cczdsr6xjy8v9l139lc23h4m5f86p4kpf2wlnpi42";
@@ -28,7 +28,7 @@ in {
   pyfeed = (buildPythonPackage rec {
     url = "http://www.blarg.net/%7Esteveha/pyfeed-0.7.4.tar.gz";
 
-    name = stdenv.lib.nameFromURL url ".tar";
+    name = lib.nameFromURL url ".tar";
 
     src = fetchurl {
       inherit url;
@@ -40,7 +40,7 @@ in {
     # error: invalid command 'test'
     doCheck = false;
 
-    meta = with stdenv.lib; {
+    meta = with lib; {
       homepage = "http://home.blarg.net/~steveha/pyfeed.html";
       description = "Tools for syndication feeds";
     };
@@ -49,7 +49,7 @@ in {
 
   wokkel = buildPythonPackage (rec {
     url = "http://wokkel.ik.nu/releases/0.7.0/wokkel-0.7.0.tar.gz";
-    name = stdenv.lib.nameFromURL url ".tar";
+    name = lib.nameFromURL url ".tar";
     src = fetchurl {
       inherit url;
       sha256 = "0rnshrzw8605x05mpd8ndrx3ri8h6cx713mp8sl4f04f4gcrz8ml";
@@ -57,7 +57,7 @@ in {
 
     propagatedBuildInputs = with pythonPackages; [twisted dateutil];
 
-    meta = with stdenv.lib; {
+    meta = with lib; {
       description = "Some (mainly XMPP-related) additions to twisted";
       homepage = "http://wokkel.ik.nu/";
       license = licenses.mit;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/scudcloud/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/scudcloud/default.nix
index b16659ba44cd..55935f69e1c8 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/scudcloud/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/scudcloud/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, python3Packages }:
+{ lib, stdenv, fetchurl, python3Packages }:
 
 let version = "1.63";
 in python3Packages.buildPythonPackage {
@@ -11,7 +11,7 @@ in python3Packages.buildPythonPackage {
 
   propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit dbus-python jsmin ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Non-official desktop client for Slack";
     homepage = "https://github.com/raelgc/scudcloud";
     license = licenses.mit;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
index 44df5f6be687..19e48bf88d68 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
@@ -25,7 +25,7 @@ let
       else "");
 in stdenv.mkDerivation rec {
   pname = "signal-desktop";
-  version = "1.39.4"; # Please backport all updates to the stable channel.
+  version = "1.39.6"; # Please backport all updates to the stable channel.
   # All releases have a limited lifetime and "expire" 90 days after the release.
   # When releases "expire" the application becomes unusable until an update is
   # applied. The expiration date for the current release can be extracted with:
@@ -35,7 +35,7 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
-    sha256 = "11rjz0vawwyny4rpdqsqyfh8pi177xykm69xxcj6kgcncxaxg0vb";
+    sha256 = "04fd81vc0dxk0b47crm5zacf4x79pdn483xicygnc1z6v7mnrmgk";
   };
 
   nativeBuildInputs = [
@@ -113,7 +113,7 @@ in stdenv.mkDerivation rec {
 
   preFixup = ''
     gappsWrapperArgs+=(
-      --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ] }"
+      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ] }"
       ${customLanguageWrapperArgs}
     )
 
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/silc-client/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/silc-client/default.nix
index 0c84e1c5c80a..83cc80ccaf05 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/silc-client/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/silc-client/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, perl, pkgconfig, glib, ncurses
+{ lib, stdenv, fetchurl, perl, pkg-config, glib, ncurses
 , enablePlugin ? false }:
 
 # Enabling the plugin and using it with a recent irssi, segafults on join:
@@ -8,7 +8,7 @@ let
   basename = "silc-client-1.1.11";
 in
 stdenv.mkDerivation {
-  name = basename + stdenv.lib.optionalString enablePlugin "-irssi-plugin";
+  name = basename + lib.optionalString enablePlugin "-irssi-plugin";
 
   src = fetchurl {
     url = "mirror://sourceforge/silc/silc/client/sources/${basename}.tar.bz2";
@@ -23,18 +23,18 @@ stdenv.mkDerivation {
 
   configureFlags = [ "--with-ncurses=${ncurses.dev}" ];
 
-  preConfigure = stdenv.lib.optionalString enablePlugin ''
+  preConfigure = lib.optionalString enablePlugin ''
     configureFlags="$configureFlags --with-silc-plugin=$out/lib/irssi"
   '';
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ perl glib ncurses ];
 
   meta = {
     homepage = "http://silcnet.org/";
     description = "Secure Internet Live Conferencing server";
-    license = stdenv.lib.licenses.gpl2;
-    maintainers = with stdenv.lib.maintainers; [viric];
-    platforms = with stdenv.lib.platforms; linux;
+    license = lib.licenses.gpl2;
+    maintainers = with lib.maintainers; [viric];
+    platforms = with lib.platforms; linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix
index d4e43ed3a92d..09452aa90b6c 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, dpkg
+{ lib, stdenv, fetchurl, dpkg
 , alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, gdk-pixbuf, glib, glibc, gnome2, gnome3
 , gtk3, libappindicator-gtk3, libnotify, libpulseaudio, libsecret, libv4l, nspr, nss, pango, systemd, wrapGAppsHook, xorg
 , at-spi2-atk, libuuid, at-spi2-core }:
@@ -9,7 +9,7 @@ let
   # source of the latter disappears much faster.
   version = "8.66.0.74";
 
-  rpath = stdenv.lib.makeLibraryPath [
+  rpath = lib.makeLibraryPath [
     alsaLib
     atk
     at-spi2-atk
@@ -114,11 +114,11 @@ in stdenv.mkDerivation {
       --replace /usr/bin/ $out/bin/
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Linux client for skype";
     homepage = "https://www.skype.com";
     license = licenses.unfree;
-    maintainers = with stdenv.lib.maintainers; [ panaeon jraygauthier ];
+    maintainers = with lib.maintainers; [ panaeon jraygauthier ];
     platforms = [ "x86_64-linux" ];
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/slack-term/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/slack-term/default.nix
index c862c253c00a..66d59346c4b1 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/slack-term/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/slack-term/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildGoPackage, fetchFromGitHub }:
+{ lib, stdenv, buildGoPackage, fetchFromGitHub }:
 
 buildGoPackage rec {
   # https://github.com/erroneousboat/slack-term
@@ -14,7 +14,7 @@ buildGoPackage rec {
     sha256 = "1fbq7bdhy70hlkklppimgdjamnk0v059pg73xm9ax1f4616ki1m6";
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Slack client for your terminal";
     homepage = "https://github.com/erroneousboat/slack-term";
     license = licenses.mit;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/slack/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/slack/default.nix
index 5f367c76a928..54c652aab6a8 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/slack/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/slack/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchurl
 , dpkg
 , undmg
@@ -41,11 +41,11 @@ let
 
   pname = "slack";
 
-  x86_64-darwin-version = "4.11.1";
-  x86_64-darwin-sha256 = "0a5rq8zhgdckwxnyjv6nrgpnj682j1rd9yc4nwvsbvpzv15kmd35";
+  x86_64-darwin-version = "4.12.2";
+  x86_64-darwin-sha256 = "0qflv2glfy7d77zjgqi7qcjr53c9dni26gmqkg9vk2xijmmd3xy7";
 
-  x86_64-linux-version = "4.11.1";
-  x86_64-linux-sha256 = "1r43g3xnla5aq38l3mpba8jb1gx9m2b6pr84prsclz27nr0rfm6g";
+  x86_64-linux-version = "4.12.2";
+  x86_64-linux-sha256 = "sha256-G5uQI078N7AbhEJs6a/17Hoi5DSdwvYLM1T/ttrEw4s=";
 
   version = {
     x86_64-darwin = x86_64-darwin-version;
@@ -65,7 +65,7 @@ let
     };
   }.${system} or throwSystem;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Desktop client for Slack";
     homepage = "https://slack.com";
     license = licenses.unfree;
@@ -78,7 +78,7 @@ let
 
     passthru.updateScript = ./update.sh;
 
-    rpath = stdenv.lib.makeLibraryPath [
+    rpath = lib.makeLibraryPath [
       alsaLib
       at-spi2-atk
       at-spi2-core
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/stride/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/stride/default.nix
index 895ad30360e9..0ce5f764128d 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/stride/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/stride/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchurl, dpkg, alsaLib, atk, cairo, cups, dbus, expat, fontconfig
+{ lib, stdenv, fetchurl, dpkg, alsaLib, atk, cairo, cups, dbus, expat, fontconfig
 , freetype, gdk-pixbuf, glib, gnome2, nspr, nss, pango, udev, xorg }:
 let
-  fullPath = stdenv.lib.makeLibraryPath [
+  fullPath = lib.makeLibraryPath [
     alsaLib
     atk
     cairo
@@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
       "$out/bin/stride"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Desktop client for Atlassian Stride";
     homepage = "https://www.stride.com/";
     license = licenses.unfree;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/swift-im/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/swift-im/default.nix
index c520835b1f0c..1dadc728eeef 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/swift-im/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/swift-im/default.nix
@@ -1,4 +1,4 @@
-{ mkDerivation, stdenv, fetchurl, pkgconfig, qttools, sconsPackages
+{ mkDerivation, lib, stdenv, fetchurl, pkg-config, qttools, sconsPackages
 , GConf, avahi, boost, hunspell, libXScrnSaver, libedit, libidn, libnatpmp, libxml2
 , lua, miniupnpc, openssl, qtbase, qtmultimedia, qtsvg, qtwebkit, qtx11extras, zlib
 }:
@@ -14,7 +14,7 @@ mkDerivation rec {
 
   patches = [ ./qt-5.11.patch ./scons.patch ];
 
-  nativeBuildInputs = [ pkgconfig qttools sconsPackages.scons_3_1_2 ];
+  nativeBuildInputs = [ pkg-config qttools sconsPackages.scons_3_1_2 ];
 
   buildInputs = [
     GConf avahi boost hunspell libXScrnSaver libedit libidn libnatpmp libxml2
@@ -34,7 +34,7 @@ mkDerivation rec {
   installTargets = [ (placeholder "out") ];
   installFlags = [ "SWIFT_INSTALLDIR=${placeholder "out"}" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://swift.im/";
     description = "Qt XMPP client";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/tangram/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/tangram/default.nix
new file mode 100644
index 000000000000..e7ca8c320ac6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/tangram/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, lib, fetchFromGitHub, appstream-glib, desktop-file-utils, gdk-pixbuf
+, gettext, gjs, glib, gobject-introspection, gsettings-desktop-schemas, gtk3
+, hicolor-icon-theme, meson, ninja, pkg-config, python3, webkitgtk, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tangram";
+  version = "1.3.1";
+
+  src = fetchFromGitHub {
+    owner = "sonnyp";
+    repo = "Tangram";
+    rev = "v${version}";
+    sha256 = "0bhs9s6c2k06i3cx01h2102lgl7g6vxm3k63jkkhh2bwdpc9kvn3";
+    fetchSubmodules = true;
+  };
+
+  buildInputs = [ gdk-pixbuf gjs glib gsettings-desktop-schemas gtk3 webkitgtk ];
+
+  nativeBuildInputs = [
+    appstream-glib
+    desktop-file-utils
+    gettext
+    gobject-introspection
+    hicolor-icon-theme
+    meson
+    ninja
+    pkg-config
+    python3
+    wrapGAppsHook
+  ];
+
+  dontWrapGApps = true;
+
+  # Fixes https://github.com/NixOS/nixpkgs/issues/31168
+  postPatch = ''
+    chmod +x build-aux/meson/postinstall.py
+    patchShebangs build-aux/meson/postinstall.py
+  '';
+
+  postFixup = ''
+    for file in $out/bin/re.sonny.Tangram; do
+      sed -e $"2iimports.package._findEffectiveEntryPointName = () => \'$(basename $file)\' " \
+         -i $file
+      wrapGApp "$file"
+     done
+  '';
+
+  meta = with lib; {
+    description = "Run web apps on your desktop";
+    homepage = "https://github.com/sonnyp/Tangram";
+    license = licenses.gpl3Only;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ austinbutler ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix
index 1f4e11527ccd..af3235bbdc7c 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/teams/default.nix
@@ -78,7 +78,7 @@ stdenv.mkDerivation rec {
     done;
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Microsoft Teams";
     homepage = "https://teams.microsoft.com";
     downloadPage = "https://teams.microsoft.com/downloads";
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/teamspeak/client.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
index ba726d5b3771..988674079163 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, makeWrapper, makeDesktopItem, zlib, glib, libpng, freetype, openssl
+{ lib, stdenv, fetchurl, makeWrapper, makeDesktopItem, zlib, glib, libpng, freetype, openssl
 , xorg, fontconfig, qtbase, qtwebengine, qtwebchannel, qtsvg, qtwebsockets, xkeyboard_config
 , alsaLib, libpulseaudio ? null, libredirect, quazip, which, unzip, llvmPackages, writeShellScriptBin
 }:
@@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
       patchelf --replace-needed libquazip.so ${quazip}/lib/libquazip5.so ts3client
       patchelf \
         --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-        --set-rpath ${stdenv.lib.makeLibraryPath deps}:$(cat $NIX_CC/nix-support/orig-cc)/${libDir} \
+        --set-rpath ${lib.makeLibraryPath deps}:$(cat $NIX_CC/nix-support/orig-cc)/${libDir} \
         --force-rpath \
         ts3client
     '';
@@ -99,7 +99,7 @@ stdenv.mkDerivation rec {
   dontStrip = true;
   dontPatchELF = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "The TeamSpeak voice communication tool";
     homepage = "https://teamspeak.com/";
     license = {
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/teamspeak/server.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/teamspeak/server.nix
index 521e60c78f00..3dfbb69e83c7 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/teamspeak/server.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/teamspeak/server.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, postgresql, autoPatchelfHook, writeScript }:
+{ lib, stdenv, fetchurl, postgresql, autoPatchelfHook, writeScript }:
 
 let
   arch = if stdenv.is64bit then "amd64" else "x86";
@@ -51,7 +51,7 @@ in stdenv.mkDerivation rec {
     update-source-version teamspeak_server "$version" --system=x86_64-linux
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "TeamSpeak voice communication server";
     homepage = "https://teamspeak.com/";
     license = licenses.unfreeRedistributable;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
index d4cc5293a9be..20da2a65dc26 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
@@ -1,5 +1,5 @@
 { mkDerivation, lib, fetchurl, callPackage
-, pkgconfig, cmake, ninja, python3, wrapGAppsHook, wrapQtAppsHook, removeReferencesTo
+, pkg-config, cmake, ninja, python3, wrapGAppsHook, wrapQtAppsHook, removeReferencesTo
 , qtbase, qtimageformats, gtk3, libsForQt5, enchant2, lz4, xxHash
 , dee, ffmpeg, openalSoft, minizip, libopus, alsaLib, libpulseaudio, range-v3
 , tl-expected, hunspell
@@ -41,7 +41,7 @@ in mkDerivation rec {
   dontWrapGApps = true;
   dontWrapQtApps = true;
 
-  nativeBuildInputs = [ pkgconfig cmake ninja python3 wrapGAppsHook wrapQtAppsHook removeReferencesTo ];
+  nativeBuildInputs = [ pkg-config cmake ninja python3 wrapGAppsHook wrapQtAppsHook removeReferencesTo ];
 
   buildInputs = [
     qtbase qtimageformats gtk3 libsForQt5.libdbusmenu enchant2 lz4 xxHash
@@ -52,8 +52,6 @@ in mkDerivation rec {
     pcre xorg.libpthreadstubs xorg.libXdmcp util-linux libselinux libsepol epoxy at-spi2-core libXtst
   ];
 
-  enableParallelBuilding = true;
-
   cmakeFlags = [
     "-Ddisable_autoupdate=ON"
     # We're allowed to used the API ID of the Snap package:
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/gabble/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/gabble/default.nix
index d81af8388aac..3fe88c287c58 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/gabble/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/gabble/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, libxslt, telepathy-glib, libxml2, dbus-glib, dbus
+{ lib, stdenv, fetchurl, pkg-config, libxslt, telepathy-glib, libxml2, dbus-glib, dbus
 , sqlite, libsoup, libnice, gnutls}:
 
 stdenv.mkDerivation rec {
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "174nlkqm055vrhv11gy73m20jbsggcb0ddi51c7s9m3j5ibr2p0i";
   };
 
-  nativeBuildInputs = [ pkgconfig libxslt ];
+  nativeBuildInputs = [ pkg-config libxslt ];
   buildInputs = [ libxml2 dbus-glib sqlite libsoup libnice telepathy-glib gnutls telepathy-glib.python ];
 
   checkInputs = [ dbus.daemon ];
@@ -19,10 +19,10 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
   doCheck = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://telepathy.freedesktop.org/components/telepathy-gabble/";
     description = "Jabber/XMPP connection manager for the Telepathy framework";
     license = licenses.lgpl21Plus;
-    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;
+    platforms = lib.platforms.gnu ++ lib.platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/haze/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/haze/default.nix
index 6d4ff62f22a8..74e4d1039e77 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/haze/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/haze/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, pidgin, telepathy-glib, glib, dbus-glib, pkgconfig, libxslt }:
+{ lib, stdenv, fetchurl, fetchpatch, pidgin, telepathy-glib, glib, dbus-glib, pkg-config, libxslt }:
 
 stdenv.mkDerivation rec {
   pname = "telepathy-haze";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ glib telepathy-glib dbus-glib pidgin telepathy-glib.python ];
 
-  nativeBuildInputs = [ pkgconfig libxslt ];
+  nativeBuildInputs = [ pkg-config libxslt ];
 
   patches = [
     # Patch from Gentoo that helps telepathy-haze build with more
@@ -24,6 +24,6 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "A Telepathy connection manager based on libpurple";
-    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # Random choice
+    platforms = lib.platforms.gnu ++ lib.platforms.linux; # Random choice
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/idle/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/idle/default.nix
index f3d1e6cfd750..bc66d77e2246 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/idle/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/idle/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, glib, dconf, pkgconfig, dbus-glib, telepathy-glib, libxslt, makeWrapper }:
+{ lib, stdenv, fetchurl, glib, dconf, pkg-config, dbus-glib, telepathy-glib, libxslt, makeWrapper }:
 
 stdenv.mkDerivation rec {
   pname = "telepathy-idle";
@@ -9,17 +9,17 @@ stdenv.mkDerivation rec {
     sha256 = "1argdzbif1vdmwp5vqbgkadq9ancjmgdm2ncp0qfckni715ss4rh";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ glib telepathy-glib dbus-glib libxslt telepathy-glib.python (stdenv.lib.getLib dconf) makeWrapper ];
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib telepathy-glib dbus-glib libxslt telepathy-glib.python (lib.getLib dconf) makeWrapper ];
 
   preFixup = ''
     wrapProgram "$out/libexec/telepathy-idle" \
-      --prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib dconf}/lib/gio/modules"
+      --prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules"
   '';
 
   meta = {
     description = "IRC connection manager for the Telepathy framework";
-    license = stdenv.lib.licenses.lgpl21;
-    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;
+    license = lib.licenses.lgpl21;
+    platforms = lib.platforms.gnu ++ lib.platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix
index f8e1f1f2c665..bae29f4b31f1 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/logger/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, dbus-glib, libxml2, sqlite, telepathy-glib, pkgconfig
+{ lib, stdenv, fetchurl, dbus-glib, libxml2, sqlite, telepathy-glib, pkg-config
 , dconf, makeWrapper, intltool, libxslt, gobject-introspection, dbus }:
 
 stdenv.mkDerivation rec {
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [
-    makeWrapper pkgconfig intltool libxslt gobject-introspection
+    makeWrapper pkg-config intltool libxslt gobject-introspection
   ];
   buildInputs = [
     dbus-glib libxml2 sqlite telepathy-glib
@@ -22,11 +22,11 @@ stdenv.mkDerivation rec {
 
   preFixup = ''
     wrapProgram "$out/libexec/telepathy-logger" \
-      --prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib dconf}/lib/gio/modules" \
+      --prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
       --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Logger service for Telepathy framework";
     homepage = "https://telepathy.freedesktop.org/components/telepathy-logger/";
     license = licenses.lgpl21;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix
index bc0657f7b1a7..8464619f1e73 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/mission-control/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchurl
 , pkg-config
 , dconf
@@ -39,11 +39,11 @@ stdenv.mkDerivation rec {
 
   preFixup = ''
     wrapProgram "$lib/libexec/mission-control-5" \
-      --prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib dconf}/lib/gio/modules" \
+      --prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
       --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An account manager and channel dispatcher for the Telepathy framework";
     homepage = "https://telepathy.freedesktop.org/components/telepathy-mission-control/";
     license = licenses.lgpl21Only;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/salut/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/salut/default.nix
index 6513c6324a61..cf166f7e2d34 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/salut/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/telepathy/salut/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, libxslt, glib, libxml2, telepathy-glib, avahi, libsoup
-, libuuid, openssl, pcre, sqlite, pkgconfig }:
+{ lib, stdenv, fetchurl, libxslt, glib, libxml2, telepathy-glib, avahi, libsoup
+, libuuid, openssl, pcre, sqlite, pkg-config }:
 
 stdenv.mkDerivation rec {
   pname = "telepathy-salut";
@@ -14,11 +14,11 @@ stdenv.mkDerivation rec {
   buildInputs = [ glib libxml2 telepathy-glib avahi libsoup libuuid openssl
     sqlite pcre telepathy-glib.python ];
 
-  nativeBuildInputs = [ libxslt pkgconfig ];
+  nativeBuildInputs = [ libxslt pkg-config ];
 
   configureFlags = [ "--disable-avahi-tests" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Link-local XMPP connection manager for Telepathy";
     platforms = platforms.gnu ++ platforms.linux; # Random choice
     maintainers = [ maintainers.lethalman ];
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/tensor/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/tensor/default.nix
index 1ea249a8b51b..93b3315c1eff 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/tensor/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/tensor/default.nix
@@ -1,4 +1,4 @@
-{ mkDerivation, stdenv, fetchgit, qtbase, qtquickcontrols, qmake, makeDesktopItem }:
+{ mkDerivation, lib, stdenv, fetchgit, qtbase, qtquickcontrols, qmake, makeDesktopItem }:
 
 # we now have libqmatrixclient so a future version of tensor that supports it
 # should use that
@@ -45,7 +45,7 @@ mkDerivation rec {
     runHook postInstall
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://matrix.org/docs/projects/client/tensor.html";
     description = "Cross-platform Qt5/QML-based Matrix client";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/torchat/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/torchat/default.nix
index 8231f481ee0d..087dd502946d 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/torchat/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/torchat/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, python, unzip, wxPython, wrapPython, tor }:
+{ lib, stdenv, fetchurl, python, unzip, wxPython, wrapPython, tor }:
 stdenv.mkDerivation rec {
 
   pname = "torchat";
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
         --add-flags "-O $out/lib/torchat/torchat.py"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/prof7bit/TorChat";
     description = "Instant messaging application on top of the Tor network and it's location hidden services";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/toxic/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/toxic/default.nix
index a2489427b946..e59e58644322 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/toxic/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/toxic/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchFromGitHub, libsodium, ncurses, curl
-, libtoxcore, openal, libvpx, freealut, libconfig, pkgconfig, libopus
+{ lib, stdenv, fetchFromGitHub, libsodium, ncurses, curl
+, libtoxcore, openal, libvpx, freealut, libconfig, pkg-config, libopus
 , qrencode, gdk-pixbuf, libnotify }:
 
 stdenv.mkDerivation rec {
@@ -18,12 +18,12 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     libtoxcore libsodium ncurses curl gdk-pixbuf libnotify
-  ] ++ stdenv.lib.optionals (!stdenv.isAarch32) [
+  ] ++ lib.optionals (!stdenv.isAarch32) [
     openal libopus libvpx freealut qrencode
   ];
-  nativeBuildInputs = [ pkgconfig libconfig ];
+  nativeBuildInputs = [ pkg-config libconfig ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Reference CLI for Tox";
     license = licenses.gpl3Plus;
     maintainers = with maintainers; [ ];
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/turses/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/turses/default.nix
index b6017277b0a5..4c49f41f623b 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/turses/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/turses/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchpatch, python3Packages }:
+{ lib, stdenv, fetchpatch, python3Packages }:
 
-with stdenv.lib;
+with lib;
 with python3Packages;
 
 buildPythonPackage rec {
@@ -44,7 +44,7 @@ buildPythonPackage rec {
     sed -i -e "s|self.observer.update.assert_called_once()|assert self.observer.update.call_count == 1|" tests/test_meta.py
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/louipc/turses";
     description = "A Twitter client for the console";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/twinkle/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/twinkle/default.nix
index b6f0b87dc848..004a4dab8236 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/twinkle/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/twinkle/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromGitHub
 , cmake
 , libxml2
@@ -73,7 +73,7 @@ mkDerivation rec {
     /* "-DWITH_DIAMONDCARD=On" seems ancient and broken */
   ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     changelog = "https://github.com/LubosD/twinkle/blob/${version}/NEWS";
     description = "A SIP-based VoIP client";
     homepage = "http://twinkle.dolezel.info/";
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/utox/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/utox/default.nix
index b360793e484b..668e614c4746 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/utox/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/utox/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, check, cmake, pkgconfig
+{ lib, stdenv, fetchFromGitHub, check, cmake, pkg-config
 , libtoxcore, filter-audio, dbus, libvpx, libX11, openal, freetype, libv4l
 , libXrender, fontconfig, libXext, libXft, libsodium, libopus }:
 
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
   ];
 
   nativeBuildInputs = [
-    cmake pkgconfig
+    cmake pkg-config
   ];
 
   cmakeFlags = [
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
   doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
   checkInputs = [ check ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Lightweight Tox client";
     homepage = "https://github.com/uTox/uTox";
     license = licenses.gpl3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/vacuum/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/vacuum/default.nix
index ed320d9679d6..0fc7e8b6d8ee 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/vacuum/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/vacuum/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub
+{ lib, stdenv, fetchFromGitHub
   , qt4, qmake4Hook, openssl
   , xorgproto, libX11, libXScrnSaver
   , xz, zlib
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
 
   hardeningDisable = [ "format" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An XMPP client fully composed of plugins";
     maintainers = [ maintainers.raskin ];
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/viber/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/viber/default.nix
index 24ce75dc7974..4389ee153c56 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/viber/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/viber/default.nix
@@ -1,4 +1,4 @@
-{fetchurl, stdenv, dpkg, makeWrapper,
+{fetchurl, lib, stdenv, dpkg, makeWrapper,
  alsaLib, cups, curl, dbus, expat, fontconfig, freetype, glib, gst_all_1,
  harfbuzz, libcap, libGL, libGLU, libpulseaudio, libxkbcommon, libxml2, libxslt,
  nspr, nss, openssl, systemd, wayland, xorg, zlib, ...
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
 
   dontUnpack = true;
 
-  libPath = stdenv.lib.makeLibraryPath [
+  libPath = lib.makeLibraryPath [
       alsaLib
       cups
       curl
@@ -98,9 +98,9 @@ stdenv.mkDerivation {
   meta = {
     homepage = "http://www.viber.com";
     description = "An instant messaging and Voice over IP (VoIP) app";
-    license = stdenv.lib.licenses.unfree;
+    license = lib.licenses.unfree;
     platforms = [ "x86_64-linux" ];
-    maintainers = with stdenv.lib.maintainers; [ jagajaga ];
+    maintainers = with lib.maintainers; [ jagajaga ];
   };
 
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix
index 2910c389daac..d7deb7ee052c 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix
@@ -44,7 +44,7 @@ in stdenv.mkDerivation {
     cp -r --parents share/pixmaps $out
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Simple and Convenient Messaging App for VK";
     homepage = "https://vk.com/messenger";
     license = licenses.unfree;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/wavebox/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/wavebox/default.nix
index bdc8aabf61cf..f90269fc83e3 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/wavebox/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/wavebox/default.nix
@@ -1,9 +1,9 @@
 { alsaLib, autoPatchelfHook, fetchurl, gtk3, libnotify
-, makeDesktopItem, makeWrapper, nss, stdenv, udev, xdg_utils
+, makeDesktopItem, makeWrapper, nss, lib, stdenv, udev, xdg_utils
 , xorg
 }:
 
-with stdenv.lib;
+with lib;
 
 let
   bits = "x86_64";
@@ -57,7 +57,7 @@ in stdenv.mkDerivation {
       --prefix PATH : ${xdg_utils}/bin
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Wavebox messaging application";
     homepage = "https://wavebox.io";
     license = licenses.mpl20;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix
index b198b954bd40..966583d2089a 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix
@@ -31,7 +31,7 @@ let
     x86_64-linux = "033804nkz1fdmq3p8iplrlx708x1fjlr09bmrpy36lqg5h7m3yd6";
   }.${system} or throwSystem;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A modern, secure messenger for everyone";
     longDescription = ''
       Wire Personal is a secure, privacy-friendly messenger. It combines useful
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/xmpp-client/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/xmpp-client/default.nix
index 52cf8e3279a0..fb1f5a0a69c6 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/xmpp-client/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/xmpp-client/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, buildGoPackage, fetchFromGitHub }:
+{ lib, stdenv, buildGoPackage, fetchFromGitHub }:
 
 buildGoPackage rec {
   pname = "xmpp-client";
-  version = "20160916-${stdenv.lib.strings.substring 0 7 rev}";
+  version = "20160916-${lib.strings.substring 0 7 rev}";
   rev = "abbf9020393e8caae3e8996a16ce48446e31cf0e";
 
   goPackagePath = "github.com/agl/xmpp-client";
@@ -16,7 +16,7 @@ buildGoPackage rec {
 
   goDeps = ./deps.nix;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An XMPP client with OTR support";
     homepage = "https://github.com/agl/xmpp-client";
     license = licenses.bsd3;
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/ytalk/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/ytalk/default.nix
index 8cb22aabc69b..1ccc9fbe6f57 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/ytalk/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/ytalk/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses }:
+{ lib, stdenv, fetchurl, ncurses }:
 
 stdenv.mkDerivation rec {
   pname = "ytalk";
@@ -14,8 +14,8 @@ stdenv.mkDerivation rec {
   meta = {
     homepage    = "http://ytalk.ourproject.org";
     description = "A terminal based talk client";
-    platforms   = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ taeer ];
-    license     = stdenv.lib.licenses.gpl2Plus;
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ taeer ];
+    license     = lib.licenses.gpl2Plus;
   };
 }
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/zoom-us/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
index 887e3f458bc4..089f0b327af3 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
@@ -1,136 +1,126 @@
-{ stdenv, fetchurl, mkDerivation, autoPatchelfHook, bash
+{ stdenv
+, lib
+, fetchurl
+, mkDerivation
+, makeWrapper
 , fetchFromGitHub
 # Dynamic libraries
-, dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative
-, qtgraphicaleffects, qtimageformats, qtlocation, qtquickcontrols
-, qtquickcontrols2, qtscript, qtsvg , qttools, qtwayland, qtwebchannel
-, qtwebengine
+, alsaLib
+, atk
+, cairo
+, dbus
+, libGL
+, fontconfig
+, freetype
+, gtk3
+, gdk-pixbuf
+, glib
+, pango
+, wayland
+, xorg
+, libxkbcommon
+, zlib
 # Runtime
-, coreutils, faac, pciutils, procps, util-linux
+, coreutils
+, pciutils
+, procps
+, util-linux
+, qttools
 , pulseaudioSupport ? true, libpulseaudio ? null
-, alsaSupport ? stdenv.isLinux, alsaLib ? null
 }:
 
 assert pulseaudioSupport -> libpulseaudio != null;
 
 let
-  inherit (stdenv.lib) concatStringsSep makeBinPath optional;
-
-  version = "5.4.53350.1027";
+  version = "5.4.57862.0110";
   srcs = {
     x86_64-linux = fetchurl {
-      url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
-      sha256 = "11va3px42y81bwy10mxm7mk0kf2sni9gwb422pq9djck2dgchw5x";
+      url = "https://zoom.us/client/${version}/zoom_x86_64.pkg.tar.xz";
+      sha256 = "sha256-ZAwXhbZ3nT6PGkSC1vnX2y/XUOZfped0r3OuedI62gY=";
     };
   };
-
-  # Used for icons, appdata, and desktop file.
-  desktopIntegration = fetchFromGitHub {
-    owner = "flathub";
-    repo = "us.zoom.Zoom";
-    rev = "25e14f8141cdc682b4f7d9ebe15608619f5a19f2";
-    sha256 = "0w3pdd5484r3nsb4iahi37jdlm37vm1053sb8k2zlqb9s554zjwp";
-  };
-
-in mkDerivation {
-  pname = "zoom-us";
-  inherit version;
-
-  src = srcs.${stdenv.hostPlatform.system};
-
-  nativeBuildInputs = [ autoPatchelfHook ];
-
-  buildInputs = [
-    dbus glib libGL libX11 libXfixes libuuid libxcb faac qtbase
-    qtdeclarative qtgraphicaleffects qtlocation qtquickcontrols qtquickcontrols2
-    qtscript qtwebchannel qtwebengine qtimageformats qtsvg qttools qtwayland
+  dontUnpack = true;
+
+  libs = lib.makeLibraryPath ([
+    # $ LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH:$PWD ldd zoom | grep 'not found'
+    alsaLib
+    atk
+    cairo
+    dbus
+    libGL
+    fontconfig
+    freetype
+    gtk3
+    gdk-pixbuf
+    glib
+    pango
+    stdenv.cc.cc
+    wayland
+    xorg.libX11
+    xorg.libxcb
+    xorg.libXcomposite
+    xorg.libXext
+    libxkbcommon
+    xorg.libXrender
+    zlib
+    xorg.xcbutilimage
+    xorg.xcbutilkeysyms
+    xorg.libXfixes
+    xorg.libXtst
+  ] ++ lib.optional (pulseaudioSupport) libpulseaudio);
+
+in stdenv.mkDerivation {
+  name = "zoom-${version}";
+
+  dontUnpack = true;
+
+  nativeBuildInputs = [
+    makeWrapper
   ];
 
-  runtimeDependencies = optional pulseaudioSupport libpulseaudio
-    ++ optional alsaSupport alsaLib;
-
-  installPhase =
-    let
-      files = concatStringsSep " " [
-        "*.pcm"
-        "*.png"
-        "ZoomLauncher"
-        "config-dump.sh"
-        "timezones"
-        "translations"
-        "version.txt"
-        "zcacert.pem"
-        "zoom"
-        "zoom.sh"
-        "zopen"
-      ];
-    in ''
-      runHook preInstall
-
-      mkdir -p $out/{bin,share/zoom-us}
-
-      cp -ar ${files} $out/share/zoom-us
-
-      # TODO Patch this somehow; tries to dlopen './libturbojpeg.so' from cwd
-      cp libturbojpeg.so $out/share/zoom-us/libturbojpeg.so
-
-      # Again, requires faac with a nonstandard filename.
-      ln -s $(readlink -e "${faac}/lib/libfaac.so") $out/share/zoom-us/libfaac1.so
-
-      runHook postInstall
-    '';
-
-  postInstall = ''
-    mkdir -p $out/share/{applications,appdata,icons}
+  installPhase = ''
+    runHook preInstall
+    mkdir $out
+    tar -C $out -xf ${srcs.${stdenv.hostPlatform.system}}
+    mv $out/usr/* $out/
+    runHook postInstall
+  '';
 
+  postFixup = ''
     # Desktop File
-    cp ${desktopIntegration}/us.zoom.Zoom.desktop $out/share/applications
-    substituteInPlace $out/share/applications/us.zoom.Zoom.desktop \
-        --replace "Exec=zoom" "Exec=$out/bin/zoom-us"
-
-    # Appdata
-    cp ${desktopIntegration}/us.zoom.Zoom.appdata.xml $out/share/appdata
+    substituteInPlace $out/share/applications/Zoom.desktop \
+        --replace "Exec=/usr/bin/zoom" "Exec=$out/bin/zoom"
 
-    # Icons
-    for icon_size in 64 96 128 256; do
-        path=$icon_size'x'$icon_size
-        icon=${desktopIntegration}/us.zoom.Zoom.$icon_size.png
-
-        mkdir -p $out/share/icons/hicolor/$path/apps
-        cp $icon $out/share/icons/hicolor/$path/apps/us.zoom.Zoom.png
+    for i in zopen zoom ZoomLauncher; do
+      patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/opt/zoom/$i
     done
-  '';
 
-  # $out/share/zoom-us isn't in auto-wrap directories list, need manual wrapping
-  dontWrapQtApps = true;
+    # ZoomLauncher sets LD_LIBRARY_PATH before execing zoom
+    wrapProgram $out/opt/zoom/zoom \
+      --prefix LD_LIBRARY_PATH ":" ${libs}
 
-  qtWrapperArgs = [
-    ''--prefix PATH : ${makeBinPath [ coreutils glib.dev pciutils procps qttools.dev util-linux ]}''
-    # --run "cd ${placeholder "out"}/share/zoom-us"
-    # ^^ unfortunately, breaks run arg into multiple array elements, due to
-    # some bad array propagation. We'll do that in bash below
-  ];
-
-  postFixup = ''
+    rm $out/bin/zoom
     # Zoom expects "zopen" executable (needed for web login) to be present in CWD. Or does it expect
     # everybody runs Zoom only after cd to Zoom package directory? Anyway, :facepalm:
-    qtWrapperArgs+=( --run "cd ${placeholder "out"}/share/zoom-us" )
-
-    for app in ZoomLauncher zopen zoom; do
-      wrapQtApp $out/share/zoom-us/$app
-    done
+    makeWrapper $out/opt/zoom/ZoomLauncher $out/bin/zoom \
+      --run "cd $out/opt/zoom" \
+      --prefix PATH : ${lib.makeBinPath [ coreutils glib.dev pciutils procps qttools.dev util-linux ]} \
+      --prefix LD_LIBRARY_PATH ":" ${libs}
 
-    ln -s $out/share/zoom-us/ZoomLauncher $out/bin/zoom-us
+    # Backwards compatiblity: we used to call it zoom-us
+    ln -s $out/bin/{zoom,zoom-us}
   '';
 
+  # already done
+  dontPatchELF = true;
+
   passthru.updateScript = ./update.sh;
 
   meta = {
     homepage = "https://zoom.us/";
     description = "zoom.us video conferencing application";
-    license = stdenv.lib.licenses.unfree;
+    license = lib.licenses.unfree;
     platforms = builtins.attrNames srcs;
-    maintainers = with stdenv.lib.maintainers; [ danbst tadfisher doronbehar ];
+    maintainers = with lib.maintainers; [ danbst tadfisher doronbehar ];
   };
-
 }