summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/audio/mimms/default.nix4
-rw-r--r--pkgs/applications/blockchains/nano-wallet/default.nix6
-rw-r--r--pkgs/applications/graphics/k3d/default.nix4
-rw-r--r--pkgs/applications/misc/lyx/default.nix6
-rw-r--r--pkgs/applications/misc/menumaker/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/linphone/default.nix1
-rw-r--r--pkgs/applications/science/math/maxima/default.nix21
-rw-r--r--pkgs/applications/virtualization/lkl/default.nix4
-rw-r--r--pkgs/development/compilers/clasp/default.nix4
-rw-r--r--pkgs/development/compilers/dtc/default.nix2
-rw-r--r--pkgs/development/compilers/llvm/rocm/clang.nix4
-rw-r--r--pkgs/development/compilers/openjdk/openjfx/11.nix4
-rw-r--r--pkgs/development/compilers/osl/default.nix4
-rw-r--r--pkgs/development/compilers/seexpr/default.nix4
-rw-r--r--pkgs/development/em-modules/generic/default.nix6
-rw-r--r--pkgs/development/interpreters/python/default.nix1
-rw-r--r--pkgs/development/libraries/audio/lvtk/default.nix4
-rw-r--r--pkgs/development/libraries/boost/generic.nix2
-rw-r--r--pkgs/development/libraries/gdcm/default.nix2
-rw-r--r--pkgs/development/libraries/libsystemtap/default.nix4
-rw-r--r--pkgs/development/libraries/mapnik/default.nix4
-rw-r--r--pkgs/development/libraries/mlt/default.nix6
-rw-r--r--pkgs/development/libraries/physics/fastnlo_toolkit/default.nix2
-rw-r--r--pkgs/development/libraries/science/biology/mirtk/default.nix4
-rw-r--r--pkgs/development/libraries/subunit/default.nix6
-rw-r--r--pkgs/development/python-modules/subunit/default.nix2
-rw-r--r--pkgs/development/ruby-modules/gem-config/default.nix4
-rw-r--r--pkgs/development/tools/libsigrok/default.nix6
-rw-r--r--pkgs/development/tools/misc/coccinelle/default.nix4
-rw-r--r--pkgs/development/tools/parsing/hammer/default.nix8
-rw-r--r--pkgs/games/ja2-stracciatella/default.nix4
-rw-r--r--pkgs/misc/emulators/blastem/default.nix4
-rw-r--r--pkgs/servers/matrix-appservice-discord/default.nix4
-rw-r--r--pkgs/servers/monitoring/munin/default.nix6
-rw-r--r--pkgs/servers/neard/default.nix10
-rw-r--r--pkgs/servers/nosql/cassandra/generic.nix4
-rw-r--r--pkgs/tools/audio/mididings/default.nix10
-rw-r--r--pkgs/tools/filesystems/mergerfs/tools.nix4
-rw-r--r--pkgs/tools/filesystems/moosefs/default.nix11
-rw-r--r--pkgs/tools/graphics/appleseed/default.nix7
-rw-r--r--pkgs/tools/misc/me_cleaner/default.nix4
-rw-r--r--pkgs/top-level/all-packages.nix27
-rw-r--r--pkgs/top-level/python-packages.nix2
-rw-r--r--pkgs/top-level/python2-packages.nix2
44 files changed, 133 insertions, 103 deletions
diff --git a/pkgs/applications/audio/mimms/default.nix b/pkgs/applications/audio/mimms/default.nix
index 9811998c368..28ec09eba9c 100644
--- a/pkgs/applications/audio/mimms/default.nix
+++ b/pkgs/applications/audio/mimms/default.nix
@@ -1,6 +1,6 @@
-{ fetchurl, lib, pythonPackages, libmms }:
+{ fetchurl, lib, python2Packages, libmms }:
 
-pythonPackages.buildPythonApplication rec {
+python2Packages.buildPythonApplication rec {
   pname = "mimms";
   version = "3.2";
 
diff --git a/pkgs/applications/blockchains/nano-wallet/default.nix b/pkgs/applications/blockchains/nano-wallet/default.nix
index 8e8d3da92be..e13a77c7d24 100644
--- a/pkgs/applications/blockchains/nano-wallet/default.nix
+++ b/pkgs/applications/blockchains/nano-wallet/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub, cmake, pkg-config, wrapQtAppsHook, boost, libGL
-, qtbase, python }:
+, qtbase, python3 }:
 
 stdenv.mkDerivation rec {
 
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
 
   cmakeFlags = let
     options = {
-      PYTHON_EXECUTABLE = "${python}/bin/python";
+      PYTHON_EXECUTABLE = "${python3.interpreter}";
       NANO_SHARED_BOOST = "ON";
       BOOST_ROOT = boost;
       RAIBLOCKS_GUI = "ON";
@@ -32,6 +32,8 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
   buildInputs = [ boost libGL qtbase ];
 
+  strictDeps = true;
+
   buildPhase = ''
     runHook preBuild
     make nano_wallet
diff --git a/pkgs/applications/graphics/k3d/default.nix b/pkgs/applications/graphics/k3d/default.nix
index 99e56738dbf..68e28c5cc88 100644
--- a/pkgs/applications/graphics/k3d/default.nix
+++ b/pkgs/applications/graphics/k3d/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub, fetchpatch, ftgl, glew, asciidoc
-, cmake, ninja, libGLU, libGL, zlib, python, expat, libxml2, libsigcxx, libuuid, freetype
+, cmake, ninja, libGLU, libGL, zlib, python2, expat, libxml2, libsigcxx, libuuid, freetype
 , libpng, boost, doxygen, cairomm, pkg-config, libjpeg, libtiff
 , gettext, intltool, perl, gtkmm2, glibmm, gtkglext, libXmu }:
 
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake ninja gettext intltool doxygen pkg-config perl asciidoc ];
 
   buildInputs = [
-     libGLU libGL zlib python expat libxml2 libsigcxx libuuid freetype libpng
+     libGLU libGL zlib python2 expat libxml2 libsigcxx libuuid freetype libpng
      boost cairomm libjpeg libtiff
      ftgl glew gtkmm2 glibmm gtkglext libXmu
     ];
