summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorBen Siraphob <bensiraphob@gmail.com>2021-01-15 12:42:41 +0700
committerBen Siraphob <bensiraphob@gmail.com>2021-01-15 14:24:03 +0700
commit108bdac3d99b6d94d3740422af5945e510238304 (patch)
treedd91cf11f7c29bbd4542f5bdab986430025c02e2 /pkgs/applications/video
parent2e34288f0d8cf01eea228c7dbc50af9589b885f3 (diff)
downloadnixpkgs-108bdac3d99b6d94d3740422af5945e510238304.tar
nixpkgs-108bdac3d99b6d94d3740422af5945e510238304.tar.gz
nixpkgs-108bdac3d99b6d94d3740422af5945e510238304.tar.bz2
nixpkgs-108bdac3d99b6d94d3740422af5945e510238304.tar.lz
nixpkgs-108bdac3d99b6d94d3740422af5945e510238304.tar.xz
nixpkgs-108bdac3d99b6d94d3740422af5945e510238304.tar.zst
nixpkgs-108bdac3d99b6d94d3740422af5945e510238304.zip
pkgs/applications: stdenv.lib -> lib
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/aegisub/default.nix7
-rw-r--r--pkgs/applications/video/avidemux/default.nix4
-rw-r--r--pkgs/applications/video/avxsynth/default.nix2
-rw-r--r--pkgs/applications/video/ccextractor/default.nix6
-rw-r--r--pkgs/applications/video/cinelerra/default.nix6
-rw-r--r--pkgs/applications/video/clipgrab/default.nix2
-rw-r--r--pkgs/applications/video/coriander/default.nix10
-rw-r--r--pkgs/applications/video/dvd-slideshow/default.nix6
-rw-r--r--pkgs/applications/video/dvdbackup/default.nix8
-rw-r--r--pkgs/applications/video/dvdstyler/default.nix2
-rw-r--r--pkgs/applications/video/epgstation/default.nix7
-rw-r--r--pkgs/applications/video/filebot/default.nix2
-rw-r--r--pkgs/applications/video/kino/default.nix6
-rw-r--r--pkgs/applications/video/kodi/plugins.nix2
-rw-r--r--pkgs/applications/video/kodi/wrapper.nix2
-rw-r--r--pkgs/applications/video/lightworks/default.nix8
-rw-r--r--pkgs/applications/video/lxdvdrip/default.nix8
-rw-r--r--pkgs/applications/video/makemkv/default.nix4
-rw-r--r--pkgs/applications/video/mkvtoolnix/default.nix2
-rw-r--r--pkgs/applications/video/mplayer/default.nix16
-rw-r--r--pkgs/applications/video/mpv/default.nix4
-rw-r--r--pkgs/applications/video/natron/default.nix2
-rw-r--r--pkgs/applications/video/obs-studio/default.nix4
-rw-r--r--pkgs/applications/video/ogmtools/default.nix6
-rw-r--r--pkgs/applications/video/olive-editor/default.nix2
-rw-r--r--pkgs/applications/video/omxplayer/default.nix14
-rw-r--r--pkgs/applications/video/openshot-qt/default.nix4
-rw-r--r--pkgs/applications/video/openshot-qt/libopenshot-audio.nix4
-rw-r--r--pkgs/applications/video/openshot-qt/libopenshot.nix4
-rw-r--r--pkgs/applications/video/p2pvc/default.nix8
-rw-r--r--pkgs/applications/video/peek/default.nix2
-rw-r--r--pkgs/applications/video/pitivi/default.nix2
-rw-r--r--pkgs/applications/video/qstopmotion/default.nix4
-rw-r--r--pkgs/applications/video/quvi/library.nix6
-rw-r--r--pkgs/applications/video/quvi/scripts.nix6
-rw-r--r--pkgs/applications/video/quvi/tool.nix6
-rw-r--r--pkgs/applications/video/shotcut/default.nix6
-rw-r--r--pkgs/applications/video/sub-batch/default.nix4
-rw-r--r--pkgs/applications/video/subdl/default.nix10
-rw-r--r--pkgs/applications/video/subtitleeditor/default.nix8
-rw-r--r--pkgs/applications/video/tartube/default.nix2
-rw-r--r--pkgs/applications/video/vcs/default.nix4
-rw-r--r--pkgs/applications/video/vdr/plugins.nix2
-rw-r--r--pkgs/applications/video/vlc/default.nix2
-rw-r--r--pkgs/applications/video/w_scan/default.nix8
-rw-r--r--pkgs/applications/video/webtorrent_desktop/default.nix2
-rw-r--r--pkgs/applications/video/wxcam/default.nix2
-rw-r--r--pkgs/applications/video/xawtv/default.nix8
-rw-r--r--pkgs/applications/video/xscast/default.nix2
-rw-r--r--pkgs/applications/video/xvidcap/default.nix2
50 files changed, 126 insertions, 124 deletions
diff --git a/pkgs/applications/video/aegisub/default.nix b/pkgs/applications/video/aegisub/default.nix
index 54dac5c2aa1..d39b5e179a6 100644
--- a/pkgs/applications/video/aegisub/default.nix
+++ b/pkgs/applications/video/aegisub/default.nix
@@ -1,4 +1,5 @@
-{ config
+{ lib
+, config
 , stdenv
 , fetchurl
 , fetchpatch
@@ -45,7 +46,7 @@ assert alsaSupport -> (alsaLib != null);
 assert pulseaudioSupport -> (libpulseaudio != null);
 assert portaudioSupport -> (portaudio != null);
 
-with stdenv.lib;
+with lib;
 stdenv.mkDerivation
  rec {
   pname = "aegisub";
@@ -81,7 +82,7 @@ stdenv.mkDerivation
     intltool
   ];
 
-  buildInputs = with stdenv.lib; [
+  buildInputs = with lib; [
     libX11
     wxGTK
     fontconfig
diff --git a/pkgs/applications/video/avidemux/default.nix b/pkgs/applications/video/avidemux/default.nix
index 69e33f986a8..8c8a0c1c3f6 100644
--- a/pkgs/applications/video/avidemux/default.nix
+++ b/pkgs/applications/video/avidemux/default.nix
@@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
     ++ lib.optional withVPX libvpx;
 
   buildCommand = let
-    qtVersion = "5.${stdenv.lib.versions.minor qtbase.version}";
+    qtVersion = "5.${lib.versions.minor qtbase.version}";
     wrapWith = makeWrapper: filename:
       "${makeWrapper} ${filename} --set ADM_ROOT_DIR $out --prefix LD_LIBRARY_PATH : ${libXext}/lib";
     wrapQtApp = wrapWith "wrapQtApp";
@@ -78,7 +78,7 @@ stdenv.mkDerivation rec {
 
     ${wrapProgram "$out/bin/avidemux3_cli"}
 
-    ${stdenv.lib.optionalString withQT ''
+    ${lib.optionalString withQT ''
       ${wrapQtApp "$out/bin/avidemux3_qt5"}
       ${wrapQtApp "$out/bin/avidemux3_jobs_qt5"}
     ''}
diff --git a/pkgs/applications/video/avxsynth/default.nix b/pkgs/applications/video/avxsynth/default.nix
index aed1bcef381..f326965ce44 100644
--- a/pkgs/applications/video/avxsynth/default.nix
+++ b/pkgs/applications/video/avxsynth/default.nix
@@ -4,7 +4,7 @@
 }:
 
 let
-  inherit (stdenv.lib) enableFeature optional;
+  inherit (lib) enableFeature optional;
 in
 
 stdenv.mkDerivation {
diff --git a/pkgs/applications/video/ccextractor/default.nix b/pkgs/applications/video/ccextractor/default.nix
index 91c47516521..bc2ac4e4ef2 100644
--- a/pkgs/applications/video/ccextractor/default.nix
+++ b/pkgs/applications/video/ccextractor/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchFromGitHub, pkgconfig, cmake
+{ lib, stdenv, fetchFromGitHub, pkgconfig, cmake
 , glew, glfw3, leptonica, libiconv, tesseract3, zlib }:
 
-with stdenv.lib;
+with lib;
 stdenv.mkDerivation rec {
   pname = "ccextractor";
   version = "0.88";
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig cmake ];
 
-  buildInputs = [ glew glfw3 leptonica tesseract3 zlib ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv;
+  buildInputs = [ glew glfw3 leptonica tesseract3 zlib ] ++ lib.optional (!stdenv.isLinux) libiconv;
 
   meta = {
     homepage = "https://www.ccextractor.org";
diff --git a/pkgs/applications/video/cinelerra/default.nix b/pkgs/applications/video/cinelerra/default.nix
index 22533b182a0..8d6ff8e5a00 100644
--- a/pkgs/applications/video/cinelerra/default.nix
+++ b/pkgs/applications/video/cinelerra/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, autoconf, automake, libtool
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool
 , pkgconfig, faad2, faac, a52dec, alsaLib, fftw, lame, libavc1394
 , libiec61883, libraw1394, libsndfile, libvorbis, libogg, libjpeg
 , libtiff, freetype, mjpegtools, x264, gettext, openexr
@@ -45,7 +45,7 @@ stdenv.mkDerivation {
   meta = {
     description = "Video Editor";
     homepage = "http://www.cinelerra.org";
-    maintainers = [ stdenv.lib.maintainers.marcweber ];
-    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.marcweber ];
+    license = lib.licenses.gpl2;
   };
 }
diff --git a/pkgs/applications/video/clipgrab/default.nix b/pkgs/applications/video/clipgrab/default.nix
index 7fcd3fce64d..c1701dd5174 100644
--- a/pkgs/applications/video/clipgrab/default.nix
+++ b/pkgs/applications/video/clipgrab/default.nix
@@ -16,7 +16,7 @@ mkDerivation rec {
   buildInputs = [ ffmpeg_3 qtbase qtdeclarative qtlocation qtquickcontrols2 qtwebchannel qtwebengine ];
   nativeBuildInputs = [ qmake qttools ];
 
-  postPatch = stdenv.lib.optionalString (ffmpeg_3 != null) ''
+  postPatch = lib.optionalString (ffmpeg_3 != null) ''
   substituteInPlace converter_ffmpeg.cpp \
     --replace '"ffmpeg"' '"${ffmpeg_3.bin}/bin/ffmpeg"' \
     --replace '"ffmpeg ' '"${ffmpeg_3.bin}/bin/ffmpeg '
diff --git a/pkgs/applications/video/coriander/default.nix b/pkgs/applications/video/coriander/default.nix
index a094bfd904a..5afcab12a08 100644
--- a/pkgs/applications/video/coriander/default.nix
+++ b/pkgs/applications/video/coriander/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, pkgconfig, glib, gtk2, libgnomeui, libXv, libraw1394, libdc1394
+{ lib, stdenv, fetchurl, pkgconfig, glib, gtk2, libgnomeui, libXv, libraw1394, libdc1394
 , SDL, automake, GConf }:
 
 stdenv.mkDerivation {
@@ -15,12 +15,12 @@ stdenv.mkDerivation {
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ glib gtk2 libgnomeui libXv libraw1394 libdc1394 SDL GConf ];
-  
+
   meta = {
     homepage = "https://damien.douxchamps.net/ieee1394/coriander/";
     description = "GUI for controlling a Digital Camera through the IEEE1394 bus";
-    license = stdenv.lib.licenses.gpl3Plus;
-    maintainers = with stdenv.lib.maintainers; [viric];
-    platforms = with stdenv.lib.platforms; linux;
+    license = lib.licenses.gpl3Plus;
+    maintainers = with lib.maintainers; [viric];
+    platforms = with lib.platforms; linux;
   };
 }
diff --git a/pkgs/applications/video/dvd-slideshow/default.nix b/pkgs/applications/video/dvd-slideshow/default.nix
index e35d95d54d6..95f3169718d 100644
--- a/pkgs/applications/video/dvd-slideshow/default.nix
+++ b/pkgs/applications/video/dvd-slideshow/default.nix
@@ -65,8 +65,8 @@ in stdenv.mkDerivation rec {
   meta = {
     description = "Suite of command line programs that creates a slideshow-style video from groups of pictures";
     homepage = "http://dvd-slideshow.sourceforge.net/wiki/Main_Page";
-    license = stdenv.lib.licenses.gpl2;
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.robbinch ];
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.robbinch ];
   };
 }
diff --git a/pkgs/applications/video/dvdbackup/default.nix b/pkgs/applications/video/dvdbackup/default.nix
index 633eea3d282..89995ab8cba 100644
--- a/pkgs/applications/video/dvdbackup/default.nix
+++ b/pkgs/applications/video/dvdbackup/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, libdvdread, libdvdcss, dvdauthor }:
+{ lib, stdenv, fetchurl, fetchpatch, libdvdread, libdvdcss, dvdauthor }:
 
 stdenv.mkDerivation rec {
   version = "0.4.2";
@@ -21,8 +21,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "A tool to rip video DVDs from the command line";
     homepage = "http://dvdbackup.sourceforge.net/";
-    license = stdenv.lib.licenses.gpl3Plus;
-    maintainers = [ stdenv.lib.maintainers.bradediger ];
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.gpl3Plus;
+    maintainers = [ lib.maintainers.bradediger ];
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/video/dvdstyler/default.nix b/pkgs/applications/video/dvdstyler/default.nix
index e3f7f8a0702..8ca3be19e5a 100644
--- a/pkgs/applications/video/dvdstyler/default.nix
+++ b/pkgs/applications/video/dvdstyler/default.nix
@@ -10,7 +10,7 @@
 , dbusSupport ? true, dbus ? null
 , makeWrapper }:
 
-with stdenv.lib;
+with lib;
 stdenv.mkDerivation rec {
 
   pname = "dvdstyler";
diff --git a/pkgs/applications/video/epgstation/default.nix b/pkgs/applications/video/epgstation/default.nix
index 62aa54ca784..53a3535fde4 100644
--- a/pkgs/applications/video/epgstation/default.nix
+++ b/pkgs/applications/video/epgstation/default.nix
@@ -1,4 +1,5 @@
-{ stdenv
+{ lib
+, stdenv
 , fetchFromGitHub
 , common-updater-scripts
 , genericUpdater
@@ -82,7 +83,7 @@ let
 
       makeWrapper ${nodejs}/bin/npm $out/bin/epgstation \
        --run "cd $out/lib/node_modules/EPGStation" \
-       --prefix PATH : ${stdenv.lib.makeBinPath runtimeDeps}
+       --prefix PATH : ${lib.makeBinPath runtimeDeps}
 
       popd
     '';
@@ -113,7 +114,7 @@ in
 pkg // {
   name = "${pname}-${version}";
 
-  meta = with stdenv.lib; pkg.meta // {
+  meta = with lib; pkg.meta // {
     maintainers = with maintainers; [ midchildan ];
 
     # NOTE: updateScript relies on this being correct
diff --git a/pkgs/applications/video/filebot/default.nix b/pkgs/applications/video/filebot/default.nix
index ba0627fc0fa..0e7cce4fee7 100644
--- a/pkgs/applications/video/filebot/default.nix
+++ b/pkgs/applications/video/filebot/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
       --replace 'APP_DATA="$FILEBOT_HOME/data/$(id -u)"' 'APP_DATA=''${XDG_DATA_HOME:-$HOME/.local/share}/filebot/data' \
       --replace '$FILEBOT_HOME/data/.license' '$APP_DATA/.license'
     wrapProgram $out/opt/filebot.sh \
-      --prefix PATH : ${stdenv.lib.makeBinPath [ openjdk11 ]}
+      --prefix PATH : ${lib.makeBinPath [ openjdk11 ]}
     # Expose the binary in bin to make runnable.
     ln -s $out/opt/filebot.sh $out/bin/filebot
   '';
diff --git a/pkgs/applications/video/kino/default.nix b/pkgs/applications/video/kino/default.nix
index 3f41e73dfa7..13beb768d7b 100644
--- a/pkgs/applications/video/kino/default.nix
+++ b/pkgs/applications/video/kino/default.nix
@@ -50,7 +50,7 @@
 #AMR-WB float support      no
 #AMR-WB IF2 support        no
 
-{ stdenv, fetchurl, gtk2, libglade, libxml2, libraw1394, libsamplerate, libdv
+{ lib, stdenv, fetchurl, gtk2, libglade, libxml2, libraw1394, libsamplerate, libdv
 , pkgconfig, perlPackages, libavc1394, libiec61883, libXv, gettext
 , libX11, glib, cairo, intltool, ffmpeg, libv4l
 }:
@@ -89,7 +89,7 @@ stdenv.mkDerivation {
   meta = {
       description = "Non-linear DV editor for GNU/Linux";
       homepage = "http://www.kinodv.org/";
-      license = stdenv.lib.licenses.gpl2;
-    platforms = stdenv.lib.platforms.linux;
+      license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/video/kodi/plugins.nix b/pkgs/applications/video/kodi/plugins.nix
index a0ef8b7e8fe..7d9fdcc3d00 100644
--- a/pkgs/applications/video/kodi/plugins.nix
+++ b/pkgs/applications/video/kodi/plugins.nix
@@ -4,7 +4,7 @@
 , python2Packages, expat, glib, nspr, nss, openssl
 , libssh, libarchive, lzma, bzip2, lz4, lzo }:
 
-with stdenv.lib;
+with lib;
 
 let self = rec {
 
diff --git a/pkgs/applications/video/kodi/wrapper.nix b/pkgs/applications/video/kodi/wrapper.nix
index d0a7ed5e23c..6bec8f9c891 100644
--- a/pkgs/applications/video/kodi/wrapper.nix
+++ b/pkgs/applications/video/kodi/wrapper.nix
@@ -18,7 +18,7 @@ in buildEnv {
         --prefix PYTHONPATH : ${kodi.pythonPackages.makePythonPath plugins} \
         --prefix KODI_HOME : $out/share/kodi \
         --prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath
-          (stdenv.lib.concatMap
+          (lib.concatMap
             (plugin: plugin.extraRuntimeDependencies or []) plugins)}"
     done
   '';
diff --git a/pkgs/applications/video/lightworks/default.nix b/pkgs/applications/video/lightworks/default.nix
index 97e5e67aaec..1776aab0033 100644
--- a/pkgs/applications/video/lightworks/default.nix
+++ b/pkgs/applications/video/lightworks/default.nix
@@ -1,9 +1,9 @@
-{ stdenv, fetchurl, dpkg, makeWrapper, buildFHSUserEnv
+{ lib, stdenv, fetchurl, dpkg, makeWrapper, buildFHSUserEnv
 , gtk3, gdk-pixbuf, cairo, libjpeg_original, glib, pango, libGLU
 , nvidia_cg_toolkit, zlib, openssl, portaudio
 }:
 let
-  fullPath = stdenv.lib.makeLibraryPath [
+  fullPath = lib.makeLibraryPath [
     stdenv.cc.cc
     gtk3
     gdk-pixbuf
@@ -80,8 +80,8 @@ in buildFHSUserEnv {
   meta = {
     description = "Professional Non-Linear Video Editor";
     homepage = "https://www.lwks.com/";
-    license = stdenv.lib.licenses.unfree;
-    maintainers = [ stdenv.lib.maintainers.antonxy ];
+    license = lib.licenses.unfree;
+    maintainers = [ lib.maintainers.antonxy ];
     platforms = [ "x86_64-linux" ];
   };
 }
diff --git a/pkgs/applications/video/lxdvdrip/default.nix b/pkgs/applications/video/lxdvdrip/default.nix
index 16ade40f0b5..6a10aca398c 100644
--- a/pkgs/applications/video/lxdvdrip/default.nix
+++ b/pkgs/applications/video/lxdvdrip/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libdvdread }:
+{ lib, stdenv, fetchurl, libdvdread }:
 
 stdenv.mkDerivation rec {
   name = "lxdvdrip-1.76";
@@ -20,10 +20,10 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ libdvdread ];
 
-  meta = { 
+  meta = {
     description = "Command line tool to make a copy from a video DVD for private use";
     homepage = "https://sourceforge.net/projects/lxdvdrip";
-    license = stdenv.lib.licenses.gpl2;
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/video/makemkv/default.nix b/pkgs/applications/video/makemkv/default.nix
index 35b0d41907b..a2aa45a6e06 100644
--- a/pkgs/applications/video/makemkv/default.nix
+++ b/pkgs/applications/video/makemkv/default.nix
@@ -43,8 +43,8 @@ in mkDerivation {
 
   qtWrapperArgs =
     let
-      binPath = stdenv.lib.makeBinPath [ jre_headless ];
-    in stdenv.lib.optionals withJava [
+      binPath = lib.makeBinPath [ jre_headless ];
+    in lib.optionals withJava [
       ''--prefix PATH : ${binPath}''
     ];
 
diff --git a/pkgs/applications/video/mkvtoolnix/default.nix b/pkgs/applications/video/mkvtoolnix/default.nix
index 9ad64e72fd3..3fed91bd961 100644
--- a/pkgs/applications/video/mkvtoolnix/default.nix
+++ b/pkgs/applications/video/mkvtoolnix/default.nix
@@ -9,7 +9,7 @@
 
 assert withGUI -> qtbase != null && qtmultimedia != null && wrapQtAppsHook != null;
 
-with stdenv.lib;
+with lib;
 
 stdenv.mkDerivation rec {
   pname = "mkvtoolnix";
diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix
index 86047239cc5..757aa42682a 100644
--- a/pkgs/applications/video/mplayer/default.nix
+++ b/pkgs/applications/video/mplayer/default.nix
@@ -1,4 +1,4 @@
-{ config, stdenv, fetchurl, pkgconfig, freetype, yasm, ffmpeg_3
+{ config, lib, stdenv, fetchurl, pkgconfig, freetype, yasm, ffmpeg_3
 , aalibSupport ? true, aalib ? null
 , fontconfigSupport ? true, fontconfig ? null, freefont_ttf ? null
 , fribidiSupport ? true, fribidi ? null
@@ -84,7 +84,7 @@ let
       cp -prv * $out
     '';
 
-    meta.license = stdenv.lib.licenses.unfree;
+    meta.license = lib.licenses.unfree;
   } else null;
 
   crossBuild = stdenv.hostPlatform != stdenv.buildPlatform;
@@ -108,7 +108,7 @@ stdenv.mkDerivation rec {
 
   depsBuildBuild = [ buildPackages.stdenv.cc ];
   nativeBuildInputs = [ pkgconfig yasm ];
-  buildInputs = with stdenv.lib;
+  buildInputs = with lib;
     [ freetype ffmpeg_3 ]
     ++ optional aalibSupport aalib
     ++ optional fontconfigSupport fontconfig
@@ -139,7 +139,7 @@ stdenv.mkDerivation rec {
     ;
 
   configurePlatforms = [ ];
-  configureFlags = with stdenv.lib; [
+  configureFlags = with lib; [
     "--enable-freetype"
     (if fontconfigSupport then "--enable-fontconfig" else "--disable-fontconfig")
     (if x11Support then "--enable-x11 --enable-gl" else "--disable-x11 --disable-gl")
@@ -199,19 +199,19 @@ stdenv.mkDerivation rec {
     echo CONFIG_MPEGAUDIODSP=yes >> config.mak
   '';
 
-  NIX_LDFLAGS = with stdenv.lib; toString (
+  NIX_LDFLAGS = with lib; toString (
        optional  fontconfigSupport "-lfontconfig"
     ++ optional  fribidiSupport "-lfribidi"
     ++ optionals x11Support [ "-lX11" "-lXext" ]
     ++ [ "-lfreetype" ]
   );
 
-  installTargets = [ "install" ] ++ stdenv.lib.optional x11Support "install-gui";
+  installTargets = [ "install" ] ++ lib.optional x11Support "install-gui";
 
   enableParallelBuilding = true;
 
   # Provide a reasonable standard font when not using fontconfig. Maybe we should symlink here.
-  postInstall = stdenv.lib.optionalString (!fontconfigSupport)
+  postInstall = lib.optionalString (!fontconfigSupport)
     ''
       mkdir -p $out/share/mplayer
       cp ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mplayer/subfont.ttf
@@ -224,7 +224,7 @@ stdenv.mkDerivation rec {
     description = "A movie player that supports many video formats";
     homepage = "http://mplayerhq.hu";
     license = "GPL";
-    maintainers = [ stdenv.lib.maintainers.eelco ];
+    maintainers = [ lib.maintainers.eelco ];
     platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
   };
 }
diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix
index 8d487fecfde..05025cb304f 100644
--- a/pkgs/applications/video/mpv/default.nix
+++ b/pkgs/applications/video/mpv/default.nix
@@ -56,7 +56,7 @@
 , zimgSupport        ? true,           zimg          ? null
 }:
 
-with stdenv.lib;
+with lib;
 
 let
   available = x: x != null;
@@ -149,7 +149,7 @@ in stdenv.mkDerivation rec {
     (enableFeature waylandSupport  "wayland")
     (enableFeature stdenv.isLinux  "dvbin")
   ] # Disable whilst Swift isn't supported
-    ++ stdenv.lib.optional (!swiftSupport) "--disable-macos-cocoa-cb";
+    ++ lib.optional (!swiftSupport) "--disable-macos-cocoa-cb";
 
   nativeBuildInputs = [
     addOpenGLRunpath docutils perl pkgconfig python3 wafHook which
diff --git a/pkgs/applications/video/natron/default.nix b/pkgs/applications/video/natron/default.nix
index 75d271c4878..c9486edd250 100644
--- a/pkgs/applications/video/natron/default.nix
+++ b/pkgs/applications/video/natron/default.nix
@@ -121,7 +121,7 @@ stdenv.mkDerivation {
       functionalities to Adobe After Effects and Nuke by The Foundry.
     '';
     homepage = "https://natron.fr/";
-    license = stdenv.lib.licenses.gpl2;
+    license = lib.licenses.gpl2;
     maintainers = [ maintainers.puffnfresh ];
     platforms = platforms.linux;
     broken = true;
diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix
index 1f8357324ea..af4e11ef0dd 100644
--- a/pkgs/applications/video/obs-studio/default.nix
+++ b/pkgs/applications/video/obs-studio/default.nix
@@ -36,7 +36,7 @@
 }:
 
 let
-  inherit (stdenv.lib) optional optionals;
+  inherit (lib) optional optionals;
 
 in mkDerivation rec {
   pname = "obs-studio";
@@ -105,7 +105,7 @@ in mkDerivation rec {
         --prefix "LD_LIBRARY_PATH" : "${xorg.libX11.out}/lib:${libvlc}/lib"
   '';
 
-  postFixup = stdenv.lib.optionalString stdenv.isLinux ''
+  postFixup = lib.optionalString stdenv.isLinux ''
       addOpenGLRunpath $out/lib/lib*.so
       addOpenGLRunpath $out/lib/obs-plugins/*.so
   '';
diff --git a/pkgs/applications/video/ogmtools/default.nix b/pkgs/applications/video/ogmtools/default.nix
index c9c5190dc53..aa0f2404ab8 100644
--- a/pkgs/applications/video/ogmtools/default.nix
+++ b/pkgs/applications/video/ogmtools/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libogg, libvorbis, libdvdread }:
+{ lib, stdenv, fetchurl, libogg, libvorbis, libdvdread }:
 
 stdenv.mkDerivation rec {
   name = "ogmtools-1.5";
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
       tool for extracting chapter information from DVD.
     '';
     homepage = "https://www.bunkus.org/videotools/ogmtools/";
-    license = stdenv.lib.licenses.gpl2;
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/video/olive-editor/default.nix b/pkgs/applications/video/olive-editor/default.nix
index 9356e4676a2..65f032c078c 100644
--- a/pkgs/applications/video/olive-editor/default.nix
+++ b/pkgs/applications/video/olive-editor/default.nix
@@ -25,7 +25,7 @@ mkDerivation rec {
     frei0r
     opencolorio
     qtmultimedia
-  ] ++ stdenv.lib.optional stdenv.isDarwin CoreFoundation;
+  ] ++ lib.optional stdenv.isDarwin CoreFoundation;
 
   meta = with lib; {
     description = "Professional open-source NLE video editor";
diff --git a/pkgs/applications/video/omxplayer/default.nix b/pkgs/applications/video/omxplayer/default.nix
index 28df8ead0c8..3fe3dcf454a 100644
--- a/pkgs/applications/video/omxplayer/default.nix
+++ b/pkgs/applications/video/omxplayer/default.nix
@@ -1,20 +1,20 @@
-{ stdenv, fetchurl
+{ lib, stdenv, fetchurl
 , raspberrypifw, pcre, boost, freetype, zlib
 }:
 
 let
   ffmpeg = stdenv.mkDerivation rec {
     name = "ffmpeg-1.1.3";
-    
+
     src = fetchurl {
       url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
       sha256 = "03s1zsprz5p6gjgwwqcf7b6cvzwwid6l8k7bamx9i0f1iwkgdm0j";
     };
-    
+
     configurePlatforms = [];
     configureFlags = [
       "--arch=${stdenv.hostPlatform.parsed.cpu.name}"
-    ] ++ stdenv.lib.optionals stdenv.hostPlatform.isAarch32 [
+    ] ++ lib.optionals stdenv.hostPlatform.isAarch32 [
       # TODO be better with condition
       "--cpu=arm1176jzf-s"
     ] ++ [
@@ -47,7 +47,7 @@ let
       "--disable-debug"
       "--arch=${stdenv.hostPlatform.parsed.cpu.name}"
       "--target_os=${stdenv.hostPlatform.parsed.kernel.name}"
-    ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
       "--cross-prefix=${stdenv.cc.targetPrefix}"
       "--enable-cross-compile"
     ];
@@ -80,7 +80,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://github.com/huceke/omxplayer";
     description = "Commandline OMX player for the Raspberry Pi";
-    license = stdenv.lib.licenses.gpl2Plus;
-    platforms = stdenv.lib.platforms.arm;
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.arm;
   };
 }
diff --git a/pkgs/applications/video/openshot-qt/default.nix b/pkgs/applications/video/openshot-qt/default.nix
index f3c0187d9cb..5951f4665e4 100644
--- a/pkgs/applications/video/openshot-qt/default.nix
+++ b/pkgs/applications/video/openshot-qt/default.nix
@@ -32,8 +32,8 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
     wrapProgram $out/bin/openshot-qt \
   ''
   # Fix toolbar icons on Darwin
-  + stdenv.lib.optionalString stdenv.isDarwin ''
-      --suffix QT_PLUGIN_PATH : "${stdenv.lib.getBin qtsvg}/lib/qt-5.12.7/plugins" \
+  + lib.optionalString stdenv.isDarwin ''
+      --suffix QT_PLUGIN_PATH : "${lib.getBin qtsvg}/lib/qt-5.12.7/plugins" \
   ''
   + ''
       "''${gappsWrapperArgs[@]}" \
diff --git a/pkgs/applications/video/openshot-qt/libopenshot-audio.nix b/pkgs/applications/video/openshot-qt/libopenshot-audio.nix
index b6bb87e6651..d769eaa5955 100644
--- a/pkgs/applications/video/openshot-qt/libopenshot-audio.nix
+++ b/pkgs/applications/video/openshot-qt/libopenshot-audio.nix
@@ -1,9 +1,9 @@
-{ stdenv, fetchFromGitHub, pkgconfig, cmake, doxygen
+{ lib, stdenv, fetchFromGitHub, pkgconfig, cmake, doxygen
 , alsaLib, libX11, libXft, libXrandr, libXinerama, libXext, libXcursor
 , zlib, AGL, Cocoa, Foundation
 }:
 
-with stdenv.lib;
+with lib;
 stdenv.mkDerivation rec {
   pname = "libopenshot-audio";
   version = "0.2.0";
diff --git a/pkgs/applications/video/openshot-qt/libopenshot.nix b/pkgs/applications/video/openshot-qt/libopenshot.nix
index 1ab7a5266a2..e66c519f78b 100644
--- a/pkgs/applications/video/openshot-qt/libopenshot.nix
+++ b/pkgs/applications/video/openshot-qt/libopenshot.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchpatch
+{ lib, stdenv, fetchFromGitHub, fetchpatch
 , pkgconfig, cmake, doxygen
 , libopenshot-audio, imagemagick, ffmpeg_3
 , swig, python3
@@ -7,7 +7,7 @@
 , llvmPackages
 }:
 
-with stdenv.lib;
+with lib;
 stdenv.mkDerivation rec {
   pname = "libopenshot";
   version = "0.2.5";
diff --git a/pkgs/applications/video/p2pvc/default.nix b/pkgs/applications/video/p2pvc/default.nix
index 91468ea1ee6..64f7b7181ee 100644
--- a/pkgs/applications/video/p2pvc/default.nix
+++ b/pkgs/applications/video/p2pvc/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, pkgconfig, fetchFromGitHub, opencv2, ncurses, portaudio }:
+{ lib, stdenv, pkgconfig, fetchFromGitHub, opencv2, ncurses, portaudio }:
 
 stdenv.mkDerivation {
   name = "p2pvc";
@@ -20,8 +20,8 @@ stdenv.mkDerivation {
   meta = {
     description = "A point to point color terminal video chat";
     homepage = "https://github.com/mofarrell/p2pvc";
-    license = stdenv.lib.licenses.mit;
-    maintainers = with stdenv.lib.maintainers; [ trino ];
-    platforms = with stdenv.lib.platforms; linux;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ trino ];
+    platforms = with lib.platforms; linux;
   };
 }
diff --git a/pkgs/applications/video/peek/default.nix b/pkgs/applications/video/peek/default.nix
index 17f9d20695e..d81c32de20c 100644
--- a/pkgs/applications/video/peek/default.nix
+++ b/pkgs/applications/video/peek/default.nix
@@ -66,7 +66,7 @@ stdenv.mkDerivation rec {
   '';
 
   preFixup = ''
-    gappsWrapperArgs+=(--prefix PATH : ${stdenv.lib.makeBinPath [ which ffmpeg_3 gifski ]})
+    gappsWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ which ffmpeg_3 gifski ]})
   '';
 
   passthru = {
diff --git a/pkgs/applications/video/pitivi/default.nix b/pkgs/applications/video/pitivi/default.nix
index c56878dea35..1b2af7614ab 100644
--- a/pkgs/applications/video/pitivi/default.nix
+++ b/pkgs/applications/video/pitivi/default.nix
@@ -27,7 +27,7 @@ python3Packages.buildPythonApplication rec {
   format = "other";
 
   src = fetchurl {
-    url = "mirror://gnome/sources/pitivi/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    url = "mirror://gnome/sources/pitivi/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
     sha256 = "0hzvv4wia4rk0kvq16y27imq2qd4q5lg3vx99hdcjdb1x3zqqfg0";
   };
 
diff --git a/pkgs/applications/video/qstopmotion/default.nix b/pkgs/applications/video/qstopmotion/default.nix
index 008e73cd6ed..b37d65d8ffc 100644
--- a/pkgs/applications/video/qstopmotion/default.nix
+++ b/pkgs/applications/video/qstopmotion/default.nix
@@ -74,9 +74,9 @@ mkDerivation rec {
       animation to different video formats such as mpeg or avi.
     '';
 
-    license = stdenv.lib.licenses.gpl2Plus;
+    license = lib.licenses.gpl2Plus;
     maintainers = [ maintainers.leenaars ];
     broken = stdenv.isAarch64;
-    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;
+    platforms = lib.platforms.gnu ++ lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/video/quvi/library.nix b/pkgs/applications/video/quvi/library.nix
index c4926bedd72..37486dfa114 100644
--- a/pkgs/applications/video/quvi/library.nix
+++ b/pkgs/applications/video/quvi/library.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, lua5, curl, quvi_scripts, libproxy, libgcrypt, glib }:
+{ lib, stdenv, fetchurl, pkgconfig, lua5, curl, quvi_scripts, libproxy, libgcrypt, glib }:
 
 stdenv.mkDerivation rec {
   pname = "libquvi";
@@ -15,8 +15,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Web video downloader";
     homepage = "http://quvi.sf.net";
-    license = stdenv.lib.licenses.lgpl21Plus;
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.lgpl21Plus;
+    platforms = lib.platforms.linux;
     maintainers = [ ];
   };
 }
diff --git a/pkgs/applications/video/quvi/scripts.nix b/pkgs/applications/video/quvi/scripts.nix
index 462c2df9962..d91ac4526d1 100644
--- a/pkgs/applications/video/quvi/scripts.nix
+++ b/pkgs/applications/video/quvi/scripts.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, pkgconfig}:
+{lib, stdenv, fetchurl, pkgconfig}:
 
 stdenv.mkDerivation rec {
   pname = "quvi-scripts";
@@ -14,8 +14,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Web video downloader";
     homepage = "http://quvi.sf.net";
-    license = stdenv.lib.licenses.lgpl21Plus;
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.lgpl21Plus;
+    platforms = lib.platforms.linux;
     maintainers = [ ];
   };
 }
diff --git a/pkgs/applications/video/quvi/tool.nix b/pkgs/applications/video/quvi/tool.nix
index b2746ef8233..e7a5153f710 100644
--- a/pkgs/applications/video/quvi/tool.nix
+++ b/pkgs/applications/video/quvi/tool.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, pkgconfig, lua5, curl, quvi_scripts, libquvi, lua5_sockets, glib, makeWrapper}:
+{lib, stdenv, fetchurl, pkgconfig, lua5, curl, quvi_scripts, libquvi, lua5_sockets, glib, makeWrapper}:
 
 stdenv.mkDerivation rec {
   pname = "quvi";
@@ -18,8 +18,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Web video downloader";
     homepage = "http://quvi.sf.net";
-    license = stdenv.lib.licenses.lgpl21Plus;
-    platforms = stdenv.lib.platforms.linux;
+    license = lib.licenses.lgpl21Plus;
+    platforms = lib.platforms.linux;
     maintainers = [ ];
   };
 }
diff --git a/pkgs/applications/video/shotcut/default.nix b/pkgs/applications/video/shotcut/default.nix
index bae6a0ac7f3..160a9957456 100644
--- a/pkgs/applications/video/shotcut/default.nix
+++ b/pkgs/applications/video/shotcut/default.nix
@@ -21,7 +21,7 @@
 , common-updater-scripts
 }:
 
-assert stdenv.lib.versionAtLeast mlt.version "6.22.1";
+assert lib.versionAtLeast mlt.version "6.22.1";
 
 mkDerivation rec {
   pname = "shotcut";
@@ -52,7 +52,7 @@ mkDerivation rec {
 
   NIX_CFLAGS_COMPILE = "-I${mlt.dev}/include/mlt++ -I${mlt.dev}/include/mlt";
   qmakeFlags = [
-    "QMAKE_LRELEASE=${stdenv.lib.getDev qttools}/bin/lrelease"
+    "QMAKE_LRELEASE=${lib.getDev qttools}/bin/lrelease"
     "SHOTCUT_VERSION=${version}"
     "DEFINES+=SHOTCUT_NOUPGRADE"
   ];
@@ -68,7 +68,7 @@ mkDerivation rec {
   qtWrapperArgs = [
     "--prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1"
     "--prefix LADSPA_PATH : ${ladspaPlugins}/lib/ladspa"
-    "--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ jack1 SDL2 ]}"
+    "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ jack1 SDL2 ]}"
     "--prefix PATH : ${mlt}/bin"
   ];
 
diff --git a/pkgs/applications/video/sub-batch/default.nix b/pkgs/applications/video/sub-batch/default.nix
index 244e826f0a2..070bcc90685 100644
--- a/pkgs/applications/video/sub-batch/default.nix
+++ b/pkgs/applications/video/sub-batch/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchFromGitHub
 , rustPlatform
 }:
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
 
   cargoSha256 = "sha256-l+BTF9PGb8bG8QHhNCoBsrsVX8nlRjPlaea1ESFfMW0=";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Match and rename subtitle files to video files and perform other batch operations on subtitle files";
     homepage = "https://github.com/kl/sub-batch";
     license = licenses.mit;
diff --git a/pkgs/applications/video/subdl/default.nix b/pkgs/applications/video/subdl/default.nix
index b2b020a20d2..e115fbcdd04 100644
--- a/pkgs/applications/video/subdl/default.nix
+++ b/pkgs/applications/video/subdl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, python3 }:
+{ lib, stdenv, fetchFromGitHub, python3 }:
 
 stdenv.mkDerivation {
   name = "subdl-0.0pre.2017.11.06";
@@ -13,14 +13,14 @@ stdenv.mkDerivation {
   meta = {
     homepage = "https://github.com/alexanderwink/subdl";
     description = "A command-line tool to download subtitles from opensubtitles.org";
-    platforms = stdenv.lib.platforms.all;
-    license = stdenv.lib.licenses.gpl3;
-    maintainers = [ stdenv.lib.maintainers.exfalso ];
+    platforms = lib.platforms.all;
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.exfalso ];
   };
 
   buildInputs = [ python3 ];
 
   installPhase = ''
     install -vD subdl $out/bin/subdl
-  '';  
+  '';
 }
diff --git a/pkgs/applications/video/subtitleeditor/default.nix b/pkgs/applications/video/subtitleeditor/default.nix
index eea6353d66c..67918ee9806 100644
--- a/pkgs/applications/video/subtitleeditor/default.nix
+++ b/pkgs/applications/video/subtitleeditor/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, intltool, file,
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, intltool, file,
   desktop-file-utils, enchant, gtk3, gtkmm3, gst_all_1, hicolor-icon-theme,
   libsigcxx, libxmlxx, xdg_utils, isocodes, wrapGAppsHook
 }:
@@ -60,8 +60,8 @@ stdenv.mkDerivation {
       makes it easier to synchronise subtitles to voices.
       '';
     homepage = "http://kitone.github.io/subtitleeditor/";
-    license = stdenv.lib.licenses.gpl3Plus;
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.plcplc ];
+    license = lib.licenses.gpl3Plus;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.plcplc ];
   };
 }
diff --git a/pkgs/applications/video/tartube/default.nix b/pkgs/applications/video/tartube/default.nix
index 36375d9ecc0..3bd48019d0d 100644
--- a/pkgs/applications/video/tartube/default.nix
+++ b/pkgs/applications/video/tartube/default.nix
@@ -63,7 +63,7 @@ python3Packages.buildPythonApplication rec {
   doCheck = false;
 
   makeWrapperArgs = [
-    "--prefix PATH : ${stdenv.lib.makeBinPath [ youtube-dl ]}"
+    "--prefix PATH : ${lib.makeBinPath [ youtube-dl ]}"
   ];
 
   meta = with lib; {
diff --git a/pkgs/applications/video/vcs/default.nix b/pkgs/applications/video/vcs/default.nix
index 0280cfb3f1f..83b49c07578 100644
--- a/pkgs/applications/video/vcs/default.nix
+++ b/pkgs/applications/video/vcs/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, fetchurl, makeWrapper
+{ lib, stdenv, fetchurl, makeWrapper
 , coreutils, ffmpeg, gawk, gnugrep, gnused, imagemagick, mplayer, util-linux
 , dejavu_fonts
 }:
-with stdenv.lib;
+with lib;
 let
   version = "1.13.4";
   runtimeDeps = [ coreutils ffmpeg gawk gnugrep gnused imagemagick mplayer util-linux ];
diff --git a/pkgs/applications/video/vdr/plugins.nix b/pkgs/applications/video/vdr/plugins.nix
index 55ac94d8c6c..395de891eb9 100644
--- a/pkgs/applications/video/vdr/plugins.nix
+++ b/pkgs/applications/video/vdr/plugins.nix
@@ -18,7 +18,7 @@ in {
     buildInputs = oldAttr.buildInputs ++ [ ncurses ];
   });
 
-  inherit (stdenv.lib.genAttrs [
+  inherit (lib.genAttrs [
     "epgtableid0" "hello" "osddemo" "pictures" "servicedemo" "status" "svdrpdemo"
   ] mkPlugin);
 
diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix
index 559398677a4..9c49f8ba6df 100644
--- a/pkgs/applications/video/vlc/default.nix
+++ b/pkgs/applications/video/vlc/default.nix
@@ -19,7 +19,7 @@
 # If your firewall is enabled, make sure to have something like:
 #   networking.firewall.allowedTCPPorts = [ 8010 ];
 
-with stdenv.lib;
+with lib;
 
 assert (withQt5 -> qtbase != null && qtsvg != null && qtx11extras != null && wrapQtAppsHook != null);
 
diff --git a/pkgs/applications/video/w_scan/default.nix b/pkgs/applications/video/w_scan/default.nix
index 7710c7d67a3..7cbc2b0f815 100644
--- a/pkgs/applications/video/w_scan/default.nix
+++ b/pkgs/applications/video/w_scan/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl }:
+{ lib, stdenv, fetchurl }:
 
 stdenv.mkDerivation rec {
   pname = "w_scan";
@@ -12,8 +12,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Small CLI utility to scan DVB and ATSC transmissions";
     homepage = "http://wirbel.htpc-forum.de/w_scan/index_en.html";
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.nico202 ] ;
-    license = stdenv.lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.nico202 ] ;
+    license = lib.licenses.gpl2;
   };
 }
diff --git a/pkgs/applications/video/webtorrent_desktop/default.nix b/pkgs/applications/video/webtorrent_desktop/default.nix
index 6b97fa63e0b..ac3dd320d3a 100644
--- a/pkgs/applications/video/webtorrent_desktop/default.nix
+++ b/pkgs/applications/video/webtorrent_desktop/default.nix
@@ -6,7 +6,7 @@
 }:
 
   let
-    rpath = stdenv.lib.makeLibraryPath ([
+    rpath = lib.makeLibraryPath ([
     alsaLib
     atk
     at-spi2-core
diff --git a/pkgs/applications/video/wxcam/default.nix b/pkgs/applications/video/wxcam/default.nix
index 9294c4d2cde..747af7a3b02 100644
--- a/pkgs/applications/video/wxcam/default.nix
+++ b/pkgs/applications/video/wxcam/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
     sha256 = "1765bvc65fpzn9ycnnj5hais9xkx9v0sm6a878d35x54bpanr859";
   };
 
-  buildInputs = with stdenv.lib;
+  buildInputs = with lib;
   [ pkgconfig intltool libX11 libXv libSM gtk libglade wxGTK perlPackages.XMLParser xvidcore mjpegtools alsaLib libv4l cimg ];
 
   NIX_CFLAGS_COMPILE="-I ${cimg}/include/cimg";
diff --git a/pkgs/applications/video/xawtv/default.nix b/pkgs/applications/video/xawtv/default.nix
index ee2f811cb4a..e891d4ab5ac 100644
--- a/pkgs/applications/video/xawtv/default.nix
+++ b/pkgs/applications/video/xawtv/default.nix
@@ -1,4 +1,4 @@
-{ stdenv
+{ lib, stdenv
 , fetchurl
 , ncurses
 , libjpeg
@@ -56,9 +56,9 @@ stdenv.mkDerivation rec {
 
   meta = {
     description = "TV application for Linux with apps and tools such as a teletext browser";
-    license = stdenv.lib.licenses.gpl2;
+    license = lib.licenses.gpl2;
     homepage = "https://www.kraxel.org/blog/linux/xawtv/";
-    maintainers = with stdenv.lib.maintainers; [ domenkozar ];
-    platforms = stdenv.lib.platforms.linux;
+    maintainers = with lib.maintainers; [ domenkozar ];
+    platforms = lib.platforms.linux;
   };
 }
diff --git a/pkgs/applications/video/xscast/default.nix b/pkgs/applications/video/xscast/default.nix
index 050b5b32b19..49f5b43bb73 100644
--- a/pkgs/applications/video/xscast/default.nix
+++ b/pkgs/applications/video/xscast/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
     patchShebangs $out/bin
 
     wrapProgram "$out/bin/xscast" \
-      --prefix PATH : ${stdenv.lib.makeBinPath [ ffmpeg_3 dzen2 xorg.xwininfo xorg.xinput xorg.xmodmap imagemagick ]}
+      --prefix PATH : ${lib.makeBinPath [ ffmpeg_3 dzen2 xorg.xwininfo xorg.xinput xorg.xmodmap imagemagick ]}
 
     runHook postInstall
   '';
diff --git a/pkgs/applications/video/xvidcap/default.nix b/pkgs/applications/video/xvidcap/default.nix
index 0f7f9390dac..06a433f4021 100644
--- a/pkgs/applications/video/xvidcap/default.nix
+++ b/pkgs/applications/video/xvidcap/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
   meta = with lib; {
     description = "Screencast video catpuring tool";
     homepage = "http://xvidcap.sourceforge.net/";
-    license = stdenv.lib.licenses.gpl2;
+    license = lib.licenses.gpl2;
     platforms = platforms.linux;
   };
 }