From 8a94b356dbd2223d445068cb3e882b48c7f6fbf3 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:12:51 +0100 Subject: [PATCH 01/72] partio: python is not used in the build --- pkgs/development/libraries/partio/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/partio/default.nix b/pkgs/development/libraries/partio/default.nix index 0247d12715f..d4af69532b3 100644 --- a/pkgs/development/libraries/partio/default.nix +++ b/pkgs/development/libraries/partio/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, unzip, cmake, freeglut, libGLU, libGL, zlib, swig, python, doxygen, xorg }: +{ lib, stdenv, fetchFromGitHub, unzip, cmake, freeglut, libGLU, libGL, zlib, swig, doxygen, xorg }: stdenv.mkDerivation { pname = "partio"; @@ -14,7 +14,7 @@ stdenv.mkDerivation { outputs = [ "dev" "out" "lib" ]; nativeBuildInputs = [ unzip cmake doxygen ]; - buildInputs = [ freeglut libGLU libGL zlib swig python xorg.libXi xorg.libXmu ]; + buildInputs = [ freeglut libGLU libGL zlib swig xorg.libXi xorg.libXmu ]; buildPhase = '' make partio @@ -32,6 +32,8 @@ stdenv.mkDerivation { mv $dev/include/*.h $dev/include/partio ''; + strictDeps = true; + meta = with lib; { description = "C++ (with python bindings) library for easily reading/writing/manipulating common animation particle formats such as PDB, BGEO, PTC"; homepage = "https://www.disneyanimation.com/technology/partio.html"; From 43675726a780d06c392cb2de8d31c231bf600332 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:16:52 +0100 Subject: [PATCH 02/72] seabios: use python3 --- pkgs/applications/virtualization/seabios/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/seabios/default.nix b/pkgs/applications/virtualization/seabios/default.nix index f97f13dab2a..42e1eaf56d4 100644 --- a/pkgs/applications/virtualization/seabios/default.nix +++ b/pkgs/applications/virtualization/seabios/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, iasl, python }: +{ lib, stdenv, fetchurl, iasl, python3 }: stdenv.mkDerivation rec { @@ -10,7 +10,11 @@ stdenv.mkDerivation rec { sha256 = "1zc1brgafbbf5hmdr1qc1p859cabpz73l8sklq83xa4sn9icqw7b"; }; - buildInputs = [ iasl python ]; + nativeBuildInputs = [ python3 ]; + + buildInputs = [ iasl ]; + + strictDeps = true; hardeningDisable = [ "pic" "stackprotector" "fortify" ]; From 6eea374b40b6e0012142e504f46e034f4154ba9d Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:17:21 +0100 Subject: [PATCH 03/72] graphite2: remove unused python --- pkgs/development/libraries/silgraphite/graphite2.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/libraries/silgraphite/graphite2.nix b/pkgs/development/libraries/silgraphite/graphite2.nix index 166d0f2911d..cd737a82a29 100644 --- a/pkgs/development/libraries/silgraphite/graphite2.nix +++ b/pkgs/development/libraries/silgraphite/graphite2.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkg-config, freetype, cmake, python }: +{ lib, stdenv, fetchurl, pkg-config, freetype, cmake }: stdenv.mkDerivation rec { version = "1.3.14"; @@ -15,7 +15,6 @@ stdenv.mkDerivation rec { patches = lib.optionals stdenv.isDarwin [ ./macosx.patch ]; - checkInputs = [ python ]; doCheck = false; # fails, probably missing something meta = with lib; { From 52dc628b43acbe3d1c28773f8ceddfb78cfae630 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:17:50 +0100 Subject: [PATCH 04/72] 20kly: use python2 --- pkgs/games/20kly/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/games/20kly/default.nix b/pkgs/games/20kly/default.nix index 092e0e4eac2..7cc2ea6220e 100644 --- a/pkgs/games/20kly/default.nix +++ b/pkgs/games/20kly/default.nix @@ -1,12 +1,12 @@ { lib , fetchurl -, python }: +, python2 }: -python.pkgs.buildPythonApplication rec { +python2.pkgs.buildPythonApplication rec { pname = "20kly"; version = "1.4"; format = "other"; - disabled = !(python.isPy2 or false); + disabled = !(python2.isPy2 or false); src = fetchurl { url = "http://jwhitham.org.uk/20kly/lightyears-${version}.tar.bz2"; @@ -20,7 +20,7 @@ python.pkgs.buildPythonApplication rec { "LIGHTYEARS_DIR = \"$out/share\"" ''; - propagatedBuildInputs = with python.pkgs; [ pygame ]; + propagatedBuildInputs = with python2.pkgs; [ pygame ]; buildPhase = "python -O -m compileall ."; From c657b02df28704f85f4b32edf912bfc6137bf9ef Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:18:20 +0100 Subject: [PATCH 05/72] _389-ds-base: use python3 --- pkgs/servers/ldap/389/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/ldap/389/default.nix b/pkgs/servers/ldap/389/default.nix index bfa372ed069..90510d50252 100644 --- a/pkgs/servers/ldap/389/default.nix +++ b/pkgs/servers/ldap/389/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, fetchpatch, autoreconfHook, pkg-config, doxygen, perl, pam, nspr, nss, openldap -, db, cyrus_sasl, svrcore, icu, net-snmp, kerberos, pcre, perlPackages, libevent, openssl, python +, db, cyrus_sasl, svrcore, icu, net-snmp, kerberos, pcre, perlPackages, libevent, openssl, python3 }: stdenv.mkDerivation rec { @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config doxygen ]; buildInputs = [ perl pam nspr nss openldap db cyrus_sasl svrcore icu - net-snmp kerberos pcre libevent openssl python + net-snmp kerberos pcre libevent openssl python3 ] ++ (with perlPackages; [ MozillaLdap NetAddrIP DBFile ]); patches = [ From afd5d2377925cd8351b88e5eccf725fcab3be4af Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:24:48 +0100 Subject: [PATCH 06/72] arrayfire: use python3 --- pkgs/development/libraries/arrayfire/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/arrayfire/default.nix b/pkgs/development/libraries/arrayfire/default.nix index c636d672332..a66db480017 100644 --- a/pkgs/development/libraries/arrayfire/default.nix +++ b/pkgs/development/libraries/arrayfire/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, fetchFromGitHub, cmake, pkg-config , opencl-clhpp, ocl-icd, fftw, fftwFloat , blas, lapack, boost, mesa, libGLU, libGL -, freeimage, python, clfft, clblas +, freeimage, python3, clfft, clblas , doxygen, buildDocs ? false , cudaSupport ? false, cudatoolkit }: @@ -39,9 +39,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config - python + python3 ]; + strictDeps = true; + buildInputs = [ opencl-clhpp fftw fftwFloat blas lapack From 469f6687697fbfdf9afe171a3336a9fff60b0a9f Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:26:38 +0100 Subject: [PATCH 07/72] aubio: use python3 --- pkgs/development/libraries/aubio/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/aubio/default.nix b/pkgs/development/libraries/aubio/default.nix index 7aa4859ef0e..b1c6c6396c8 100644 --- a/pkgs/development/libraries/aubio/default.nix +++ b/pkgs/development/libraries/aubio/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, alsaLib, fftw, libjack2, libsamplerate -, libsndfile, pkg-config, python, wafHook +, libsndfile, pkg-config, python3, wafHook }: stdenv.mkDerivation rec { @@ -10,9 +10,11 @@ stdenv.mkDerivation rec { sha256 = "1npks71ljc48w6858l9bq30kaf5nph8z0v61jkfb70xb9np850nl"; }; - nativeBuildInputs = [ pkg-config python wafHook ]; + nativeBuildInputs = [ pkg-config python3 wafHook ]; buildInputs = [ alsaLib fftw libjack2 libsamplerate libsndfile ]; + strictDeps = true; + meta = with lib; { description = "Library for audio labelling"; homepage = "https://aubio.org/"; From 548c9c0daa80651311f5f10d4260d67313e24633 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:26:46 +0100 Subject: [PATCH 08/72] jxrlib: use python3 --- pkgs/development/libraries/jxrlib/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/jxrlib/default.nix b/pkgs/development/libraries/jxrlib/default.nix index 78cc48d8209..b2cc4ab08b4 100644 --- a/pkgs/development/libraries/jxrlib/default.nix +++ b/pkgs/development/libraries/jxrlib/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, python }: +{ lib, stdenv, fetchFromGitHub, python3 }: stdenv.mkDerivation rec { pname = "jxrlib"; @@ -19,7 +19,9 @@ stdenv.mkDerivation rec { --replace '.so' '.dylib' ''; - nativeBuildInputs = [ python ]; + nativeBuildInputs = [ python3 ]; + + strictDeps = true; makeFlags = [ "DIR_INSTALL=$(out)" "SHARED=1" ]; From 5603cabc2f48d765d2f09594e7669e1738ff0cdc Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:26:56 +0100 Subject: [PATCH 09/72] opencl-clhpp: use python3 --- pkgs/development/libraries/opencl-clhpp/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/opencl-clhpp/default.nix b/pkgs/development/libraries/opencl-clhpp/default.nix index ec40bc393d5..b6aa7149168 100644 --- a/pkgs/development/libraries/opencl-clhpp/default.nix +++ b/pkgs/development/libraries/opencl-clhpp/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, python, opencl-headers }: +{ lib, stdenv, fetchFromGitHub, cmake, python3, opencl-headers }: stdenv.mkDerivation rec { pname = "opencl-clhpp"; @@ -11,10 +11,12 @@ stdenv.mkDerivation rec { sha256 = "04g3mg2cpbi048fxxkghra81bpxzqr4r3gspx5mvqipx1lzypsci"; }; - nativeBuildInputs = [ cmake python ]; + nativeBuildInputs = [ cmake python3 ]; propagatedBuildInputs = [ opencl-headers ]; + strictDeps = true; + cmakeFlags = [ "-DBUILD_EXAMPLES=OFF" "-DBUILD_TESTS=OFF" From c71c5a3cb060fc698ef765cbe7fb126de9007f89 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:27:04 +0100 Subject: [PATCH 10/72] clblas: use python3 --- pkgs/development/libraries/science/math/clblas/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/math/clblas/default.nix b/pkgs/development/libraries/science/math/clblas/default.nix index aca395001f9..fcb49d70a3b 100644 --- a/pkgs/development/libraries/science/math/clblas/default.nix +++ b/pkgs/development/libraries/science/math/clblas/default.nix @@ -4,7 +4,7 @@ , gfortran , blas , boost -, python +, python3 , ocl-icd , opencl-headers , Accelerate, CoreGraphics, CoreVideo, OpenCL @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { buildInputs = [ gfortran blas - python + python3 boost ] ++ lib.optionals (!stdenv.isDarwin) [ ocl-icd @@ -53,6 +53,8 @@ stdenv.mkDerivation rec { OpenCL ]; + strictDeps = true; + meta = with lib; { homepage = "https://github.com/clMathLibraries/clBLAS"; description = "A software library containing BLAS functions written in OpenCL"; From 5788d7dbbd1784017e14168b5b4745840a234a95 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:28:21 +0100 Subject: [PATCH 11/72] backblaze-b2: use correct callPackage --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d53d3750606..a318040b096 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1609,7 +1609,7 @@ in b3sum = callPackage ../tools/security/b3sum {}; - backblaze-b2 = python.pkgs.callPackage ../development/tools/backblaze-b2 { }; + backblaze-b2 = callPackage ../development/tools/backblaze-b2 { }; bandwhich = callPackage ../tools/networking/bandwhich { inherit (darwin.apple_sdk.frameworks) Security; From d191ee7330628d665078aee7f89af7e40b7a1907 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:29:14 +0100 Subject: [PATCH 12/72] bam: use python3 --- pkgs/development/tools/build-managers/bam/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/build-managers/bam/default.nix b/pkgs/development/tools/build-managers/bam/default.nix index a828c57b8c0..556725cca6c 100644 --- a/pkgs/development/tools/build-managers/bam/default.nix +++ b/pkgs/development/tools/build-managers/bam/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, lua5_3, python }: +{ lib, stdenv, fetchFromGitHub, lua5_3, python3 }: stdenv.mkDerivation rec { pname = "bam"; @@ -11,11 +11,13 @@ stdenv.mkDerivation rec { sha256 = "13br735ig7lygvzyfd15fc2rdygrqm503j6xj5xkrl1r7w2wipq6"; }; - buildInputs = [ lua5_3 python ]; + nativeBuildInputs = [ lua5_3 python3 ]; buildPhase = "${stdenv.shell} make_unix.sh"; - checkPhase = "${python.interpreter} scripts/test.py"; + checkPhase = "${python3.interpreter} scripts/test.py"; + + strictDeps = true; installPhase = '' mkdir -p "$out/share/bam" From be247c12b8e6ecfb8a17ba514d41e69116957df1 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:32:48 +0100 Subject: [PATCH 13/72] bashSnippets: use python3 --- pkgs/applications/misc/bashSnippets/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/bashSnippets/default.nix b/pkgs/applications/misc/bashSnippets/default.nix index d50f3637988..52d56d5c8f5 100644 --- a/pkgs/applications/misc/bashSnippets/default.nix +++ b/pkgs/applications/misc/bashSnippets/default.nix @@ -1,10 +1,10 @@ { stdenv, lib, fetchFromGitHub, makeWrapper -, curl, python, bind, iproute, bc, gitMinimal }: +, curl, python3, bind, iproute, bc, gitMinimal }: let version = "1.23.0"; deps = lib.makeBinPath [ curl - python + python3 bind.dnsutils iproute bc @@ -24,11 +24,13 @@ stdenv.mkDerivation { nativeBuildInputs = [ makeWrapper ]; - patchPhase = '' + postPatch = '' patchShebangs install.sh substituteInPlace install.sh --replace /usr/local "$out" ''; + strictDeps = true; + dontBuild = true; installPhase = '' From 43b7b079dd69811ea9689a55e420271f5714f4c9 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:36:54 +0100 Subject: [PATCH 14/72] bazel-watcher: use python3 --- pkgs/development/tools/bazel-watcher/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/bazel-watcher/default.nix b/pkgs/development/tools/bazel-watcher/default.nix index bc3a2828f6c..657704a653c 100644 --- a/pkgs/development/tools/bazel-watcher/default.nix +++ b/pkgs/development/tools/bazel-watcher/default.nix @@ -2,7 +2,7 @@ , fetchFromGitHub , git , go -, python +, python3 , lib, stdenv }: @@ -22,7 +22,7 @@ buildBazelPackage rec { sha256 = "0gigl1lg8sb4bj5crvj54329ws4yirldbncs15f96db6vhp0ig7r"; }; - nativeBuildInputs = [ go git python ]; + nativeBuildInputs = [ go git python3 ]; removeRulesCC = false; bazelTarget = "//ibazel"; From 490bdd203cdf7d0d48930a23f17b49cb02f8e4c6 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:39:17 +0100 Subject: [PATCH 15/72] bazel_0_26: use python3 --- .../build-managers/bazel/bazel_0_26/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix index 2ec244e502b..f03f42be389 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix @@ -1,6 +1,6 @@ { stdenv, callPackage, lib, fetchurl, fetchpatch, runCommand, makeWrapper , zip, unzip, bash, writeCBin, coreutils -, which, python, perl, gawk, gnused, gnutar, gnugrep, gzip, findutils +, which, python3, perl, gawk, gnused, gnutar, gnugrep, gzip, findutils # Apple dependencies , cctools, llvmPackages_8, CoreFoundation, CoreServices, Foundation # Allow to independently override the jdks used to build and run respectively @@ -210,8 +210,8 @@ stdenv'.mkDerivation rec { # Substitute python's stub shebang to plain python path. (see TODO add pr URL) # See also `postFixup` where python is added to $out/nix-support substituteInPlace src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt\ - --replace "/usr/bin/env python" "${python}/bin/python" \ - --replace "NIX_STORE_PYTHON_PATH" "${python}/bin/python" \ + --replace "/usr/bin/env python" "${python3.interpreter}" \ + --replace "NIX_STORE_PYTHON_PATH" "${python3.interpreter}" \ # md5sum is part of coreutils sed -i 's|/sbin/md5|md5sum|' \ @@ -287,11 +287,13 @@ stdenv'.mkDerivation rec { buildJdk ]; + strictDeps = true; + # when a command can’t be found in a bazel build, you might also # need to add it to `defaultShellPath`. nativeBuildInputs = [ zip - python + python3 unzip makeWrapper which @@ -380,7 +382,7 @@ stdenv'.mkDerivation rec { echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends # The templates get tar’d up into a .jar, # so nix can’t detect python is needed in the runtime closure - echo "${python}" >> $out/nix-support/depends + echo "${python3}" >> $out/nix-support/depends ''; dontStrip = true; From 2c00aed6b1504455d267bf08abfa621601575f8d Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:39:47 +0100 Subject: [PATCH 16/72] bcftools: use python3 --- .../applications/science/biology/bcftools/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/biology/bcftools/default.nix b/pkgs/applications/science/biology/bcftools/default.nix index e15cac60295..80506bb79b6 100644 --- a/pkgs/applications/science/biology/bcftools/default.nix +++ b/pkgs/applications/science/biology/bcftools/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, htslib, zlib, bzip2, lzma, curl, perl, python, bash }: +{ lib, stdenv, fetchurl, htslib, zlib, bzip2, lzma, curl, perl, python3, bash }: stdenv.mkDerivation rec { pname = "bcftools"; @@ -9,7 +9,14 @@ stdenv.mkDerivation rec { sha256 = "0r508mp15pqzf8r1269kb4v5naw9zsvbwd3cz8s1yj7carsf9viw"; }; - buildInputs = [ htslib zlib bzip2 lzma curl perl python ]; + nativeBuildInputs = [ + perl + python3 + ]; + + buildInputs = [ htslib zlib bzip2 lzma curl ]; + + strictDeps = true; makeFlags = [ "HSTDIR=${htslib}" From 15d41619317efa2a84ac8798736772c1b9a14e4e Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:41:25 +0100 Subject: [PATCH 17/72] biblatex-check: use python3 --- pkgs/tools/typesetting/biblatex-check/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/typesetting/biblatex-check/default.nix b/pkgs/tools/typesetting/biblatex-check/default.nix index 606e07730e4..63bf7cf1d71 100644 --- a/pkgs/tools/typesetting/biblatex-check/default.nix +++ b/pkgs/tools/typesetting/biblatex-check/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, python }: +{ lib, stdenv, fetchFromGitHub, python3 }: stdenv.mkDerivation { pname = "biblatex-check"; @@ -11,7 +11,9 @@ stdenv.mkDerivation { sha256 = "1bq0yqckhssazwkivipdjmn1jpsf301i4ppyl88qhc5igx39wg25"; }; - buildInputs = [ python ]; + buildInputs = [ python3 ]; + + strictDeps = true; installPhase = '' install -Dm755 biblatex_check.py $out/bin/biblatex-check From 5a5cb718a590fddd8d982bef9d9c41f9187a4f68 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:42:32 +0100 Subject: [PATCH 18/72] bedtools: use python3 --- pkgs/applications/science/biology/bedtools/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/biology/bedtools/default.nix b/pkgs/applications/science/biology/bedtools/default.nix index d0553bb0649..f5aad5d0554 100644 --- a/pkgs/applications/science/biology/bedtools/default.nix +++ b/pkgs/applications/science/biology/bedtools/default.nix @@ -1,4 +1,4 @@ -{lib, stdenv, fetchFromGitHub, zlib, python, bzip2, lzma}: +{lib, stdenv, fetchFromGitHub, zlib, python3, bzip2, lzma}: stdenv.mkDerivation rec { pname = "bedtools"; @@ -11,7 +11,13 @@ stdenv.mkDerivation rec { sha256 = "sha256-NqKldF7ePJn3pT+AkESIQghBKSFFOEBBsTaKEbU+oaQ="; }; - buildInputs = [ zlib python bzip2 lzma ]; + strictDeps = true; + + nativeBuildInputs = [ + python3 + ]; + + buildInputs = [ zlib bzip2 lzma ]; cxx = if stdenv.cc.isClang then "clang++" else "g++"; cc = if stdenv.cc.isClang then "clang" else "gcc"; buildPhase = "make prefix=$out SHELL=${stdenv.shell} CXX=${cxx} CC=${cc} -j $NIX_BUILD_CORES"; From 8e866ceabcb300d683178cb41c9fc4d31f4e0454 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:46:59 +0100 Subject: [PATCH 19/72] bitlbee: use python2 --- .../networking/instant-messengers/bitlbee/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/bitlbee/default.nix b/pkgs/applications/networking/instant-messengers/bitlbee/default.nix index 1a83a04a1fa..c5a718c3a70 100644 --- a/pkgs/applications/networking/instant-messengers/bitlbee/default.nix +++ b/pkgs/applications/networking/instant-messengers/bitlbee/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, fetchpatch, stdenv, gnutls, glib, pkg-config, check, libotr, python +{ lib, fetchurl, fetchpatch, stdenv, gnutls, glib, pkg-config, check, libotr, python2 , enableLibPurple ? false, pidgin ? null , enablePam ? false, pam ? null }: @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ] ++ optional doCheck check; - buildInputs = [ gnutls libotr python ] + buildInputs = [ gnutls libotr python2 ] ++ optional enableLibPurple pidgin ++ optional enablePam pam; From 2b0f34bcb5594760eedc2feaa50375fa066f9593 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:52:10 +0100 Subject: [PATCH 20/72] blackmagic: use python3 --- pkgs/development/tools/misc/blackmagic/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/misc/blackmagic/default.nix b/pkgs/development/tools/misc/blackmagic/default.nix index fc1af1a4d68..080bc7a7f74 100644 --- a/pkgs/development/tools/misc/blackmagic/default.nix +++ b/pkgs/development/tools/misc/blackmagic/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchFromGitHub , gcc-arm-embedded, libftdi1, libusb-compat-0_1, pkg-config -, python, pythonPackages +, python3 }: with lib; @@ -21,15 +21,16 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gcc-arm-embedded pkg-config + python3 ]; buildInputs = [ libftdi1 libusb-compat-0_1 - python - pythonPackages.intelhex ]; + strictDeps = true; + postPatch = '' # Prevent calling out to `git' to generate a version number: substituteInPlace src/Makefile \ From 69f354b89b19f9950bcbdbc1a904bdb320038725 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:56:26 +0100 Subject: [PATCH 21/72] blink: use python2 --- .../networking/instant-messengers/blink/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/blink/default.nix b/pkgs/applications/networking/instant-messengers/blink/default.nix index 3ee835610f7..805278b4e45 100644 --- a/pkgs/applications/networking/instant-messengers/blink/default.nix +++ b/pkgs/applications/networking/instant-messengers/blink/default.nix @@ -1,7 +1,7 @@ -{ lib, fetchdarcs, pythonPackages, libvncserver, zlib +{ lib, fetchdarcs, python2Packages, libvncserver, zlib , gnutls, libvpx, makeDesktopItem, mkDerivationWith }: -mkDerivationWith pythonPackages.buildPythonApplication rec { +mkDerivationWith python2Packages.buildPythonApplication rec { pname = "blink"; version = "3.2.0"; @@ -17,7 +17,7 @@ mkDerivationWith pythonPackages.buildPythonApplication rec { sed -i 's|@out@|'"''${out}"'|g' blink/resources.py ''; - propagatedBuildInputs = with pythonPackages; [ + propagatedBuildInputs = with python2Packages; [ pyqt5_with_qtwebkit cjson sipsimple @@ -26,7 +26,7 @@ mkDerivationWith pythonPackages.buildPythonApplication rec { ]; buildInputs = [ - pythonPackages.cython + python2Packages.cython zlib libvncserver libvpx From ff12cb0ef6e8a86166b8e215f447a13fb104e205 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 10:57:48 +0100 Subject: [PATCH 22/72] blockhash: use python2 --- pkgs/tools/graphics/blockhash/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/graphics/blockhash/default.nix b/pkgs/tools/graphics/blockhash/default.nix index a0ecdde3826..b3426722f79 100644 --- a/pkgs/tools/graphics/blockhash/default.nix +++ b/pkgs/tools/graphics/blockhash/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, python, pkg-config, imagemagick, wafHook }: +{ lib, stdenv, fetchFromGitHub, python2, pkg-config, imagemagick, wafHook }: stdenv.mkDerivation rec { pname = "blockhash"; @@ -11,9 +11,11 @@ stdenv.mkDerivation rec { sha256 = "0m7ikppl42iicgmwsb7baajmag7v0p1ab06xckifvrr0zm21bq9p"; }; - nativeBuildInputs = [ python pkg-config wafHook ]; + nativeBuildInputs = [ python2 pkg-config wafHook ]; buildInputs = [ imagemagick ]; + strictDeps = true; + meta = with lib; { homepage = "http://blockhash.io/"; description = '' From 69832d0e280c20a3e96f54e7a7e29b8854d0ef44 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:00:00 +0100 Subject: [PATCH 23/72] bluefish: use python3 --- pkgs/applications/editors/bluefish/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/bluefish/default.nix b/pkgs/applications/editors/bluefish/default.nix index 2507cb13d7a..1f45d4f2ff2 100644 --- a/pkgs/applications/editors/bluefish/default.nix +++ b/pkgs/applications/editors/bluefish/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, intltool, wrapGAppsHook, pkg-config , gtk, libxml2 -, enchant, gucharmap, python, gnome3 +, enchant, gucharmap, python3, gnome3 }: stdenv.mkDerivation rec { @@ -12,7 +12,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ intltool pkg-config wrapGAppsHook ]; buildInputs = [ gnome3.adwaita-icon-theme gtk libxml2 - enchant gucharmap python ]; + enchant gucharmap python3 ]; + + strictDeps = true; meta = with lib; { description = "A powerful editor targeted towards programmers and webdevelopers"; From 1d1904bdace14a495868e6e53efdf2139776fb69 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:04:30 +0100 Subject: [PATCH 24/72] bluefish: don't use strictDeps needs further fixing --- pkgs/applications/editors/bluefish/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/applications/editors/bluefish/default.nix b/pkgs/applications/editors/bluefish/default.nix index 1f45d4f2ff2..59d1f11312d 100644 --- a/pkgs/applications/editors/bluefish/default.nix +++ b/pkgs/applications/editors/bluefish/default.nix @@ -14,8 +14,6 @@ stdenv.mkDerivation rec { buildInputs = [ gnome3.adwaita-icon-theme gtk libxml2 enchant gucharmap python3 ]; - strictDeps = true; - meta = with lib; { description = "A powerful editor targeted towards programmers and webdevelopers"; homepage = "http://bluefish.openoffice.nl/"; From 8d03aea17897dd2918a621f2c778ebe53d98104f Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:08:09 +0100 Subject: [PATCH 25/72] botan: use python3 --- pkgs/development/libraries/botan/generic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/botan/generic.nix b/pkgs/development/libraries/botan/generic.nix index 0369f603b8e..33f9daf7b50 100644 --- a/pkgs/development/libraries/botan/generic.nix +++ b/pkgs/development/libraries/botan/generic.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, python, bzip2, zlib, gmp, openssl, boost +{ lib, stdenv, fetchurl, python3, bzip2, zlib, gmp, openssl, boost # Passed by version specific builders , baseVersion, revision, sha256 , sourceExtension ? "tar.xz" @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { }; inherit postPatch; - buildInputs = [ python bzip2 zlib gmp openssl boost ] + buildInputs = [ python3 bzip2 zlib gmp openssl boost ] ++ lib.optionals stdenv.isDarwin [ CoreServices Security ]; configurePhase = '' From 4436ac1056c86647da05c62eedea8df61c58b43c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:10:31 +0100 Subject: [PATCH 26/72] bud: use python2 --- pkgs/tools/networking/bud/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/bud/default.nix b/pkgs/tools/networking/bud/default.nix index 724d25d49f9..7a4bd5adcba 100644 --- a/pkgs/tools/networking/bud/default.nix +++ b/pkgs/tools/networking/bud/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchgit, python, gyp, util-linux }: +{ stdenv, lib, fetchgit, python2, util-linux }: stdenv.mkDerivation { pname = "bud"; @@ -11,10 +11,12 @@ stdenv.mkDerivation { sha256 = "08yr6l4lc2m6rng06253fcaznf6sq0v053wfr8bbym42c32z0xdh"; }; - buildInputs = [ - python gyp + nativeBuildInputs = [ + python2 python2.pkgs.gyp ] ++ lib.optional stdenv.isLinux util-linux; + strictDeps = true; + buildPhase = '' python ./gyp_bud -f make make -C out From 137fb57d98e13f4f7f6417e185e57e5391f83f99 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:18:05 +0100 Subject: [PATCH 27/72] opencv3: pythonPackages can be missing when we do not need Python (default) --- pkgs/development/libraries/opencv/3.x.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index 11872cd47cc..a65e978f981 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -18,7 +18,7 @@ , enableUnfree ? false , enableIpp ? false -, enablePython ? false, pythonPackages +, enablePython ? false, pythonPackages ? null , enableGtk2 ? false, gtk2 , enableGtk3 ? false, gtk3 , enableVtk ? false, vtk @@ -36,6 +36,8 @@ assert blas.implementation == "openblas" && lapack.implementation == "openblas"; +assert enablePython -> pythonPackages != null; + let version = "3.4.8"; From f19233bea914dae5b7e962342f0568eace7020bd Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:20:36 +0100 Subject: [PATCH 28/72] carddav-util: use python2 --- pkgs/tools/networking/carddav-util/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/carddav-util/default.nix b/pkgs/tools/networking/carddav-util/default.nix index 112a95eccc6..300e03761a6 100644 --- a/pkgs/tools/networking/carddav-util/default.nix +++ b/pkgs/tools/networking/carddav-util/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchgit, python, pythonPackages, makeWrapper }: +{ lib, stdenv, fetchgit, python3Packages, makeWrapper }: stdenv.mkDerivation { @@ -12,7 +12,9 @@ stdenv.mkDerivation { nativeBuildInputs = [ makeWrapper ]; - propagatedBuildInputs = with pythonPackages; [ requests vobject lxml ]; + propagatedBuildInputs = with python3Packages; [ requests vobject lxml ]; + + strictDeps = true; doCheck = false; # no test @@ -20,7 +22,7 @@ stdenv.mkDerivation { mkdir -p $out/bin cp $src/carddav-util.py $out/bin - pythondir="$out/lib/${python.libPrefix}/site-packages" + pythondir="$out/lib/${python3Packages.python.sitePackages}" mkdir -p "$pythondir" cp $src/carddav.py "$pythondir" ''; From 344bce24317d48f85ec4561c3f9129e62af8ab05 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:21:54 +0100 Subject: [PATCH 29/72] cask: use python3 --- pkgs/development/tools/cask/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/cask/default.nix b/pkgs/development/tools/cask/default.nix index 886d435b811..1c5f316cea9 100644 --- a/pkgs/development/tools/cask/default.nix +++ b/pkgs/development/tools/cask/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, python, emacs }: +{ lib, stdenv, fetchurl, python3, emacs }: stdenv.mkDerivation rec { pname = "cask"; @@ -12,9 +12,11 @@ stdenv.mkDerivation rec { s f dash ansi ecukes servant ert-runner el-mock noflet ert-async shell-split-string git package-build ] ++ [ - python + python3 ]; + strictDeps = true; + buildPhase = '' emacs --batch -L . -f batch-byte-compile cask.el cask-cli.el ''; From 050fa17bd69c4d98ae6790f8b5b5229cc89f027c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:25:09 +0100 Subject: [PATCH 30/72] ccnet: use python3 --- pkgs/tools/networking/ccnet/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/ccnet/default.nix b/pkgs/tools/networking/ccnet/default.nix index b8fd0679892..3293ebe25c8 100644 --- a/pkgs/tools/networking/ccnet/default.nix +++ b/pkgs/tools/networking/ccnet/default.nix @@ -1,4 +1,4 @@ -{lib, stdenv, fetchurl, which, autoreconfHook, pkg-config, vala, python, libsearpc, libzdb, libuuid, libevent, sqlite, openssl}: +{lib, stdenv, fetchurl, which, autoreconfHook, pkg-config, vala, python3, libsearpc, libzdb, libuuid, libevent, sqlite, openssl}: stdenv.mkDerivation rec { version = "6.1.8"; @@ -10,11 +10,13 @@ stdenv.mkDerivation rec { sha256 = "0qlpnrz30ldrqnvbj59d54qdghxpxc5lsq6kf3dw2b93jnzkcmmm"; }; - nativeBuildInputs = [ pkg-config which autoreconfHook vala python ]; + nativeBuildInputs = [ pkg-config which autoreconfHook vala python3 libsearpc ]; propagatedBuildInputs = [ libsearpc libzdb libuuid libevent sqlite openssl ]; configureFlags = [ "--enable-server" ]; + strictDeps = true; + meta = with lib; { homepage = "https://github.com/haiwen/ccnet"; description = "A framework for writing networked applications in C"; From d56fdf8c4c08471d9e2aaeaf216864cba9552f59 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:25:59 +0100 Subject: [PATCH 31/72] cherrytree: use python2 --- pkgs/applications/misc/cherrytree/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/cherrytree/default.nix b/pkgs/applications/misc/cherrytree/default.nix index c74ac5ffb30..0ce89afa6ce 100644 --- a/pkgs/applications/misc/cherrytree/default.nix +++ b/pkgs/applications/misc/cherrytree/default.nix @@ -1,6 +1,6 @@ -{ lib, fetchFromGitHub, pythonPackages, gettext }: +{ lib, fetchFromGitHub, python2Packages, gettext }: -pythonPackages.buildPythonApplication rec { +python2Packages.buildPythonApplication rec { pname = "cherrytree"; version = "0.39.4"; @@ -14,7 +14,7 @@ pythonPackages.buildPythonApplication rec { nativeBuildInputs = [ gettext ]; - propagatedBuildInputs = with pythonPackages; [ pygtk dbus-python pygtksourceview ]; + propagatedBuildInputs = with python2Packages; [ pygtk dbus-python pygtksourceview ]; patches = [ ./subprocess.patch ]; From e1253a694f07be90fff0da9e2faa3c734c89cb51 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:27:08 +0100 Subject: [PATCH 32/72] chipsec: use python2 --- pkgs/tools/security/chipsec/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/chipsec/default.nix b/pkgs/tools/security/chipsec/default.nix index 45d6349af40..7e00c0b07cf 100644 --- a/pkgs/tools/security/chipsec/default.nix +++ b/pkgs/tools/security/chipsec/default.nix @@ -1,6 +1,6 @@ -{ stdenv, lib, fetchFromGitHub, pythonPackages, nasm, libelf +{ stdenv, lib, fetchFromGitHub, python2Packages, nasm, libelf , kernel ? null, withDriver ? false }: -pythonPackages.buildPythonApplication rec { +python2Packages.buildPythonApplication rec { pname = "chipsec"; version = "1.5.1"; From 7aa7f3cdbf5d3eec486fe5ecb2e35c6106fa75a3 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:28:16 +0100 Subject: [PATCH 33/72] chkcrontab: use python3 --- pkgs/tools/admin/chkcrontab/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/admin/chkcrontab/default.nix b/pkgs/tools/admin/chkcrontab/default.nix index bbf8d7eaeb1..d91894f0006 100644 --- a/pkgs/tools/admin/chkcrontab/default.nix +++ b/pkgs/tools/admin/chkcrontab/default.nix @@ -1,6 +1,6 @@ -{ python, lib }: +{ python3, lib }: -with python.pkgs; +with python3.pkgs; buildPythonApplication rec { pname = "chkcrontab"; From 4551e2260a4c4866af769ccd0d473eb4034511ea Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:28:57 +0100 Subject: [PATCH 34/72] cipherscan: use python3 --- pkgs/tools/security/cipherscan/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/cipherscan/default.nix b/pkgs/tools/security/cipherscan/default.nix index eae5a5256df..23022f92b6a 100644 --- a/pkgs/tools/security/cipherscan/default.nix +++ b/pkgs/tools/security/cipherscan/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, openssl, makeWrapper, python, coreutils }: +{ stdenv, lib, fetchFromGitHub, openssl, makeWrapper, python3, coreutils }: stdenv.mkDerivation rec { pname = "cipherscan"; @@ -12,7 +12,9 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ python ]; + buildInputs = [ python3 ]; + + strictDeps = true; buildPhase = '' substituteInPlace cipherscan --replace '$0' 'cipherscan' From 34c8e735aaa29f8943c717ff84f897ec5e1f8e6f Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:33:54 +0100 Subject: [PATCH 35/72] clearsilver: use python2 --- pkgs/development/libraries/clearsilver/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/clearsilver/default.nix b/pkgs/development/libraries/clearsilver/default.nix index 74d167144a9..73ffd6c12b2 100644 --- a/pkgs/development/libraries/clearsilver/default.nix +++ b/pkgs/development/libraries/clearsilver/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, fetchpatch, python }: +{ lib, stdenv, fetchurl, fetchpatch, python2 }: stdenv.mkDerivation rec { name = "clearsilver-0.10.5"; @@ -8,10 +8,10 @@ stdenv.mkDerivation rec { sha256 = "1046m1dpq3nkgxbis2dr2x7hynmy51n64465q78d7pdgvqwa178y"; }; - PYTHON_SITE = "$(out)/site-packages"; + PYTHON_SITE = "${placeholder "out"}/${python2.sitePackages}"; configureFlags = [ - "--with-python=${python}/bin/python" + "--with-python=${python2.interpreter}" "--disable-apache" "--disable-perl" "--disable-ruby" @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { preInstall = '' mkdir -p $out - mkdir -p $out/site-packages + mkdir -p $out/${python2.sitePackages} ''; patches = [ From b101b2efcd48f50a2b5146898b28ba49e19d3e25 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:35:40 +0100 Subject: [PATCH 36/72] clerk: use python3 --- pkgs/applications/audio/clerk/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/clerk/default.nix b/pkgs/applications/audio/clerk/default.nix index a2e71b955ec..ebcd09ca6ad 100644 --- a/pkgs/applications/audio/clerk/default.nix +++ b/pkgs/applications/audio/clerk/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, makeWrapper, rofi, mpc_cli, perl, -util-linux, pythonPackages, libnotify }: +util-linux, python3Packages, libnotify }: stdenv.mkDerivation { name = "clerk-2016-10-14"; @@ -12,10 +12,12 @@ stdenv.mkDerivation { }; nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ pythonPackages.mpd2 ]; + buildInputs = [ python3Packages.mpd2 ]; dontBuild = true; + strictDeps = true; + installPhase = '' DESTDIR=$out PREFIX=/ make install wrapProgram $out/bin/clerk \ From 8456df5d37f13cda9ad2b485c732bb64f84abc01 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:42:32 +0100 Subject: [PATCH 37/72] cli11: use python3 --- pkgs/development/tools/misc/cli11/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/cli11/default.nix b/pkgs/development/tools/misc/cli11/default.nix index 03c3e51cb89..d62ad413e1a 100644 --- a/pkgs/development/tools/misc/cli11/default.nix +++ b/pkgs/development/tools/misc/cli11/default.nix @@ -3,7 +3,7 @@ fetchFromGitHub, cmake, gtest, - python, + python3, boost }: @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - checkInputs = [ boost python ]; + checkInputs = [ boost python3 ]; doCheck = true; From 3e9d81498bdf6bc483a850748f25979dfffc5a4f Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:43:39 +0100 Subject: [PATCH 38/72] conway_polynomials: use python2 --- pkgs/data/misc/conway_polynomials/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/misc/conway_polynomials/default.nix b/pkgs/data/misc/conway_polynomials/default.nix index f7da9381e61..cabc28a89ce 100644 --- a/pkgs/data/misc/conway_polynomials/default.nix +++ b/pkgs/data/misc/conway_polynomials/default.nix @@ -1,13 +1,13 @@ { lib, stdenv , fetchurl -, python +, python2 }: stdenv.mkDerivation rec { pname = "conway_polynomials"; version = "0.5"; - pythonEnv = python.withPackages (ps: with ps; [ six ]); + pythonEnv = python2.withPackages (ps: with ps; [ six ]); src = fetchurl { url = "mirror://sageupstream/conway_polynomials/conway_polynomials-${version}.tar.bz2"; From 7be6cf9784aad8d3b0606fb469eaa528f21f2621 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:48:24 +0100 Subject: [PATCH 39/72] cmdstan: use python3 --- pkgs/development/compilers/cmdstan/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/cmdstan/default.nix b/pkgs/development/compilers/cmdstan/default.nix index df674b67db8..c52ffa0bafd 100644 --- a/pkgs/development/compilers/cmdstan/default.nix +++ b/pkgs/development/compilers/cmdstan/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, python, runtimeShell }: +{ lib, stdenv, fetchurl, python3, runtimeShell }: stdenv.mkDerivation { name = "cmdstan-2.17.1"; @@ -12,7 +12,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; doCheck = true; - checkInputs = [ python ]; + checkInputs = [ python3 ]; checkPhase = "python ./runCmdStanTests.py src/test/interface"; # see #5368 installPhase = '' From 5769fcd519a1ed5e5ecb1dfdbdeebddabddce6ad Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:53:55 +0100 Subject: [PATCH 40/72] cppcms: use python2 --- pkgs/development/libraries/cppcms/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/cppcms/default.nix b/pkgs/development/libraries/cppcms/default.nix index aceb2d61e38..e0f9ed59912 100644 --- a/pkgs/development/libraries/cppcms/default.nix +++ b/pkgs/development/libraries/cppcms/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, cmake, pcre, zlib, python, openssl }: +{ lib, stdenv, fetchurl, cmake, pcre, zlib, python2, openssl }: stdenv.mkDerivation rec { pname = "cppcms"; @@ -10,7 +10,9 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ]; - buildInputs = [ pcre zlib python openssl ]; + buildInputs = [ pcre zlib python2 openssl ]; + + strictDeps = true; cmakeFlags = [ "--no-warn-unused-cli" From d0830178383056757ec0eca1cddc27b48dd57dc5 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 11:58:47 +0100 Subject: [PATCH 41/72] curaByDagoma: use python2 --- pkgs/applications/misc/curabydagoma/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/curabydagoma/default.nix b/pkgs/applications/misc/curabydagoma/default.nix index 821b88f9b20..a8d041de107 100644 --- a/pkgs/applications/misc/curabydagoma/default.nix +++ b/pkgs/applications/misc/curabydagoma/default.nix @@ -1,4 +1,4 @@ -{ stdenv, runtimeShell, lib, fetchurl, python, pythonPackages, unzip }: +{ stdenv, runtimeShell, lib, fetchurl, python2Packages, unzip }: # This package uses a precompiled "binary" distribution of CuraByDagoma, # distributed by the editor. @@ -13,7 +13,9 @@ # I guess people owning a 3D printer generally don't use i686. # If, however, someone needs it, we certainly can find a solution. -stdenv.mkDerivation rec { +let + pythonPackages = python2Packages; +in stdenv.mkDerivation rec { pname = "curabydagoma"; # Version is the date, UNIX format version = "1520506579"; @@ -26,7 +28,7 @@ stdenv.mkDerivation rec { }; unpackCmd = "unzip $curSrc && tar zxf CuraByDagoma_amd64.tar.gz"; nativeBuildInputs = [ unzip ]; - buildInputs = [ python pythonPackages.pyopengl pythonPackages.wxPython pythonPackages.pyserial pythonPackages.numpy ]; + buildInputs = [ pythonPackages.python pythonPackages.pyopengl pythonPackages.wxPython pythonPackages.pyserial pythonPackages.numpy ]; # Compile all pyc files because the included pyc files may be older than the # py files. However, Python doesn't realize that because the packages @@ -46,7 +48,7 @@ stdenv.mkDerivation rec { cat > $out/bin/curabydago < Date: Thu, 25 Mar 2021 12:00:51 +0100 Subject: [PATCH 42/72] cling: use python3 --- pkgs/development/interpreters/cling/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/cling/default.nix b/pkgs/development/interpreters/cling/default.nix index 8f80d2f4ee6..dbc2751e789 100644 --- a/pkgs/development/interpreters/cling/default.nix +++ b/pkgs/development/interpreters/cling/default.nix @@ -1,5 +1,5 @@ { lib, stdenv -, python +, python3 , libffi , git , cmake @@ -38,9 +38,11 @@ let chmod -R a+w ./tools/cling ''; - nativeBuildInputs = [ python git cmake ]; + nativeBuildInputs = [ python3 git cmake ]; buildInputs = [ libffi llvmPackages_5.llvm zlib ]; + strictDeps = true; + cmakeFlags = [ "-DLLVM_TARGETS_TO_BUILD=host;NVPTX" "-DLLVM_ENABLE_RTTI=ON" From 3842c35a2d23ecc41d7c141baa8d5185f35f3e1e Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:08:31 +0100 Subject: [PATCH 43/72] dd-agent: stay with python2 --- pkgs/tools/networking/dd-agent/5.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/dd-agent/5.nix b/pkgs/tools/networking/dd-agent/5.nix index af4ae7ed769..f40ef295d13 100644 --- a/pkgs/tools/networking/dd-agent/5.nix +++ b/pkgs/tools/networking/dd-agent/5.nix @@ -1,7 +1,7 @@ -{ lib, stdenv, fetchFromGitHub, python +{ lib, stdenv, fetchFromGitHub, python2 , unzip, makeWrapper }: let - python' = python.override { + python' = python2.override { packageOverrides = self: super: { docker = self.buildPythonPackage rec { name = "docker-${version}"; @@ -82,7 +82,7 @@ in stdenv.mkDerivation rec { cat > $out/bin/dd-jmxfetch < Date: Thu, 25 Mar 2021 12:09:43 +0100 Subject: [PATCH 44/72] dia: stay with python2 --- pkgs/applications/graphics/dia/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/dia/default.nix b/pkgs/applications/graphics/dia/default.nix index d9de3eb7fc1..d07904c8597 100644 --- a/pkgs/applications/graphics/dia/default.nix +++ b/pkgs/applications/graphics/dia/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchgit, autoconf, automake, libtool, gtk2, pkg-config, perlPackages, -libxml2, gettext, python, libxml2Python, docbook5, docbook_xsl, +libxml2, gettext, python2, libxml2Python, docbook5, docbook_xsl, libxslt, intltool, libart_lgpl, withGNOME ? false, libgnomeui, gtk-mac-integration-gtk2 }: @@ -18,7 +18,7 @@ stdenv.mkDerivation { ]; buildInputs = - [ gtk2 libxml2 gettext python libxml2Python docbook5 + [ gtk2 libxml2 gettext python2 libxml2Python docbook5 libxslt docbook_xsl libart_lgpl ] ++ lib.optional withGNOME libgnomeui ++ lib.optional stdenv.isDarwin gtk-mac-integration-gtk2; From f2f007073cf87afb8fa3212716739a38e170143c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:12:23 +0100 Subject: [PATCH 45/72] dico: stay with python2 --- pkgs/servers/dico/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/dico/default.nix b/pkgs/servers/dico/default.nix index cf0417e332e..6a8c6541c2c 100644 --- a/pkgs/servers/dico/default.nix +++ b/pkgs/servers/dico/default.nix @@ -1,5 +1,5 @@ { fetchurl, lib, stdenv, libtool, gettext, zlib, readline, gsasl -, guile, python, pcre, libffi, groff }: +, guile, python2, pcre, libffi, groff }: stdenv.mkDerivation rec { pname = "dico"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; buildInputs = - [ libtool gettext zlib readline gsasl guile python pcre libffi groff ]; + [ libtool gettext zlib readline gsasl guile python2 pcre libffi groff ]; doCheck = true; From 11cbfae15a2164ffca34cd5145928c8e4045c291 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:12:49 +0100 Subject: [PATCH 46/72] cryfs: use python3 --- pkgs/tools/filesystems/cryfs/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/filesystems/cryfs/default.nix b/pkgs/tools/filesystems/cryfs/default.nix index 3777c4e7cb1..eec257c44b7 100644 --- a/pkgs/tools/filesystems/cryfs/default.nix +++ b/pkgs/tools/filesystems/cryfs/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, fetchpatch -, cmake, pkg-config, python, gtest +, cmake, pkg-config, python3, gtest , boost, cryptopp, curl, fuse, openssl }: @@ -44,9 +44,11 @@ stdenv.mkDerivation rec { --replace "(4.5L*1024*1024*1024)" "(0.5L*1024*1024*1024)" ''; - nativeBuildInputs = [ cmake gtest pkg-config python ]; + nativeBuildInputs = [ cmake pkg-config python3 ]; - buildInputs = [ boost cryptopp curl fuse openssl ]; + strictDeps = true; + + buildInputs = [ boost cryptopp curl fuse openssl gtest ]; cmakeFlags = [ "-DCRYFS_UPDATE_CHECKS:BOOL=FALSE" From 842f0b4f658ecd08e0e1be2b7db1f06750d8b041 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:13:22 +0100 Subject: [PATCH 47/72] crispyDoom: stay with python2 --- pkgs/games/crispy-doom/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/games/crispy-doom/default.nix b/pkgs/games/crispy-doom/default.nix index 432600e879f..3d46de725c7 100644 --- a/pkgs/games/crispy-doom/default.nix +++ b/pkgs/games/crispy-doom/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, autoreconfHook, pkg-config, SDL2, SDL2_mixer, SDL2_net, fetchFromGitHub, python }: +{ lib, stdenv, autoreconfHook, pkg-config, SDL2, SDL2_mixer, SDL2_net, fetchFromGitHub, python2 }: stdenv.mkDerivation rec { pname = "crispy-doom"; @@ -16,10 +16,12 @@ stdenv.mkDerivation rec { for script in $(grep -lr '^#!/usr/bin/env python$'); do patchShebangs $script; done ''; - nativeBuildInputs = [ autoreconfHook pkg-config python ]; + nativeBuildInputs = [ autoreconfHook pkg-config python2 ]; buildInputs = [ SDL2 SDL2_mixer SDL2_net ]; enableParallelBuilding = true; + strictDeps = true; + meta = { homepage = "http://fabiangreffrath.github.io/crispy-doom"; description = "A limit-removing enhanced-resolution Doom source port based on Chocolate Doom"; From 317384aa90da8397e554318e0b8b60cff832f8c5 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:14:44 +0100 Subject: [PATCH 48/72] wiktionary: stay with python2 --- pkgs/servers/dict/wiktionary/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/dict/wiktionary/default.nix b/pkgs/servers/dict/wiktionary/default.nix index cd0c9c6c24b..3a01120f3a6 100644 --- a/pkgs/servers/dict/wiktionary/default.nix +++ b/pkgs/servers/dict/wiktionary/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, python, dict, glibcLocales }: +{ lib, stdenv, fetchurl, python2, dict, glibcLocales }: stdenv.mkDerivation rec { version = "20210201"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; convert = ./wiktionary2dict.py; - buildInputs = [ python dict glibcLocales ]; + buildInputs = [ python2 dict glibcLocales ]; builder = ./builder.sh; passthru.updateScript = ./update.sh; From 2b92f2b2595e9e293184aa0578e2ef9bae2a9570 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:16:29 +0100 Subject: [PATCH 49/72] dictdDBs.wordnet: stay with python2 --- pkgs/servers/dict/dictd-wordnet.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/dict/dictd-wordnet.nix b/pkgs/servers/dict/dictd-wordnet.nix index 3f76d60233c..8378102dac5 100644 --- a/pkgs/servers/dict/dictd-wordnet.nix +++ b/pkgs/servers/dict/dictd-wordnet.nix @@ -1,10 +1,10 @@ -{lib, stdenv, python, wordnet, writeScript}: +{lib, stdenv, python2, wordnet, writeScript}: stdenv.mkDerivation rec { version = "542"; pname = "dict-db-wordnet"; - buildInputs = [python wordnet]; + buildInputs = [python2 wordnet]; convert = ./wordnet_structures.py; builder = writeScript "builder.sh" '' From 3d4695c41d1440b7db302fa584106fed60713fb4 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:17:45 +0100 Subject: [PATCH 50/72] direwolf: use python3 --- pkgs/applications/radio/direwolf/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/radio/direwolf/default.nix b/pkgs/applications/radio/direwolf/default.nix index e7da78034cc..4f8ca550490 100644 --- a/pkgs/applications/radio/direwolf/default.nix +++ b/pkgs/applications/radio/direwolf/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, cmake, alsaLib, espeak, glibc, gpsd -, hamlib, perl, python, udev }: +, hamlib, perl, python3, udev }: with lib; @@ -16,8 +16,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; + strictDeps = true; + buildInputs = [ - espeak gpsd hamlib perl python + espeak gpsd hamlib perl python3 ] ++ (optionals stdenv.isLinux [alsaLib udev]); patches = [ From bccaae647cef74904c61db0bfbcfebf849991df6 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:19:28 +0100 Subject: [PATCH 51/72] disper: stay with python2 --- pkgs/tools/misc/disper/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/disper/default.nix b/pkgs/tools/misc/disper/default.nix index ecbf298132f..3e78bc97732 100644 --- a/pkgs/tools/misc/disper/default.nix +++ b/pkgs/tools/misc/disper/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, python, xorg, makeWrapper }: +{ lib, stdenv, fetchFromGitHub, python2, xorg, makeWrapper }: stdenv.mkDerivation rec { pname = "disper"; @@ -13,7 +13,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ python ]; + strictDeps = true; + + buildInputs = [ python2 ]; preConfigure = '' export makeFlags="PREFIX=$out" From 11aa8b3b89eadfc17e31fb4c4c764ff882856a3c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:20:37 +0100 Subject: [PATCH 52/72] distcc: use python3 --- pkgs/development/tools/misc/distcc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/distcc/default.nix b/pkgs/development/tools/misc/distcc/default.nix index cad9fe0960b..38ddc1ff431 100644 --- a/pkgs/development/tools/misc/distcc/default.nix +++ b/pkgs/development/tools/misc/distcc/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, popt, avahi, pkg-config, python, gtk2, runCommand +{ lib, stdenv, fetchFromGitHub, popt, avahi, pkg-config, python3, gtk2, runCommand , gcc, autoconf, automake, which, procps, libiberty_static , runtimeShell , sysconfDir ? "" # set this parameter to override the default value $out/etc @@ -18,7 +18,7 @@ let }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [popt avahi pkg-config python gtk2 autoconf automake which procps libiberty_static]; + buildInputs = [popt avahi pkg-config python3 gtk2 autoconf automake which procps libiberty_static]; preConfigure = '' export CPATH=$(ls -d ${gcc.cc}/lib/gcc/*/${gcc.cc.version}/plugin/include) From 3ae47a343c2aecaa841ac7d9ac877cd535286d0c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:22:50 +0100 Subject: [PATCH 53/72] dmtcp: stay with python2 --- pkgs/os-specific/linux/dmtcp/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/dmtcp/default.nix b/pkgs/os-specific/linux/dmtcp/default.nix index 21458daf966..5a472c73578 100644 --- a/pkgs/os-specific/linux/dmtcp/default.nix +++ b/pkgs/os-specific/linux/dmtcp/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, bash, perl, python }: +{ lib, stdenv, fetchFromGitHub, bash, perl, python2 }: + +# There are fixes for python3 compatibility on master stdenv.mkDerivation rec { pname = "dmtcp"; @@ -28,7 +30,7 @@ stdenv.mkDerivation rec { substituteInPlace test/autotest.py \ --replace /bin/bash ${bash}/bin/bash \ --replace /usr/bin/perl ${perl}/bin/perl \ - --replace /usr/bin/python ${python}/bin/python \ + --replace /usr/bin/python ${python2}/bin/python \ --replace "os.environ['USER']" "\"nixbld1\"" \ --replace "os.getenv('USER')" "\"nixbld1\"" ''; From cf76b070440d66e9c9f7fb1993dbc94227bbf1f1 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:23:29 +0100 Subject: [PATCH 54/72] dockbarx: stay with python2 --- pkgs/applications/misc/dockbarx/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/dockbarx/default.nix b/pkgs/applications/misc/dockbarx/default.nix index b31c17cc319..5bc8de522de 100644 --- a/pkgs/applications/misc/dockbarx/default.nix +++ b/pkgs/applications/misc/dockbarx/default.nix @@ -1,6 +1,6 @@ -{ lib, fetchFromGitHub, pythonPackages, gnome2, keybinder }: +{ lib, fetchFromGitHub, python2Packages, gnome2, keybinder }: -pythonPackages.buildPythonApplication rec { +python2Packages.buildPythonApplication rec { ver = "0.93"; name = "dockbarx-${ver}"; @@ -24,7 +24,7 @@ pythonPackages.buildPythonApplication rec { substituteInPlace dockx_applets/volume-control.py --replace /usr/share/ $out/share/ ''; - propagatedBuildInputs = (with pythonPackages; [ pygtk pyxdg dbus-python pillow xlib ]) + propagatedBuildInputs = (with python2Packages; [ pygtk pyxdg dbus-python pillow xlib ]) ++ (with gnome2; [ gnome_python gnome_python_desktop ]) ++ [ keybinder ]; From 49b68c592455db548d942593bfb3fd87a3d2b51a Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:25:40 +0100 Subject: [PATCH 55/72] doclifter: use python3 --- pkgs/development/tools/misc/doclifter/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/doclifter/default.nix b/pkgs/development/tools/misc/doclifter/default.nix index 8b771788111..0692d84b454 100644 --- a/pkgs/development/tools/misc/doclifter/default.nix +++ b/pkgs/development/tools/misc/doclifter/default.nix @@ -1,4 +1,4 @@ -{lib, stdenv, fetchurl, python}: +{lib, stdenv, fetchurl, python3}: stdenv.mkDerivation { name = "doclifter-2.19"; @@ -6,7 +6,9 @@ stdenv.mkDerivation { url = "http://www.catb.org/~esr/doclifter/doclifter-2.19.tar.gz"; sha256 = "1as6z7mdjrrkw2kism41q5ybvyzvwcmj9qzla2fz98v9f4jbj2s2"; }; - buildInputs = [ python ]; + buildInputs = [ python3 ]; + + strictDeps = true; makeFlags = [ "PREFIX=$(out)" ]; From 0aaee53c2a18777b83b9a0bfca71e5a47aea4f84 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:27:59 +0100 Subject: [PATCH 56/72] docopt_cpp: stay with python2 --- pkgs/development/libraries/docopt_cpp/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/docopt_cpp/default.nix b/pkgs/development/libraries/docopt_cpp/default.nix index f9456b8acac..3de84b684e5 100644 --- a/pkgs/development/libraries/docopt_cpp/default.nix +++ b/pkgs/development/libraries/docopt_cpp/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, python }: +{ lib, stdenv, fetchFromGitHub, cmake, python2 }: stdenv.mkDerivation rec { version = "0.6.3"; @@ -11,10 +11,12 @@ stdenv.mkDerivation rec { sha256 = "0cz3vv7g5snfbsqcf3q8bmd6kv5qp84gj3avwkn4vl00krw13bl7"; }; - nativeBuildInputs = [ cmake python ]; + nativeBuildInputs = [ cmake python2 ]; cmakeFlags = ["-DWITH_TESTS=ON"]; + strictDeps = true; + doCheck = true; postPatch = '' From a4316eaab7a258b98c351b9fb71c7bb4c8efba35 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:29:04 +0100 Subject: [PATCH 57/72] dotfiles: use python3 --- pkgs/applications/misc/dotfiles/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/dotfiles/default.nix b/pkgs/applications/misc/dotfiles/default.nix index 911a319a963..b62d154feb1 100644 --- a/pkgs/applications/misc/dotfiles/default.nix +++ b/pkgs/applications/misc/dotfiles/default.nix @@ -1,10 +1,10 @@ -{ lib, pythonPackages }: +{ lib, python3Packages }: -pythonPackages.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "dotfiles"; version = "0.6.4"; - src = pythonPackages.fetchPypi { + src = python3Packages.fetchPypi { inherit version pname; sha256 = "03qis6m9r2qh00sqbgwsm883s4bj1ibwpgk86yh4l235mdw8jywv"; }; @@ -12,8 +12,8 @@ pythonPackages.buildPythonApplication rec { # No tests in archive doCheck = false; - checkInputs = with pythonPackages; [ pytest ]; - propagatedBuildInputs = with pythonPackages; [ click ]; + checkInputs = with python3Packages; [ pytest ]; + propagatedBuildInputs = with python3Packages; [ click ]; meta = with lib; { description = "Easily manage your dotfiles"; From 7012ab1b5420e17c854ec858b4611bcc06bd7638 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:30:44 +0100 Subject: [PATCH 58/72] dtc: don't require python --- pkgs/development/compilers/dtc/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/dtc/default.nix b/pkgs/development/compilers/dtc/default.nix index c5d33590daa..245e5bf2f54 100644 --- a/pkgs/development/compilers/dtc/default.nix +++ b/pkgs/development/compilers/dtc/default.nix @@ -1,7 +1,9 @@ { stdenv, lib, fetchgit, flex, bison, pkg-config, which -, pythonSupport ? false, python, swig +, pythonSupport ? false, python ? null, swig }: +assert pythonSupport -> python != null; + stdenv.mkDerivation rec { pname = "dtc"; version = "1.6.0"; From 63434aa2617e8b6d578c049953cb1830a26b8dd8 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:35:28 +0100 Subject: [PATCH 59/72] dtrx: stay with python2 --- pkgs/tools/compression/dtrx/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/compression/dtrx/default.nix b/pkgs/tools/compression/dtrx/default.nix index 91d59a4de0f..6c4f2f6e854 100644 --- a/pkgs/tools/compression/dtrx/default.nix +++ b/pkgs/tools/compression/dtrx/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, pythonPackages +{ lib, fetchurl, python2Packages , gnutar, unzip, lhasa, rpm, binutils, cpio, gzip, p7zip, cabextract, unrar, unshield , bzip2, xz, lzip # unzip is handled by p7zip @@ -11,7 +11,7 @@ let ++ lib.optional (unrarSupport) unrar ++ [ bzip2 xz lzip ]); -in pythonPackages.buildPythonApplication rec { +in python2Packages.buildPythonApplication rec { pname = "dtrx"; version = "7.1"; @@ -24,6 +24,17 @@ in pythonPackages.buildPythonApplication rec { wrapProgram "$out/bin/dtrx" --prefix PATH : "${archivers}" ''; + checkPhase = '' + python2 tests/compare.py + ''; + + checkInputs = with python2Packages; [ + pyyaml + ]; + + # custom test suite fails + doCheck = false; + meta = with lib; { description = "Do The Right Extraction: A tool for taking the hassle out of extracting archives"; homepage = "https://brettcsmith.org/2007/dtrx/"; From 9f9a1a01abb36bcd01cfeb0fb280cd0927bcc101 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:36:24 +0100 Subject: [PATCH 60/72] elliptic_curves: stay with python2 because its sage --- pkgs/data/misc/elliptic_curves/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/misc/elliptic_curves/default.nix b/pkgs/data/misc/elliptic_curves/default.nix index 988716f5429..98259400021 100644 --- a/pkgs/data/misc/elliptic_curves/default.nix +++ b/pkgs/data/misc/elliptic_curves/default.nix @@ -1,6 +1,6 @@ { lib, stdenv , fetchurl -, python +, python2 }: stdenv.mkDerivation rec { @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { export SAGE_SHARE="$out/share" export PYTHONPATH=$PWD - ${python.interpreter} ${spkg-install} + ${python2.interpreter} ${spkg-install} ''; meta = with lib; { From 02522e4f7606dcce93f30c01f9c7ab21cb03165a Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:39:49 +0100 Subject: [PATCH 61/72] escrotum: stay with python2 --- pkgs/tools/graphics/escrotum/default.nix | 6 ++---- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/graphics/escrotum/default.nix b/pkgs/tools/graphics/escrotum/default.nix index 4a887688c4f..decb92615f9 100644 --- a/pkgs/tools/graphics/escrotum/default.nix +++ b/pkgs/tools/graphics/escrotum/default.nix @@ -1,9 +1,7 @@ -{ lib, fetchFromGitHub, buildPythonApplication -, pygtk -, numpy ? null +{ lib, python2Packages, fetchFromGitHub }: -buildPythonApplication { +with python2Packages; buildPythonApplication { name = "escrotum-2019-06-10"; src = fetchFromGitHub { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a318040b096..d28e1029dcc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4156,9 +4156,7 @@ in epsxe = callPackage ../misc/emulators/epsxe { }; - escrotum = callPackage ../tools/graphics/escrotum { - inherit (pythonPackages) buildPythonApplication pygtk numpy; - }; + escrotum = callPackage ../tools/graphics/escrotum { }; etcher = callPackage ../tools/misc/etcher { }; From 63540c9df85fddecd5a667399ccb0593e1648c49 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:40:55 +0100 Subject: [PATCH 62/72] libkkc-data: stay with python2 --- pkgs/data/misc/libkkc-data/default.nix | 6 ++++-- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/data/misc/libkkc-data/default.nix b/pkgs/data/misc/libkkc-data/default.nix index 96130b2de5e..7fcd2fbf516 100644 --- a/pkgs/data/misc/libkkc-data/default.nix +++ b/pkgs/data/misc/libkkc-data/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, marisa, libkkc }: +{ lib, stdenv, fetchurl, python2, libkkc }: stdenv.mkDerivation rec { pname = "libkkc-data"; @@ -9,7 +9,9 @@ stdenv.mkDerivation rec { sha256 = "16avb50jasq2f1n9xyziky39dhlnlad0991pisk3s11hl1aqfrwy"; }; - nativeBuildInputs = [ marisa ]; + nativeBuildInputs = [ python2.pkgs.marisa ]; + + strictDeps = true; meta = with lib; { description = "Language model data package for libkkc"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d28e1029dcc..29fec580a19 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3389,9 +3389,7 @@ in skktools = callPackage ../tools/inputmethods/skk/skktools { }; skk-dicts = callPackage ../tools/inputmethods/skk/skk-dicts { }; - libkkc-data = callPackage ../data/misc/libkkc-data { - inherit (pythonPackages) marisa; - }; + libkkc-data = callPackage ../data/misc/libkkc-data { }; libkkc = callPackage ../tools/inputmethods/libkkc { }; From c9bf099a5c86109e34001ccd1cbb40122a7c201e Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:41:11 +0100 Subject: [PATCH 63/72] bud: fixup calling expression --- pkgs/top-level/all-packages.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 29fec580a19..281ec97be9f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3137,9 +3137,7 @@ in librsync = librsync_0_9; }; - bud = callPackage ../tools/networking/bud { - inherit (pythonPackages) gyp; - }; + bud = callPackage ../tools/networking/bud { }; bump2version = python37Packages.callPackage ../applications/version-management/git-and-tools/bump2version { }; From 7864093c68b4b3d02432bd34929adebefdd8fef7 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:43:50 +0100 Subject: [PATCH 64/72] fedpkg: stay with python2 --- pkgs/development/tools/fedpkg/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/fedpkg/default.nix b/pkgs/development/tools/fedpkg/default.nix index d9633e88f34..2ba0f494c21 100644 --- a/pkgs/development/tools/fedpkg/default.nix +++ b/pkgs/development/tools/fedpkg/default.nix @@ -1,4 +1,6 @@ -{ lib, buildPythonApplication, buildPythonPackage, isPy3k, fetchurl, rpkg, offtrac, urlgrabber, pyopenssl, python_fedora }: +{ lib, python2Packages, fetchurl }: + +with python2Packages; let fedora_cert = buildPythonPackage rec { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 281ec97be9f..fb30641f7da 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12544,7 +12544,7 @@ in jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731 }; - fedpkg = pythonPackages.callPackage ../development/tools/fedpkg { }; + fedpkg = callPackage ../development/tools/fedpkg { }; flex_2_5_35 = callPackage ../development/tools/parsing/flex/2.5.35.nix { }; flex = callPackage ../development/tools/parsing/flex { }; From 15a9c8ba60a0b37980bb2099b6160255174876e7 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:45:03 +0100 Subject: [PATCH 65/72] evemu: use python3 --- pkgs/tools/system/evemu/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/system/evemu/default.nix b/pkgs/tools/system/evemu/default.nix index 5b3a584bd24..c01a909668e 100644 --- a/pkgs/tools/system/evemu/default.nix +++ b/pkgs/tools/system/evemu/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, pythonPackages +{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, python3Packages , libevdev }: @@ -14,9 +14,11 @@ stdenv.mkDerivation rec { sha256 = "1m38fxwy2s82vb2qm9aqxinws12akmqqq7q66is931lc3awqkbah"; }; - nativeBuildInputs = [ pkg-config autoreconfHook ]; + nativeBuildInputs = [ pkg-config autoreconfHook python3Packages.python ]; - buildInputs = [ pythonPackages.python pythonPackages.evdev libevdev ]; + buildInputs = [ python3Packages.evdev libevdev ]; + + strictDeps = true; meta = with lib; { description = "Records and replays device descriptions and events to emulate input devices through the kernel's input system"; From 9533ed6c65866b7dedf75e015040f559e257b6b6 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:47:58 +0100 Subject: [PATCH 66/72] fio: use python3 --- pkgs/tools/system/fio/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/fio/default.nix b/pkgs/tools/system/fio/default.nix index d34f0d4b737..fc4ea8d6b33 100644 --- a/pkgs/tools/system/fio/default.nix +++ b/pkgs/tools/system/fio/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, makeWrapper -, libaio, python, zlib +, libaio, python3, zlib , withGnuplot ? false, gnuplot ? null }: stdenv.mkDerivation rec { @@ -13,11 +13,13 @@ stdenv.mkDerivation rec { sha256 = "sha256-/Si0McndJ6Xp3ifDr+BStv89LmZyAgof95QkHGT8MGQ="; }; - buildInputs = [ python zlib ] + buildInputs = [ python3 zlib ] ++ lib.optional (!stdenv.isDarwin) libaio; nativeBuildInputs = [ makeWrapper ]; + strictDeps = true; + enableParallelBuilding = true; postPatch = '' From a904a4d886988a184c3447218704404817a4c9ba Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:54:37 +0100 Subject: [PATCH 67/72] gaia: does not require python --- pkgs/development/libraries/gaia/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gaia/default.nix b/pkgs/development/libraries/gaia/default.nix index 088354aecb2..47926e2ec0b 100644 --- a/pkgs/development/libraries/gaia/default.nix +++ b/pkgs/development/libraries/gaia/default.nix @@ -9,7 +9,7 @@ , wafHook , makeWrapper , qt4 -, pythonPackages +, pythonPackages ? null , pythonSupport ? false # Default to false since it breaks the build, see https://github.com/MTG/gaia/issues/11 , stlfacadeSupport ? false From c15ad415b18539531f46ca772fb0721afd6b0c2f Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:55:20 +0100 Subject: [PATCH 68/72] foundationdb vsmake: stay with python2 CMake builds already use python3. Stay with python2, just to be safe. --- pkgs/servers/foundationdb/vsmake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/foundationdb/vsmake.nix b/pkgs/servers/foundationdb/vsmake.nix index aac9ab07c0f..e171d714564 100644 --- a/pkgs/servers/foundationdb/vsmake.nix +++ b/pkgs/servers/foundationdb/vsmake.nix @@ -4,7 +4,7 @@ { gcc6Stdenv, lib, fetchurl, fetchFromGitHub , which, findutils, m4, gawk -, python, openjdk, mono, libressl +, python2, openjdk, mono, libressl , ... }: @@ -51,7 +51,7 @@ let inherit rev sha256; }; - nativeBuildInputs = [ python openjdk gawk which m4 findutils mono ]; + nativeBuildInputs = [ python2 openjdk gawk which m4 findutils mono ]; buildInputs = [ libressl boost ]; inherit patches; From c7c38df130aaa9c40b29f540296b863f9bb21486 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:56:02 +0100 Subject: [PATCH 69/72] galario: does not require python --- pkgs/development/libraries/galario/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/galario/default.nix b/pkgs/development/libraries/galario/default.nix index 888f26f2da7..4e28f84bacd 100644 --- a/pkgs/development/libraries/galario/default.nix +++ b/pkgs/development/libraries/galario/default.nix @@ -5,7 +5,7 @@ , fftw , fftwFloat , enablePython ? false -, pythonPackages +, pythonPackages ? null , llvmPackages }: let From 4ef474e7287577608b0c795aa22a44d1e8b4c0b9 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 12:58:42 +0100 Subject: [PATCH 70/72] gammu: does not use python --- pkgs/applications/misc/gammu/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/gammu/default.nix b/pkgs/applications/misc/gammu/default.nix index 0a6796a9b07..736685f5eb1 100644 --- a/pkgs/applications/misc/gammu/default.nix +++ b/pkgs/applications/misc/gammu/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, python, pkg-config, cmake, bluez, libusb1, curl +{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, bluez, libusb1, curl , libiconv, gettext, sqlite , dbiSupport ? false, libdbi ? null, libdbiDrivers ? null , postgresSupport ? false, postgresql ? null @@ -21,7 +21,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config cmake ]; - buildInputs = [ python bluez libusb1 curl gettext sqlite libiconv ] + strictDeps = true; + + buildInputs = [ bluez libusb1 curl gettext sqlite libiconv ] ++ optionals dbiSupport [ libdbi libdbiDrivers ] ++ optionals postgresSupport [ postgresql ]; From 786e4b6b6ac2739d11c47dec267a962d94d31f93 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 13:03:11 +0100 Subject: [PATCH 71/72] ganv: use python3 --- pkgs/development/libraries/ganv/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/ganv/default.nix b/pkgs/development/libraries/ganv/default.nix index bf6c030589b..d53206ca667 100644 --- a/pkgs/development/libraries/ganv/default.nix +++ b/pkgs/development/libraries/ganv/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchgit, graphviz, gtk2, gtkmm2, pkg-config, python, wafHook }: +{ lib, stdenv, fetchgit, graphviz, gtk2, gtkmm2, pkg-config, python3, wafHook }: stdenv.mkDerivation rec { pname = "ganv"; @@ -11,8 +11,10 @@ stdenv.mkDerivation rec { sha256 = "01znnalirbqxpz62fbw2c14c8xn117jc92xv6dhb3hln92k9x37f"; }; - nativeBuildInputs = [ pkg-config wafHook ]; - buildInputs = [ graphviz gtk2 gtkmm2 python ]; + nativeBuildInputs = [ pkg-config wafHook python3 gtk2 ]; + buildInputs = [ graphviz gtkmm2 ]; + + strictDeps = true; meta = with lib; { description = "An interactive Gtk canvas widget for graph-based interfaces"; From f0754b8ab8b4969ff49e2436c6c8f12120c13ad8 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 25 Mar 2021 13:12:27 +0100 Subject: [PATCH 72/72] foundationdb: use python2 and python3 --- pkgs/servers/foundationdb/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/foundationdb/default.nix b/pkgs/servers/foundationdb/default.nix index 78addfc4aa2..b3a876546e7 100644 --- a/pkgs/servers/foundationdb/default.nix +++ b/pkgs/servers/foundationdb/default.nix @@ -2,7 +2,7 @@ , lib, fetchurl, fetchpatch, fetchFromGitHub , cmake, ninja, which, findutils, m4, gawk -, python, python3, openjdk, mono, libressl, boost +, python2, python3, openjdk, mono, libressl, boost }@args: let