diff --git a/pkgs/applications/misc/lyx/default.nix b/pkgs/applications/misc/lyx/default.nix
index 7cab86df967..e736c235c45 100644
--- a/pkgs/applications/misc/lyx/default.nix
+++ b/pkgs/applications/misc/lyx/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, lib, mkDerivation, pkg-config, python, file, bc
+{ fetchurl, lib, mkDerivation, pkg-config, python3, file, bc
 , qtbase, qtsvg, hunspell, makeWrapper #, mythes, boost
 }:
 
@@ -14,7 +14,7 @@ mkDerivation rec {
   # LaTeX is used from $PATH, as people often want to have it with extra pkgs
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [
-    qtbase qtsvg python file/*for libmagic*/ bc
+    qtbase qtsvg python3 file/*for libmagic*/ bc
     hunspell makeWrapper # enchant
   ];
 
@@ -31,7 +31,7 @@ mkDerivation rec {
 
   # python is run during runtime to do various tasks
   qtWrapperArgs = [
-    " --prefix PATH : ${python}/bin"
+    " --prefix PATH : ${python3}/bin"
   ];
 
   meta = with lib; {
diff --git a/pkgs/applications/misc/menumaker/default.nix b/pkgs/applications/misc/menumaker/default.nix
index 086db35a5ad..8d018a67d37 100644
--- a/pkgs/applications/misc/menumaker/default.nix
+++ b/pkgs/applications/misc/menumaker/default.nix
@@ -1,6 +1,6 @@
-{ lib, fetchurl, pythonPackages }:
+{ lib, fetchurl, python2Packages }:
 
-pythonPackages.buildPythonApplication rec {
+python2Packages.buildPythonApplication rec {
   pname = "menumaker";
   version = "0.99.12";
 
diff --git a/pkgs/applications/networking/instant-messengers/linphone/default.nix b/pkgs/applications/networking/instant-messengers/linphone/default.nix
index 1c2df3924ec..47ee2a68a51 100644
--- a/pkgs/applications/networking/instant-messengers/linphone/default.nix
+++ b/pkgs/applications/networking/instant-messengers/linphone/default.nix
@@ -37,7 +37,6 @@
 , ortp
 , pango
 , pkg-config
-, python
 , qtbase
 , qtgraphicaleffects
 , qtquickcontrols2
diff --git a/pkgs/applications/science/math/maxima/default.nix b/pkgs/applications/science/math/maxima/default.nix
index 01f086c92c7..7edbeaee085 100644
--- a/pkgs/applications/science/math/maxima/default.nix
+++ b/pkgs/applications/science/math/maxima/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python, makeWrapper, autoreconfHook
+{ lib, stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python3, makeWrapper, autoreconfHook
 , rlwrap ? null, tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false
 }:
 
@@ -6,9 +6,11 @@ let
   name    = "maxima";
   version = "5.44.0";
 
+  lisp-compiler = if ecl-fasl then ecl else sbcl;
+
   searchPath =
     lib.makeBinPath
-      (lib.filter (x: x != null) [ sbcl ecl rlwrap tk gnuplot ]);
+      (lib.filter (x: x != null) [ lisp-compiler rlwrap tk gnuplot ]);
 in
 stdenv.mkDerivation ({
   inherit version;
@@ -19,11 +21,18 @@ stdenv.mkDerivation ({
     sha256 = "1v6jr5s6hhj6r18gfk6hgxk2qd6z1dxkrjq9ss2z1y6sqi45wgyr";
   };
 
-  nativeBuildInputs = [ autoreconfHook ];
+  nativeBuildInputs = [
+    autoreconfHook
+    lisp-compiler
+    makeWrapper
+    python3
+    texinfo
+  ];
+
+  strictDeps = true;
 
-  buildInputs = lib.filter (x: x != null) [
-    sbcl ecl texinfo perl python makeWrapper
-    gnuplot   # required in the test suite
+  checkInputs = [
+    gnuplot
   ];
 
   postPatch = ''
diff --git a/pkgs/applications/virtualization/lkl/default.nix b/pkgs/applications/virtualization/lkl/default.nix
index aee2d493a70..f2481e25a8f 100644
--- a/pkgs/applications/virtualization/lkl/default.nix
+++ b/pkgs/applications/virtualization/lkl/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, bc, python, bison, flex, fuse, libarchive
+{ lib, stdenv, fetchFromGitHub, bc, python3, bison, flex, fuse, libarchive
 , buildPackages }:
 
 stdenv.mkDerivation rec {
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
 
   outputs = [ "dev" "lib" "out" ];
 
-  nativeBuildInputs = [ bc bison flex python ];
+  nativeBuildInputs = [ bc bison flex python3 ];
 
   buildInputs = [ fuse libarchive ];
 
diff --git a/pkgs/development/compilers/clasp/default.nix b/pkgs/development/compilers/clasp/default.nix
index 3aa7063f551..0113a9aebc0 100644
--- a/pkgs/development/compilers/clasp/default.nix
+++ b/pkgs/development/compilers/clasp/default.nix
@@ -1,7 +1,7 @@
 { lib, stdenv, fetchFromGitHub, fetchFromGitLab
 , llvmPackages
 , cmake, boehmgc, gmp, zlib, ncurses, boost, libelf
-, python, git, sbcl
+, python3, git, sbcl
 , wafHook
 }:
 let
@@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
-  nativeBuildInputs = [ cmake python git sbcl wafHook ] ++
+  nativeBuildInputs = [ cmake python3 git sbcl wafHook ] ++
     (with llvmPackages; [ llvm clang ]);
 
   buildInputs = with llvmPackages;
diff --git a/pkgs/development/compilers/dtc/default.nix b/pkgs/development/compilers/dtc/default.nix
index 0050dd44b9a..f145b0397f5 100644
--- a/pkgs/development/compilers/dtc/default.nix
+++ b/pkgs/development/compilers/dtc/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchgit, flex, bison, pkg-config, which
-, pythonSupport ? false, python, swig, libyaml
+, pythonSupport ? false, python ? null, swig, libyaml
 }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/compilers/llvm/rocm/clang.nix b/pkgs/development/compilers/llvm/rocm/clang.nix
index 45c0bfda192..d6bfd07d444 100644
--- a/pkgs/development/compilers/llvm/rocm/clang.nix
+++ b/pkgs/development/compilers/llvm/rocm/clang.nix
@@ -1,7 +1,7 @@
 { lib, stdenv
 , fetchFromGitHub
 , cmake
-, python
+, python3
 , llvm
 , clang-tools-extra_src ? null
 , lld
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
 
   pname = "clang";
 
-  nativeBuildInputs = [ cmake python ];
+  nativeBuildInputs = [ cmake python3 ];
 
   buildInputs = [ llvm ];
 
diff --git a/pkgs/development/compilers/openjdk/openjfx/11.nix b/pkgs/development/compilers/openjdk/openjfx/11.nix
index 228dbf9b14e..1d741fd8be2 100644
--- a/pkgs/development/compilers/openjdk/openjfx/11.nix
+++ b/pkgs/development/compilers/openjdk/openjfx/11.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchurl, writeText, gradleGen, pkg-config, perl, cmake
-, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib, ffmpeg, python, ruby
+, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsa-lib, ffmpeg, python2, ruby
 , openjdk11-bootstrap }:
 
 let
@@ -20,7 +20,7 @@ let
     };
 
     buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsa-lib ffmpeg ];
-    nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python ruby ];
+    nativeBuildInputs = [ gradle_ perl pkg-config cmake gperf python2 ruby ];
 
     dontUseCmakeConfigure = true;
 
diff --git a/pkgs/development/compilers/osl/default.nix b/pkgs/development/compilers/osl/default.nix
index 10067644813..eeaba75c0de 100644
--- a/pkgs/development/compilers/osl/default.nix
+++ b/pkgs/development/compilers/osl/default.nix
@@ -1,6 +1,6 @@
 { clangStdenv, lib, fetchFromGitHub, cmake, zlib, openexr,
 openimageio, llvm, boost165, flex, bison, partio, pugixml,
-util-linux, python
+util-linux, python3
 }:
 
 let boost_static = boost165.override { enableStatic = true; };
@@ -26,7 +26,7 @@ in clangStdenv.mkDerivation rec {
      zlib openexr openimageio llvm
      partio pugixml
      util-linux # needed just for hexdump
-     python # CMake doesn't check this?
+     python3 # CMake doesn't check this?
   ];
   # TODO: How important is partio? CMake doesn't seem to find it
   meta = with lib; {
diff --git a/pkgs/development/compilers/seexpr/default.nix b/pkgs/development/compilers/seexpr/default.nix
index 7fc1fc7b1b6..5dfa08c4572 100644
--- a/pkgs/development/compilers/seexpr/default.nix
+++ b/pkgs/development/compilers/seexpr/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub, cmake, libpng, zlib, qt4,
-bison, flex, libGLU, pythonPackages
+bison, flex, libGLU, python2Packages
 }:
 
 stdenv.mkDerivation {
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
   };
 
   nativeBuildInputs = [ cmake ];
-  buildInputs = [ libGLU libpng zlib qt4 pythonPackages.pyqt4 bison flex ];
+  buildInputs = [ libGLU libpng zlib qt4 python2Packages.pyqt4 bison flex ];
   meta = with lib; {
     description = "Embeddable expression evaluation engine from Disney Animation";
     homepage = "https://www.disneyanimation.com/technology/seexpr.html";
diff --git a/pkgs/development/em-modules/generic/default.nix b/pkgs/development/em-modules/generic/default.nix
index a260beb5104..8bfbf6ec309 100644
--- a/pkgs/development/em-modules/generic/default.nix
+++ b/pkgs/development/em-modules/generic/default.nix
@@ -1,4 +1,4 @@
-{ pkgs, lib, emscripten, python }:
+{ pkgs, lib, emscripten, python2 }:
 
 { buildInputs ? [], nativeBuildInputs ? []
 
@@ -12,8 +12,8 @@ pkgs.stdenv.mkDerivation (
 
   pname = "emscripten-${lib.getName args}";
   version = lib.getVersion args;
-  buildInputs = [ emscripten python ] ++ buildInputs;
-  nativeBuildInputs = [ emscripten python ] ++ nativeBuildInputs;
+  buildInputs = [ emscripten python2 ] ++ buildInputs;
+  nativeBuildInputs = [ emscripten python2 ] ++ nativeBuildInputs;
 
   # fake conftest results with emscripten's python magic
   EMCONFIGURE_JS=2;
diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix
index f4943b25187..c8fbe340ac9 100644
--- a/pkgs/development/interpreters/python/default.nix
+++ b/pkgs/development/interpreters/python/default.nix
@@ -85,6 +85,7 @@ with pkgs;
           (lib.extends (lib.composeExtensions aliases extensions) pythonPackagesFun))
         {
           overrides = packageOverrides;
+          python = self;
         };
     in rec {
         isPy27 = pythonVersion == "2.7";
diff --git a/pkgs/development/libraries/audio/lvtk/default.nix b/pkgs/development/libraries/audio/lvtk/default.nix
index cecae743da0..0ded707b3a1 100644
--- a/pkgs/development/libraries/audio/lvtk/default.nix
+++ b/pkgs/development/libraries/audio/lvtk/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, boost, gtkmm2, lv2, pkg-config, python, wafHook }:
+{ lib, stdenv, fetchurl, boost, gtkmm2, lv2, pkg-config, python2, wafHook }:
 
 stdenv.mkDerivation rec {
   pname = "lvtk";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "03nbj2cqcklqwh50zj2gwm07crh5iwqbpxbpzwbg5hvgl4k4rnjd";
   };
 
-  nativeBuildInputs = [ pkg-config python wafHook ];
+  nativeBuildInputs = [ pkg-config python2 wafHook ];
   buildInputs = [ boost gtkmm2 lv2 ];
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix
index 6158eb87511..1f9bbe5ffca 100644
--- a/pkgs/development/libraries/boost/generic.nix
+++ b/pkgs/development/libraries/boost/generic.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, libiconv
+{ lib, stdenv, icu, expat, zlib, bzip2, python ? null, fixDarwinDylibNames, libiconv
 , fetchpatch
 , which
 , buildPackages
diff --git a/pkgs/development/libraries/gdcm/default.nix b/pkgs/development/libraries/gdcm/default.nix
index 86d80a529d5..af4a5a38f7e 100644
--- a/pkgs/development/libraries/gdcm/default.nix
+++ b/pkgs/development/libraries/gdcm/default.nix
@@ -7,7 +7,7 @@
 , ApplicationServices
 , Cocoa
 , enablePython ? false
-, python
+, python ? null
 , swig
 }:
 
diff --git a/pkgs/development/libraries/libsystemtap/default.nix b/pkgs/development/libraries/libsystemtap/default.nix
index 1ce7ef58c88..17ac533732f 100644
--- a/pkgs/development/libraries/libsystemtap/default.nix
+++ b/pkgs/development/libraries/libsystemtap/default.nix
@@ -1,4 +1,4 @@
-{lib, stdenv, fetchgit, gettext, python, elfutils}:
+{lib, stdenv, fetchgit, gettext, python2, elfutils}:
 
 stdenv.mkDerivation {
   pname = "libsystemtap";
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
 
   dontBuild = true;
 
-  nativeBuildInputs = [ gettext python elfutils ];
+  nativeBuildInputs = [ gettext python2 elfutils ];
 
   installPhase = ''
     mkdir -p $out/include
diff --git a/pkgs/development/libraries/mapnik/default.nix b/pkgs/development/libraries/mapnik/default.nix
index 46f2751938e..c2556a428a1 100644
--- a/pkgs/development/libraries/mapnik/default.nix
+++ b/pkgs/development/libraries/mapnik/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchzip
 , boost, cairo, freetype, gdal, harfbuzz, icu, libjpeg, libpng, libtiff
-, libwebp, libxml2, proj, python, sqlite, zlib
+, libwebp, libxml2, proj, python3, python ? python3, sqlite, zlib
 
 # supply a postgresql package to enable the PostGIS input plugin
 , postgresql ? null
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
   # a distinct dev output makes python-mapnik fail
   outputs = [ "out" ];
 
-  nativeBuildInputs = [ python ];
+  nativeBuildInputs = [ python3 ];
 
   buildInputs = [
     boost cairo freetype gdal harfbuzz icu libjpeg libpng libtiff
diff --git a/pkgs/development/libraries/mlt/default.nix b/pkgs/development/libraries/mlt/default.nix
index 8bd2bc80362..a4f0289cd58 100644
--- a/pkgs/development/libraries/mlt/default.nix
+++ b/pkgs/development/libraries/mlt/default.nix
@@ -3,7 +3,7 @@
 , libvorbis, libxml2, movit, pkg-config, sox, fftw, opencv4, SDL2
 , gtk2, genericUpdater, common-updater-scripts, libebur128
 , jack2, ladspa-sdk, swig, which, ncurses
-, enablePython ? false, python
+, enablePython ? false, python3
 }:
 
 stdenv.mkDerivation rec {
@@ -24,7 +24,9 @@ stdenv.mkDerivation rec {
   ] ++ lib.optional enablePython ncurses;
 
   nativeBuildInputs = [ pkg-config makeWrapper which ]
-  ++ lib.optionals enablePython [ python swig ];
+  ++ lib.optionals enablePython [ python3 swig ];
+
+  strictDeps = true;
 
   # Mostly taken from:
   # http://www.kdenlive.org/user-manual/downloading-and-installing-kdenlive/installing-source/installing-mlt-rendering-engine
diff --git a/pkgs/development/libraries/physics/fastnlo_toolkit/default.nix b/pkgs/development/libraries/physics/fastnlo_toolkit/default.nix
index d6cbe7cc4dd..e4a731d3172 100644
--- a/pkgs/development/libraries/physics/fastnlo_toolkit/default.nix
+++ b/pkgs/development/libraries/physics/fastnlo_toolkit/default.nix
@@ -6,7 +6,7 @@
 , gfortran
 , lhapdf
 , ncurses
-, python
+, python ? null
 , swig
 , yoda
 , zlib
diff --git a/pkgs/development/libraries/science/biology/mirtk/default.nix b/pkgs/development/libraries/science/biology/mirtk/default.nix
index 0d23489696f..d2615b391ff 100644
--- a/pkgs/development/libraries/science/biology/mirtk/default.nix
+++ b/pkgs/development/libraries/science/biology/mirtk/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, gtest, fetchFromGitHub, cmake, boost, eigen, python, vtk, zlib, tbb }:
+{ lib, stdenv, gtest, fetchFromGitHub, cmake, boost, eigen, python3, vtk, zlib, tbb }:
 
 stdenv.mkDerivation rec {
   version = "2.0.0";
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
   '';
 
   nativeBuildInputs = [ cmake gtest ];
-  buildInputs = [ boost eigen python vtk zlib tbb ];
+  buildInputs = [ boost eigen python3 vtk zlib tbb ];
 
   meta = with lib; {
     homepage = "https://github.com/BioMedIA/MIRTK";
diff --git a/pkgs/development/libraries/subunit/default.nix b/pkgs/development/libraries/subunit/default.nix
index cb824decc6c..9cc61d20008 100644
--- a/pkgs/development/libraries/subunit/default.nix
+++ b/pkgs/development/libraries/subunit/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, pkg-config, check, cppunit, perl, pythonPackages }:
+{ lib, stdenv, fetchurl, pkg-config, check, cppunit, perl, python3Packages }:
 
 # NOTE: for subunit python library see pkgs/top-level/python-packages.nix
 
@@ -12,9 +12,9 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ check cppunit perl pythonPackages.wrapPython ];
+  buildInputs = [ check cppunit perl python3Packages.wrapPython ];
 
-  propagatedBuildInputs = with pythonPackages; [ testtools testscenarios ];
+  propagatedBuildInputs = with python3Packages; [ testtools testscenarios ];
 
   postFixup = "wrapPythonPrograms";
 
diff --git a/pkgs/development/python-modules/subunit/default.nix b/pkgs/development/python-modules/subunit/default.nix
index f4622689187..c59626fc85c 100644
--- a/pkgs/development/python-modules/subunit/default.nix
+++ b/pkgs/development/python-modules/subunit/default.nix
@@ -27,7 +27,7 @@ buildPythonPackage {
       --ignore=python/subunit/tests/test_{output_filter,test_protocol{,2}}.py
   '';
 
-  patchPhase = ''
+  postPatch = ''
     sed -i 's/version=VERSION/version="${subunit.version}"/' setup.py
   '';
 }
diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix
index bc70f30f959..8111f6e53cd 100644
--- a/pkgs/development/ruby-modules/gem-config/default.nix
+++ b/pkgs/development/ruby-modules/gem-config/default.nix
@@ -17,7 +17,7 @@
 # This seperates "what to build" (the exact gem versions) from "how to build"
 # (to make gems behave if necessary).
 
-{ lib, fetchurl, writeScript, ruby, libkrb5, libxml2, libxslt, python, stdenv, which
+{ lib, fetchurl, writeScript, ruby, libkrb5, libxml2, libxslt, python2, stdenv, which
 , libiconv, postgresql, v8, clang, sqlite, zlib, imagemagick, lasem
 , pkg-config , ncurses, xapian, gpgme, util-linux, tzdata, icu, libffi
 , cmake, libssh2, openssl, libmysqlclient, git, perl, pcre, gecode_3, curl
@@ -328,7 +328,7 @@ in
   # otherwise the gem will fail to link to the libv8 binary.
   # see: https://github.com/cowboyd/libv8/pull/161
   libv8 = attrs: {
-    buildInputs = [ which v8 python ];
+    buildInputs = [ which v8 python2 ];
     buildFlags = [ "--with-system-v8=true" ];
     dontBuild = false;
     postPatch = ''
diff --git a/pkgs/development/tools/libsigrok/default.nix b/pkgs/development/tools/libsigrok/default.nix
index 7f32b0bd716..7b9ebd57391 100644
--- a/pkgs/development/tools/libsigrok/default.nix
+++ b/pkgs/development/tools/libsigrok/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, pkg-config, libzip, glib, libusb1, libftdi1, check
-, libserialport, librevisa, doxygen, glibmm, python
+, libserialport, librevisa, doxygen, glibmm
 , version ? "0.5.1", sha256 ? "171b553dir5gn6w4f7n37waqk62nq2kf1jykx4ifjacdz5xdw3z4"
 }:
 
@@ -19,9 +19,11 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ libzip glib libusb1 libftdi1 check libserialport
-    librevisa doxygen glibmm python
+    librevisa doxygen glibmm
   ];
 
+  strictDeps = true;
+
   postInstall = ''
     mkdir -p "$out/share/sigrok-firmware/"
     tar --strip-components=1 -xvf "${firmware}" -C "$out/share/sigrok-firmware/"
diff --git a/pkgs/development/tools/misc/coccinelle/default.nix b/pkgs/development/tools/misc/coccinelle/default.nix
index 8534f1e2d85..2d9aa55ed05 100644
--- a/pkgs/development/tools/misc/coccinelle/default.nix
+++ b/pkgs/development/tools/misc/coccinelle/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, lib, stdenv, python, ncurses, ocamlPackages, pkg-config }:
+{ fetchurl, lib, stdenv, python3, ncurses, ocamlPackages, pkg-config }:
 
 stdenv.mkDerivation rec {
   pname = "coccinelle";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   buildInputs = with ocamlPackages; [
     ocaml findlib menhir
     ocaml_pcre parmap stdcompat
-    python ncurses pkg-config
+    python3 ncurses pkg-config
   ];
 
   doCheck = false;
diff --git a/pkgs/development/tools/parsing/hammer/default.nix b/pkgs/development/tools/parsing/hammer/default.nix
index 0a9dfdec016..402f83bea16 100644
--- a/pkgs/development/tools/parsing/hammer/default.nix
+++ b/pkgs/development/tools/parsing/hammer/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchgit, glib, pkg-config, python, scons }:
+{ lib, stdenv, fetchgit, glib, pkg-config, scons }:
 
 stdenv.mkDerivation {
   pname = "hammer";
@@ -10,8 +10,10 @@ stdenv.mkDerivation {
     rev = "47f34b81e4de834fd3537dd71928c4f3cdb7f533";
   };
 
-  nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ glib python scons ];
+  nativeBuildInputs = [ pkg-config scons ];
+  buildInputs = [ glib ];
+
+  strictDeps = true;
 
   meta = with lib; {
     description = "A bit-oriented parser combinator library";
diff --git a/pkgs/games/ja2-stracciatella/default.nix b/pkgs/games/ja2-stracciatella/default.nix
index 3ad5ba20c53..ea363c96942 100644
--- a/pkgs/games/ja2-stracciatella/default.nix
+++ b/pkgs/games/ja2-stracciatella/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, fetchFromGitHub, cmake, python, rustPlatform, SDL2, fltk, rapidjson, gtest, Carbon, Cocoa }:
+{ stdenv, lib, fetchurl, fetchFromGitHub, cmake, python3, rustPlatform, SDL2, fltk, rapidjson, gtest, Carbon, Cocoa }:
 let
   version = "0.17.0";
   src = fetchFromGitHub {
@@ -28,7 +28,7 @@ stdenv.mkDerivation {
   pname = "ja2-stracciatella";
   inherit src version;
 
-  nativeBuildInputs = [ cmake python ];
+  nativeBuildInputs = [ cmake python3 ];
   buildInputs = [ SDL2 fltk rapidjson gtest ] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ];
 
   patches = [
diff --git a/pkgs/misc/emulators/blastem/default.nix b/pkgs/misc/emulators/blastem/default.nix
index a2dc86449d9..c96f5d9217c 100644
--- a/pkgs/misc/emulators/blastem/default.nix
+++ b/pkgs/misc/emulators/blastem/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, fetchFromGitHub, pkg-config, SDL2, glew, xcftools, python, pillow, makeWrapper }:
+{ lib, stdenv, fetchurl, fetchFromGitHub, pkg-config, SDL2, glew, xcftools, python2Packages, makeWrapper }:
 
 let
   vasm =
@@ -26,7 +26,7 @@ stdenv.mkDerivation {
     sha256 = "07wzbmzp0y8mh59jxg81q17gqagz3psxigxh8dmzsipgg68y6a8r";
   };
   nativeBuildInputs = [ makeWrapper ];
-  buildInputs = [ pkg-config SDL2 glew xcftools python pillow vasm ];
+  buildInputs = [ pkg-config SDL2 glew xcftools python2Packages.python python2Packages.pillow vasm ];
   preBuild = ''
     patchShebangs img2tiles.py
   '';
diff --git a/pkgs/servers/matrix-appservice-discord/default.nix b/pkgs/servers/matrix-appservice-discord/default.nix
index 7b7a67821f9..5b0c8d10abb 100644
--- a/pkgs/servers/matrix-appservice-discord/default.nix
+++ b/pkgs/servers/matrix-appservice-discord/default.nix
@@ -1,4 +1,4 @@
-{ lib, mkYarnPackage, fetchFromGitHub, runCommand, makeWrapper, python, nodejs }:
+{ lib, mkYarnPackage, fetchFromGitHub, runCommand, makeWrapper, python3, nodejs }:
 
 assert lib.versionAtLeast nodejs.version "12.0.0";
 
@@ -26,7 +26,7 @@ in mkYarnPackage rec {
 
   pkgConfig = {
     better-sqlite3 = {
-      buildInputs = [ python ];
+      buildInputs = [ python3 ];
       postInstall = ''
         # build native sqlite bindings
         npm run build-release --offline --nodedir="${nodeSources}"
diff --git a/pkgs/servers/monitoring/munin/default.nix b/pkgs/servers/monitoring/munin/default.nix
index c25c23671ba..a86dd8471ce 100644
--- a/pkgs/servers/monitoring/munin/default.nix
+++ b/pkgs/servers/monitoring/munin/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub, makeWrapper, which, coreutils, rrdtool, perlPackages
-, python, ruby, jre, nettools, bc
+, python2, ruby, jre, nettools, bc
 }:
 
 stdenv.mkDerivation rec {
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
     perlPackages.ListMoreUtils
     perlPackages.LWP
     perlPackages.DBDPg
-    python
+    python2
     ruby
     jre
     # tests
@@ -97,7 +97,7 @@ stdenv.mkDerivation rec {
     "DESTDIR=$(out)"
     "PERLLIB=$(out)/${perlPackages.perl.libPrefix}"
     "PERL=${perlPackages.perl.outPath}/bin/perl"
-    "PYTHON=${python.outPath}/bin/python"
+    "PYTHON=${python2.outPath}/bin/python"
     "RUBY=${ruby.outPath}/bin/ruby"
     "JAVARUN=${jre.outPath}/bin/java"
     "PLUGINUSER=munin"
diff --git a/pkgs/servers/neard/default.nix b/pkgs/servers/neard/default.nix
index a638c063852..670806db17e 100644
--- a/pkgs/servers/neard/default.nix
+++ b/pkgs/servers/neard/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, systemd, glib, dbus, libnl, pythonPackages }:
+{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, systemd, glib, dbus, libnl, python2Packages }:
 
 stdenv.mkDerivation rec {
   name = "neard-0.16";
@@ -8,9 +8,11 @@ stdenv.mkDerivation rec {
     sha256 = "0bpdmyxvd3z54p95apz4bjb5jp8hbc04sicjapcryjwa8mh6pbil";
   };
 
-  nativeBuildInputs = [ autoreconfHook pkg-config ];
-  buildInputs = [ systemd glib dbus libnl pythonPackages.python pythonPackages.wrapPython ];
-  pythonPath = [ pythonPackages.pygobject2 pythonPackages.dbus-python pythonPackages.pygtk ];
+  nativeBuildInputs = [ autoreconfHook pkg-config python2Packages.wrapPython ];
+  buildInputs = [ systemd glib dbus libnl ] ++ (with python2Packages; [ python ]);
+  pythonPath = with python2Packages; [ pygobject2 dbus-python pygtk ];
+
+  strictDeps = true;
 
   configureFlags = [ "--disable-debug" "--enable-tools" "--enable-ese" "--with-systemdsystemunitdir=$out/lib/systemd/system" ];
 
diff --git a/pkgs/servers/nosql/cassandra/generic.nix b/pkgs/servers/nosql/cassandra/generic.nix
index cab21080a04..2d031ae9f5d 100644
--- a/pkgs/servers/nosql/cassandra/generic.nix
+++ b/pkgs/servers/nosql/cassandra/generic.nix
@@ -1,7 +1,7 @@
 { lib
 , stdenv
 , fetchurl
-, python
+, python2
 , makeWrapper
 , gawk
 , bash
@@ -99,7 +99,7 @@ stdenv.mkDerivation rec {
       fi
     done
 
-    wrapProgram $out/bin/cqlsh --prefix PATH : ${python}/bin
+    wrapProgram $out/bin/cqlsh --prefix PATH : ${python2}/bin
 
     runHook postInstall
   '';
diff --git a/pkgs/tools/audio/mididings/default.nix b/pkgs/tools/audio/mididings/default.nix
index f220fed208f..9913ea911eb 100644
--- a/pkgs/tools/audio/mididings/default.nix
+++ b/pkgs/tools/audio/mididings/default.nix
@@ -1,6 +1,6 @@
-{ lib, pythonPackages, fetchFromGitHub, pkg-config, glib, alsa-lib, libjack2  }:
+{ lib, python2Packages, fetchFromGitHub, pkg-config, glib, alsa-lib, libjack2  }:
 
-pythonPackages.buildPythonApplication {
+python2Packages.buildPythonApplication {
   version = "2015-11-17";
   pname = "mididings";
 
@@ -12,8 +12,8 @@ pythonPackages.buildPythonApplication {
   };
 
   nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ glib alsa-lib libjack2 pythonPackages.boost ];
-  propagatedBuildInputs = with pythonPackages; [ decorator ]
+  buildInputs = [ glib alsa-lib libjack2 python2Packages.boost ];
+  propagatedBuildInputs = with python2Packages; [ decorator ]
     # for livedings
     ++ [ tkinter pyliblo ]
     # for mididings.extra
@@ -25,7 +25,7 @@ pythonPackages.buildPythonApplication {
 
   preBuild = with lib.versions; ''
     substituteInPlace setup.py \
-      --replace boost_python "boost_python${major pythonPackages.python.version}${minor pythonPackages.python.version}"
+      --replace boost_python "boost_python${major python2Packages.python.version}${minor python2Packages.python.version}"
   '';
 
   meta = with lib; {
diff --git a/pkgs/tools/filesystems/mergerfs/tools.nix b/pkgs/tools/filesystems/mergerfs/tools.nix
index e559fd9d4cd..6e11c6513da 100644
--- a/pkgs/tools/filesystems/mergerfs/tools.nix
+++ b/pkgs/tools/filesystems/mergerfs/tools.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub, coreutils, makeWrapper
-, rsync, python3, pythonPackages }:
+, rsync, python3 }:
 
 stdenv.mkDerivation rec {
   pname = "mergerfs-tools";
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   postInstall = with lib; ''
     wrapProgram $out/bin/mergerfs.balance --prefix PATH : ${makeBinPath [ rsync ]}
     wrapProgram $out/bin/mergerfs.dup --prefix PATH : ${makeBinPath [ rsync ]}
-    wrapProgram $out/bin/mergerfs.mktrash --prefix PATH : ${makeBinPath [ pythonPackages.xattr ]}
+    wrapProgram $out/bin/mergerfs.mktrash --prefix PATH : ${makeBinPath [ python3.pkgs.xattr ]}
   '';
 
   meta = with lib; {
diff --git a/pkgs/tools/filesystems/moosefs/default.nix b/pkgs/tools/filesystems/moosefs/default.nix
index ee0d5eedc92..e07ca270b5c 100644
--- a/pkgs/tools/filesystems/moosefs/default.nix
+++ b/pkgs/tools/filesystems/moosefs/default.nix
@@ -1,7 +1,6 @@
 { lib, stdenv
 , fetchFromGitHub
-, makeWrapper
-, python
+, python3
 , fuse
 , pkg-config
 , libpcap
@@ -19,10 +18,14 @@ stdenv.mkDerivation rec {
     sha256 = "0dap9dqwwx8adma6arxg015riqc86cmjv2m44hk0kz7s24h79ipq";
   };
 
-  nativeBuildInputs = [ pkg-config makeWrapper ];
+  nativeBuildInputs = [
+    pkg-config
+  ];
 
   buildInputs =
-    [ fuse libpcap zlib python ];
+    [ fuse libpcap zlib python3 ];
+
+  strictDeps = true;
 
   buildFlags = lib.optionals stdenv.isDarwin [ "CPPFLAGS=-UHAVE_STRUCT_STAT_ST_BIRTHTIME" ];
 
diff --git a/pkgs/tools/graphics/appleseed/default.nix b/pkgs/tools/graphics/appleseed/default.nix
index 1436aacad09..efa46b3b608 100644
--- a/pkgs/tools/graphics/appleseed/default.nix
+++ b/pkgs/tools/graphics/appleseed/default.nix
@@ -1,11 +1,12 @@
 { lib, stdenv, fetchFromGitHub, cmake, boost165, pkg-config, guile,
-eigen, libpng, python, libGLU, qt4, openexr, openimageio,
+eigen, libpng, python3, libGLU, qt4, openexr, openimageio,
 opencolorio_1, xercesc, ilmbase, osl, seexpr, makeWrapper
 }:
 
 let boost_static = boost165.override {
   enableStatic = true;
   enablePython = true;
+  python = python3;
 };
 in stdenv.mkDerivation rec {
 
@@ -20,7 +21,7 @@ in stdenv.mkDerivation rec {
   };
   nativeBuildInputs = [ cmake pkg-config makeWrapper ];
   buildInputs = [
-    boost_static guile eigen libpng python
+    boost_static guile eigen libpng python3
     libGLU qt4 openexr openimageio opencolorio_1 xercesc
     osl seexpr
   ];
@@ -59,7 +60,7 @@ in stdenv.mkDerivation rec {
   # Work around a bug in the CMake build:
   postInstall = ''
     chmod a+x $out/bin/*
-    wrapProgram $out/bin/appleseed.studio --set PYTHONHOME ${python}
+    wrapProgram $out/bin/appleseed.studio --set PYTHONHOME ${python3}
   '';
 }
 
diff --git a/pkgs/tools/misc/me_cleaner/default.nix b/pkgs/tools/misc/me_cleaner/default.nix
index 308b69c9d74..f5e8f152473 100644
--- a/pkgs/tools/misc/me_cleaner/default.nix
+++ b/pkgs/tools/misc/me_cleaner/default.nix
@@ -1,6 +1,6 @@
-{ lib, buildPythonPackage, fetchFromGitHub }:
+{ lib, python2, fetchFromGitHub }:
 
-buildPythonPackage rec {
+python2.pkgs.buildPythonPackage rec {
   pname = "me_cleaner";
   version = "1.2";
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 3666b960dc4..94a2edf502c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2001,8 +2001,8 @@ in
   };
 
   libtensorflow =
-    if python.pkgs.tensorflow ? libtensorflow
-    then python.pkgs.tensorflow.libtensorflow
+    if python3.pkgs.tensorflow ? libtensorflow
+    then python3.pkgs.tensorflow.libtensorflow
     else libtensorflow-bin;
 
   libtorch-bin = callPackage ../development/libraries/science/math/libtorch/bin.nix {
@@ -3537,9 +3537,7 @@ in
   birdfont = callPackage ../tools/misc/birdfont { };
   xmlbird = callPackage ../tools/misc/birdfont/xmlbird.nix { stdenv = gccStdenv; };
 
-  blastem = callPackage ../misc/emulators/blastem {
-    inherit (python27Packages) pillow;
-  };
+  blastem = callPackage ../misc/emulators/blastem { };
 
   blueberry = callPackage ../tools/bluetooth/blueberry { };
 
@@ -3758,7 +3756,7 @@ in
   convertlit = callPackage ../tools/text/convertlit { };
 
   collectd = callPackage ../tools/system/collectd {
-    libsigrok = libsigrok-0-3-0; # not compatible with >= 0.4.0 yet
+    libsigrok = libsigrok_0_3; # not compatible with >= 0.4.0 yet
     jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
   };
 
@@ -12600,7 +12598,7 @@ in
     stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
   };
 
-  me_cleaner = pythonPackages.callPackage ../tools/misc/me_cleaner { };
+  me_cleaner = callPackage ../tools/misc/me_cleaner { };
 
   mesos-dns = callPackage ../servers/mesos-dns { };
 
@@ -13502,7 +13500,7 @@ in
 
   libsigrok = callPackage ../development/tools/libsigrok { };
   # old version:
-  libsigrok-0-3-0 = libsigrok.override {
+  libsigrok_0_3 = libsigrok.override {
     version = "0.3.0";
     sha256 = "0l3h7zvn3w4c1b9dgvl3hirc4aj1csfkgbk87jkpl7bgl03nk4j3";
   };
@@ -17207,9 +17205,12 @@ in
 
   libtorrent-rasterbar-1_2_x = callPackage ../development/libraries/libtorrent-rasterbar/1.2.nix {
     inherit (darwin.apple_sdk.frameworks) SystemConfiguration;
+    python = python2;
   };
 
-  libtorrent-rasterbar-1_1_x = callPackage ../development/libraries/libtorrent-rasterbar/1.1.nix { };
+  libtorrent-rasterbar-1_1_x = callPackage ../development/libraries/libtorrent-rasterbar/1.1.nix {
+    python = python2;
+  };
 
   libtorrent-rasterbar = libtorrent-rasterbar-2_0_x;
 
@@ -17622,7 +17623,7 @@ in
 
   mvapich = callPackage ../development/libraries/mvapich { };
 
-  mygpoclient = pythonPackages.mygpoclient;
+  mygpoclient = with python3.pkgs; toPythonApplication mygpoclient;
 
   mygui = callPackage ../development/libraries/mygui {
     ogre = ogre1_9;
@@ -17834,6 +17835,7 @@ in
 
   opencv4 = callPackage ../development/libraries/opencv/4.x.nix {
     inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa VideoDecodeAcceleration CoreMedia MediaToolbox;
+    pythonPackages = python3Packages;
   };
 
   opencv = opencv4;
@@ -25208,6 +25210,7 @@ in
     stdenv = gcc6Stdenv;
     boost = boost155.override {
       enablePython = true;
+      python = python2;
       stdenv = gcc6Stdenv;
       buildPackages = buildPackages // {
         stdenv = gcc6Stdenv;
@@ -30804,7 +30807,9 @@ in
 
   scotch = callPackage ../applications/science/math/scotch { };
 
-  mininet = callPackage ../tools/virtualization/mininet { };
+  mininet = callPackage ../tools/virtualization/mininet {
+    python = python3;
+  };
 
   msieve = callPackage ../applications/science/math/msieve { };
 
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index db9a6a9dc8c..067eaf16749 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -4514,7 +4514,7 @@ in {
   mlxtend = callPackage ../development/python-modules/mlxtend { };
 
   mlt = toPythonModule (pkgs.mlt.override {
-    inherit python;
+    python3 = python;
     enablePython = true;
   });
 
diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix
index 64330664852..caa44e5947e 100644
--- a/pkgs/top-level/python2-packages.nix
+++ b/pkgs/top-level/python2-packages.nix
@@ -281,6 +281,8 @@ with self; with super; {
 
   metaphone = callPackage ../development/python-modules/metaphone { };
 
+  mlt = disabled super.mlt;
+
   mock = callPackage ../development/python-modules/mock/2.nix { };
 
   # Needed here because moinmoin is loaded as a Python library.