From 4c1dfa7b27b1944607c51b543b43dc36256c9fbb Mon Sep 17 00:00:00 2001
From: Michael Raskin <7c6f434c@mail.ru>
Date: Fri, 8 Apr 2022 17:08:59 +0200
Subject: [PATCH] pypy2Packages.nose, pypy37Packages.nose: fix build by not
 trying to use 2to3

---
 pkgs/development/python-modules/nose/default.nix | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkgs/development/python-modules/nose/default.nix b/pkgs/development/python-modules/nose/default.nix
index 451c71897da9..586af7a90423 100644
--- a/pkgs/development/python-modules/nose/default.nix
+++ b/pkgs/development/python-modules/nose/default.nix
@@ -23,7 +23,9 @@ buildPythonPackage rec {
       --replace "from setuptools.command.build_py import Mixin2to3" "from distutils.util import Mixin2to3"
   '';
 
-  preBuild = ''
+  preBuild = lib.optionalString
+      ((python.isPy3k or false) && (python.pname != "pypy3"))
+  ''
     2to3 -wn nose functional_tests unit_tests
   '';